Jump to content
Sign in to follow this  
Syed23

Facing difficulty on setting same GUI size for different resolutions

Recommended Posts

Syed23

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]

Share this post


Link to post
Share on other sites
DelStone

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

Share this post


Link to post
Share on other sites
martin

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.

Share this post


Link to post
Share on other sites
Syed23

Thanks Martin! Let me check how does it work for me :oops:

Edited by Syed23

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

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  

×