r2dak Posted January 9, 2013 Posted January 9, 2013 (edited) hi every one sorry for this stupid question I've just finished my first autoit program which is working properly the only problem is that whenever i run my program it appear near to top right corner, first i thought that it will happen only on my computer, but when i tried it on other computers it appeared on the same location as mine how can i make it appear in middle of the screen PS: Sorry for my bad english Edited January 9, 2013 by r2dak [center][font=comic sans ms,cursive]PEACE & LOVE[/font][/center]
telmob Posted January 9, 2013 Posted January 9, 2013 (edited) try something like this: $Formwidth = 280 $Formheight = 168 $Form = GUICreate("GUI", 280, 168, @DesktopWidth/2 - $Formwidth/2, @DesktopHeight/2 - $Formheight/2) Edited January 9, 2013 by telmob r2dak 1
r2dak Posted January 9, 2013 Author Posted January 9, 2013 (edited) WOW thanks Polymath it worked Edited January 9, 2013 by r2dak [center][font=comic sans ms,cursive]PEACE & LOVE[/font][/center]
telmob Posted January 9, 2013 Posted January 9, 2013 ahahah, you're welcome. but my name is Telmo r2dak 1
hannes08 Posted January 9, 2013 Posted January 9, 2013 Or: $Form = GUICreate("GUI", 280, 168, -1, -1) r2dak and telmob 2 Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]
r2dak Posted January 9, 2013 Author Posted January 9, 2013 (edited) ahahah, you're welcome. but my name is Telmo Thank you Telmo Or: $Form = GUICreate("GUI", 280, 168, -1, -1) thank you this is much more simpler Edited January 9, 2013 by r2dak [center][font=comic sans ms,cursive]PEACE & LOVE[/font][/center]
Moderators JLogan3o13 Posted January 9, 2013 Moderators Posted January 9, 2013 (edited) r2dak, this is where reading the help file really comes in handy. If you look at the help file section for GuiCreate, you'll see that the left and top parameters are optional. If you want a GUI to appear in the middle of the screen, just don't define them. So, this:$Form = GUICreate("GUI", 280, 168, -1, -1)Is the same as this:$Form = GUICreate("GUI", 280, 168) Hope that makes more sense to you Edited January 9, 2013 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now