Jump to content

gui resizing


wafuh
 Share

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!

Link to comment
Share on other sites

  • Developers

@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

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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.

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...