Jump to content

Facing difficulty on setting same GUI size for different resolutions


Syed23
 Share

Recommended Posts

Hi All,

I have a machines where they have different screen resolutions, i have created a utility with a GUI which is not looking same in all machines. For example i have created a GUI with Label and Button and GUIRichEDit and TreeViews in my machine where i have normal resolutions. if i run the same code on another machine where i have high resolution then it shows the GUI different. is there a way to overcome this problem? Any suggestion? please let me know if you guys want any sample code!

Thank you,Regards,[font="Garamond"][size="4"]K.Syed Ibrahim.[/size][/font]

Link to comment
Share on other sites

You need to create a function that scales/proportions the dimensions you use according to the screen size, and pass all dimensions through this function before you use them to create any control or position anything...

You can use something like

Func ScaleWidth($pixels_x)
    Return $pixels_x * @DesktopWidth
EndFunc   ;==>ScaleWidth

Func ScaleHeight($pixels_y)
    Return $pixels_y * @DesktopHeight ; you might want to vary the desktopheight to take into account the windows status bar
EndFunc   ;==>ScaleHeight
Edited by DelStone
Link to comment
Share on other sites

Maybe you need something

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...