Jump to content
Sign in to follow this  
wafuh

gui resizing

Recommended Posts

hello everybody!!

I am making a program using AUTOIT

Im quite new to this tool so i want to ask all the expert out there

i just want to ask if you guys know a GUIcontrol that can adapt automatically to any computers screen resolution when

AUTOIT program is run

please please help me on this!

thanks a lot in advance!

Share this post


Link to post
Share on other sites

@wafuh, please don't post questions at the end of an thread and don't double post .......

- split off your post into a new thread

Share this post


Link to post
Share on other sites

i just want to ask if you guys know a GUIcontrol that can adapt automatically to any computers screen resolution when

AUTOIT program is run

The answer will entirely depend on what you mean by "adapt"...

Do you want the window to be bigger on machines with higher resolution? Do you want the individual buttons to be bigger? Do you want the fonts to be bigger? Input boxes? List boxes?

It all really boils down to something like this:

There are two built-in macros that will tell you the resolution of the screen: @DesktopHeight and @DesktopWidth. You can use these just like a variable, meaning you can do math with them. Thus, if you wanted your window to be 1/4 the size of the desktop resolution, you could do something like:

$intWindowWidth = round(@DesktopWidth * .25,0)
$intWindowHeight = round(@DesktopHeight * .25,0)

$objWindow  = GUICreate("My Window",$intWindowWidth,$intWindowHeight)
GUISetState()

That will create window centered on the desktop that is 25% (one-quarter) the resolution of the screen. You can do similar things with GUICtrlCreate items as well.

Share this post


Link to post
Share on other sites

Hi,

to adapt the relative display size of the window, do what Albuquerquefx wrote.

For the GuiControls browse the helpfile for 'GUICtrlSetResizing' and 'GUIResizeMode' !

Greetz

Greenhorn

Share this post


Link to post
Share on other sites

im so sorry.. that was my first day in the forum and i dont know yet where to post new

and when i found out i can make new topic, it was not yet acvtivated

but dont worry it wont happen again

i can now make new post

thanks

@wafuh, please don't post questions at the end of an thread and don't double post .......

- split off your post into a new thread

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...