Autor Beitrag
D. Annies
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: Mo 29.11.10 16:44 
Hi, Delpher,
(wie) ist es möglich, Excel nicht maximized zu starten, sondern in einem Fenster,
z.B. mit den SetBounds(100,150,600,400)?
Vielen Dank für eine Idee/Hinweis,
Detlef

_________________
ut vires desint, tamen est laudanda voluntas
bummi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1248
Erhaltene Danke: 187

XP - Server 2008R2
D2 - Delphi XE
BeitragVerfasst: Mo 29.11.10 17:03 
Ich finde gerade nicht die Zeit den Namen für Excel zu suchen
das hier geht mit Notepad, sollte auch mit Excel gehen
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
var
  hExcel: hWnd;
begin
  hExcel := FindWindow('Notepad'nil);
  SetWindowPos(hExcel, 0100,150,600,400,0);
end;


EDIT: habs, geht freilich erst wenn das Fenster bereits erzeugt ist

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
var
  hExcel: hWnd;

begin
  hExcel := FindWindow('XLMAIN'nil);
  SetWindowPos(hExcel, 000300400,0);
end;

_________________
Das Problem liegt üblicherweise zwischen den Ohren H₂♂
DRY DRY KISS

Für diesen Beitrag haben gedankt: D. Annies
D. Annies Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1843

windows 7
D6 Enterprise, D7 Pers und TD 2006
BeitragVerfasst: Mo 29.11.10 17:20 
Hi, Bummi - TOLL!!

Danke, sagt Detlef aus Lübeck!
(Das ging ja schnell)

_________________
ut vires desint, tamen est laudanda voluntas