robertcollier4 Posted June 7, 2013 Share Posted June 7, 2013 (edited) Does anyone know of any existing pieces of code or UDFs that could achieve the following without me having to rewrite this from scratch? I'm looking for a way to display transparent overlay messages on the screen that would automatically fade out after 5 seconds or after any keyboard-mouse activity. Further, it would be nice if I could click on a tray and see a window with a log of all previously displayed messages (in case I was away from the computer and want to check if any messages popped up which I might have missed). The design and user interface experience comes from:http://www.azarask.in/blog/post/monolog_boxes_and_transparent_messages/http://humanized.com/weblog/2006/09/11/monolog_boxes_and_transparent_messages/ It’s simply a large and translucent message that’s displayed over the contents of your screen. They fade away when the user takes any action (like typing or moving the mouse). In practice, the message is both noticeable yet unobtrusive. And because the message is transparent, you can see what’s beneath... Edited June 19, 2013 by robertcollier4 Link to comment Share on other sites More sharing options...
FireFox Posted June 7, 2013 Share Posted June 7, 2013 It's feasible. If no one link an existing UDF I can make it for you. (yes I said make it as I'm friendly atm) Link to comment Share on other sites More sharing options...
robertcollier4 Posted June 7, 2013 Author Share Posted June 7, 2013 I wasn't able to find anything like this existing from searching. What would be the best way, GDI? Link to comment Share on other sites More sharing options...
FireFox Posted June 7, 2013 Share Posted June 7, 2013 Not necessarily. I will check it out. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 7, 2013 Moderators Share Posted June 7, 2013 robertcollier4,While FireFox is busy, have you seen my Notify UDF? Although not exactly what you are looking for it might be suitable with a bit of modification - and I am also feeling friendly and ready to do it! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Solution FireFox Posted June 7, 2013 Solution Share Posted June 7, 2013 (edited) Here you go : expandcollapse popup#include <WindowsConstants.au3> #include <StaticConstants.au3> #region GUI Global $hGUI_Main = GUICreate("") Global $hGUI_Child = GUICreate("MyGUI", 400, 70, -1, -1, $WS_POPUP, $WS_EX_TOPMOST, $hGUI_Main) GUISetBkColor(0x000000, $hGUI_Child) Local $iMyLabel = GUICtrlCreateLabel("Good news Dave, I can do that.", 0, 0, 400, 70, BitOR($SS_CENTER, $SS_CENTERIMAGE)) GUICtrlSetColor($iMyLabel, 0xFFFFFF) GUICtrlSetFont($iMyLabel, 17) _GuiRoundCorners($hGUI_Child, 0, 0, 7, 7) WinSetTrans($hGUI_Child, "", 0) GUISetState(@SW_SHOW, $hGUI_Child) #endregion For $i = 0 To 150 Step 8 WinSetTrans($hGUI_Child, "", $i) Sleep(10) Next AdlibRegister("_Exit", 5000) While 1 Sleep(1000) WEnd Func _GuiRoundCorners($hWnd, $iLeftRect, $iTopRect, $iWidthEllipse, $iHeightEllipse) Local $aPos = 0, $aRet = 0 $aPos = WinGetPos($hWnd) $aRet = DllCall("gdi32.dll", "long", "CreateRoundRectRgn", "long", $iLeftRect, "long", $iTopRect, "long", $aPos[2], "long", $aPos[3], "long", $iWidthEllipse, "long", $iHeightEllipse) If Not @error And $aRet[0] Then $aRet = DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $hWnd, "long", $aRet[0], "int", 1) If Not @error And $aRet[0] Then Return 1 EndIf Return 0 EndFunc ;==>_GuiRoundCorners Func _Exit() AdlibUnRegister("_Exit") For $i = 150 To 0 Step -4 WinSetTrans($hGUI_Child, "", $i) Sleep(10) Next GUIDelete($hGUI_Main) Exit EndFuncEdit: Added indents.Note: Don't forget to take a look at Melba's UDF, you should find some good inspirations Br, FireFox. Edited June 7, 2013 by FireFox robertcollier4 and mesale0077 2 Link to comment Share on other sites More sharing options...
robertcollier4 Posted June 7, 2013 Author Share Posted June 7, 2013 (edited) Fantastic, thanks guys!! Melba's UDF seems exactly the kind of thing I was looking for except that it does not allow for a transparent background, the notification seems to have a small border around the edge, and the notification box cannot be rounded. With Firefox's code, it looks exactly the way I wanted (and as described in Aza Raskin's article). Thanks! Edited June 7, 2013 by robertcollier4 Link to comment Share on other sites More sharing options...
FireFox Posted June 7, 2013 Share Posted June 7, 2013 You are welcome 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