Sign in to follow this  
Followers 0
ashley

GUI Dissaper when i right click.

15 posts in this topic

ok well ita a very small gui that appears on your task bar, but when u right click on the task bar it dissapers any ideas here my code:

CODE
;Include constants

#include <GUIConstants.au3>

#NoTrayIcon

$GUI = GUICreate("", 100, 25, @DesktopWidth- 300, @DesktopHeight -27, BitOR($WS_POPUP,$WS_CLIPSIBLINGS), 0x00000088)

;Set color (black)

GUISetBkColor(0x000000)

;set the text - No more than 10 chars

$Label1 = GUICtrlCreateLabel("Test", 25, 5, 60, 17)

;pick the color

GUICtrlSetColor(-1, 0xFFFFFF)

;choose an icon

$Icon1 = GUICtrlCreateIcon("C:\WINDOWS\system32\shell32.dll", -160, 8, 5, 15, 15, BitOR($SS_NOTIFY,$WS_GROUP))

;Show window/Make the window visible

GUISetState(@SW_SHOW)

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

WEnd

If you can fix it that would help.

Share this post


Link to post
Share on other sites



haha :D @Ashley...i dont know why it does that... :P weird...but its kinda cool actually O.O

Share this post


Link to post
Share on other sites

thanks, if you have norton anti-virus then you will know that it don't happen with that but does with mine. any ways of making it check if it being shown and if its not make it show again.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Hmm...maybe you need to keep the GUI active after you've clicked.

Something deletes the GUI...because...i checked my process list..and i had 7 autoit3.exe's :D

Edited by Swift

Share this post


Link to post
Share on other sites

FWIW, the graphic is still there. It's just hidden behind the taskbar.

Share this post


Link to post
Share on other sites

hehe wierd :D

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

ashley - I found out what is wrong when I set the task bar to auto-hide - your gui is being covered up by the task-bar. I found out using this modification of your code:

;Include constants
HotKeySet("{ESC}", "EXIT_MYScript")
#include <GUIConstants.au3>
#NoTrayIcon


$GUI = GUICreate("", 100, 25, @DesktopWidth - 300, @DesktopHeight - 27, $WS_POPUP);BitOR($WS_POPUP, $WS_CLIPSIBLINGS), BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))

;Set color (black)
GUISetBkColor(0x000000)

;set the text - No more than 10 chars
$Label1 = GUICtrlCreateLabel("Test", 25, 5, 60, 17)

;pick the color
GUICtrlSetColor(-1, 0xFFFFFF)

;choose an icon
$Icon1 = GUICtrlCreateIcon("C:\WINDOWS\system32\shell32.dll", -160, 8, 5, 15, 15, BitOR($SS_NOTIFY, $WS_GROUP))

;Show window/Make the window visible
GUISetState(@SW_SHOW)
WinSetOnTop($GUI, "", 1)
While 1
    $nMsg = GUIGetMsg()
;GUISetState(@SW_SHOW)
    Sleep(80)
;Switch $nMsg
;   Case $GUI_EVENT_CLOSE
;       Exit
;EndSwitch
WEnd

Func EXIT_MYScript()
    Exit
EndFunc

The GUI doesn't disappear, it gets covered up by the task-bar which, I guess, won't let any other windows cover it up, if it isn't set to auto-hide.

Edited by Squirrely1

Das Häschen benutzt Radar

Share this post


Link to post
Share on other sites

wow...actually a great idea!

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

I had some free time so I did this

;Include constants
#include <GUIConstants.au3>
#NoTrayIcon


$GUI = GUICreate("Gui1", 100, 25, @DesktopWidth- 300, @DesktopHeight -27, BitOR($WS_POPUP,$WS_CLIPSIBLINGS), 0x00000088)

;Set color (black)
GUISetBkColor(0x000000)

;set the text - No more than 10 chars
$Label1 = GUICtrlCreateLabel("Test™", 25, 5, 60, 17)

;pick the color
GUICtrlSetColor(-1, 0xFFFFFF)

;choose an icon
$Icon1 = GUICtrlCreateIcon("C:\WINDOWS\system32\shell32.dll", -160, 8, 5, 15, 15, BitOR($SS_NOTIFY,$WS_GROUP))

;Show window/Make the window visible
GUISetState(@SW_SHOW)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
    $state = WinGetState("Gui1")
    If BitAnd($state, 2) Then WinSetOnTop("Gui1", "", 1)
WEnd

Works good for me!! :P

Edit: this was what you wanted ashley, right?? :D

Edited by TzarAlkex

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