Maximizing a dialog

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Rory
Pro Scripter
Posts: 50
Joined: Thu Mar 23, 2006 2:50 pm
Location: Wisconsin

Maximizing a dialog

Post by Rory » Mon Apr 24, 2006 4:48 pm

Is it possible to force a Dialog to open in the maximized state?

Rory

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon Apr 24, 2006 5:26 pm

If the dialog is modal it could be done but it would be complicated. If the dialog is non-modal, just add a WindowAction> line. Here's a sample script:


Dialog>Dialog1
Caption=Test Dialog
Width=287
Height=154
Top=57
Left=469
Edit=msEdit1,50,24,191,This is a test
Button=Ok,104,64,75,25,5
EndDialog>Dialog1

Show>dialog1
WindowAction>1,Test Dialog

Label>ActionLoop
GetDialogAction>dialog1,r1
If>r1=2,exit
If>r1=5,continue
Wait>0.01
Goto>ActionLoop

Label>continue
/////Do stuff
Mdl>Work... work... work...

Label>exit


Hope this is helpful,
Dick

Rory
Pro Scripter
Posts: 50
Joined: Thu Mar 23, 2006 2:50 pm
Location: Wisconsin

Post by Rory » Mon Apr 24, 2006 5:35 pm

Thanks much,
That is exactly what I was looking for.

Rory

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts