odklizec Posted March 5, 2005 Share Posted March 5, 2005 (edited) Hi guys. Before you tell me "read help!" or something like that I already read the AutoIt help, searched this forum and I was able to create an application with hidden tray and task bar icon. So there is not a problem with that. But there is a problem if I use a message box inside that app. The application is running as a child window of another application. When the message box is started a button with icon is shown in task bar and it's hidden when the message box is closed. But I really don't like this behavior. Do you think there is a solution (except to create my own MsgBox via custom GUI)? Thank you in advance for any suggestion! Here is the code of my app (only the necessary required code). Simply run it (no button/icon is shown) and press the button (button in task bar is shown)..#NoTrayIcon #include <GUIConstants.au3> $handle = WinGetHandle("Welcome!") GUICreate("Test app...", 135, 160, -1, -1,$DS_MODALFRAME,$WS_EX_TOOLWINDOW,$handle) $button1= GUICtrlCreateButton("1", 5, 5, 30, 30) GuiSetState() ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() Select Case $msg = $button1 MsgBox(4096, "Title", $handle) EndSelect If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Edited March 5, 2005 by odklizec Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 5, 2005 Share Posted March 5, 2005 ........... [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
odklizec Posted March 5, 2005 Author Share Posted March 5, 2005 ...........<{POST_SNAPBACK}>hehe..another idea? Link to comment Share on other sites More sharing options...
jdickens Posted March 7, 2005 Share Posted March 7, 2005 My idea is pretty bad... Have the message box be another script, which is called by the first. It will share the message box result as a file or somesuch. J If I am too verbose, just say so. You don't need to run on and on. Link to comment Share on other sites More sharing options...
odklizec Posted March 9, 2005 Author Share Posted March 9, 2005 Thanks for your idea, but I don't think it will work. The problem is that MsgBox always create a button in task bar Link to comment Share on other sites More sharing options...
CyberSlug Posted March 14, 2005 Share Posted March 14, 2005 Everything except the timeout parameter:_MsgBoxEx(4096,"Example","Message box without a taskbar button!") Exit Func _MsgBoxEx($flag, $title, $text) $dummy = GuiCreate("Dummy") Local $result = DllCall("user32.dll", "int", "MessageBox", "hwnd", $dummy, _ "str", $text, "str", $title, "int", $flag) GuiDelete($dummy) Return $result[0] EndFunc Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
jdickens Posted March 14, 2005 Share Posted March 14, 2005 Ha! That's sweet. The old System modal dialog. J If I am too verbose, just say so. You don't need to run on and on. Link to comment Share on other sites More sharing options...
odklizec Posted March 14, 2005 Author Share Posted March 14, 2005 Everything except the timeout parameter:_MsgBoxEx(4096,"Example","Message box without a taskbar button!") Exit Func _MsgBoxEx($flag, $title, $text) $dummy = GuiCreate("Dummy") Local $result = DllCall("user32.dll", "int", "MessageBox", "hwnd", $dummy, _ "str", $text, "str", $title, "int", $flag) GuiDelete($dummy) Return $result[0] EndFuncGreat!! It's exactly what I look for! Thank you! Just one thing..do you think there is an option to change the MsgBox title bar icon? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now