Sign in to follow this  
Followers 0
kschwart

GUI with title and minimise only

1 post in this topic

I want to create a GUI window with a title up against the left of the title bar (no icon) and a minimise icon on the right. (An icon must display in the system tray).

I have been able to create a GUI with an icon on the left and a close icon on the right.

I found some other resources on this forum and they explained how to make the close icon minimise instead of close as follows:

$msg = GUIGetMsg()

Select

case $msg = $GUI_EVENT_CLOSE

GUISetState(@SW_MINIMIZE)

EndSelect

1. I assume that there is some way to change the graphic by using GUICtrlSetGraphic, but Ihaven't been able to find the control id that I should use. Is there a control ID that will allow this?

2. Also I haven't been able to get rid of the left hand icon. Is there some way to do this?

3. Also I want this window to 'hug' a 100 x 100 jpg image I seem to be able to size the window correctly in the Y plane, but I can't seem to get it smaller than about 130 in the X plane.

One of the many create GUI commands that I have tried is:

GUICreate("ID",100,100,0,0,$WS_SYSMENU,$WS_EX_TOPMOST) ; will create a gui that when displayed is top left front

Why do I want to do this?

The script sits in the system tray until a named window is open, and then parses text from that window to determine a photo to display in front of all other windows. While the named window is open the photo is visible, but if the named window is closed or doesn't have a valid photo, the photo window becomes hidden and is only visible in the system tray (so that the user can exit if necessary). If the user finds the photo is in the way the user should be able to minimise the window, but not accidentaly exit the script. The compiled script will be started automaticaly when the workstation is started.

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  
Followers 0