I have been trying to edit it and strip it but theres just to much calling etc to really strip it to just one popup without all the options.
I went coding myself and now have this:
Code:
Const ABM_GETTASKBARPOS = &H5
Dim ok As Integer
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Type APPBARDATA
cbSize As Long
hwnd As Long
uCallbackMessage As Long
uEdge As Long
rc As RECT
lParam As Long
End Type
Private Declare Function SHAppBarMessage Lib "shell32.dll" (ByVal dwMessage As Long, pData As APPBARDATA) As Long
Private Sub Form_Load()
Timer1.Enabled = True
Timer2.Enabled = False
Timer3.Enabled = False
Dim ABD As APPBARDATA
SHAppBarMessage ABM_GETTASKBARPOS, ABD
Me.Move ScaleX((CInt(Trim(ABD.rc.Right)) - ScaleX(Me.Width, 1, 3)), 3, 1), ScaleX((CInt(Trim(ABD.rc.Top)) - ScaleX(Me.Height, 1, 3)), 3, 1) + Me.Height
ok = Me.Top
End Sub
Private Sub Timer1_Timer()
Dim ABD As APPBARDATA
SHAppBarMessage ABM_GETTASKBARPOS, ABD
Dim Aimlength As Integer
If Me.Top > ok - 345 Then
Me.Top = Me.Top - 10
End If
If Me.Top < ok - 345 Then
Timer1.Enabled = False
Timer2.Enabled = True
Timer3.Enabled = False
End If
End Sub
Private Sub Timer2_Timer()
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = True
End Sub
Private Sub Timer3_Timer()
Dim ABD As APPBARDATA
SHAppBarMessage ABM_GETTASKBARPOS, ABD
Dim Aimlength As Integer
If Me.Top < ok Then
Me.Top = Me.Top + 10
End If
If Me.Top > ok Then
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
End If
End Sub
This DOES work pretty good but there's just one problem.
It doesnt come ontop of all my other programs i have opened up
Like internet etc
When i went searching for a solution i found how to make a form stay ontop of all the others.
i implented it. Worked..
But all my forms of the program came on top! gah ><
So when i was browsing arround the internet and the notification came on top.
My main form came on top to.. this is not what i wanted to happen and i dont know how to fix it ;S
Have you had a look at the example in post #46 of that thread?
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu. https://get.cryptobrowser.site/30/4111672
Here is a really basic one. It uses the SysInfo control to get the proper WorkArea dimensions but you could replace this with API calls.
It handles the "on top" requirement I think. It also queues requests and shows them serially instead of doing any fancy "stacking" of toast windows. Push the "Request PopUp" button multiple times to see this.
You could do a lot to pretty this up. I ended up going with a borderless Form here because under Aero (Vista or later) the Width and Height of a fixed size Form are unreliable, due to extra border padding the VB6 program doesn't "see."
I don't claim elegance, but it should be easy to use.
Last edited by dilettante; Apr 3rd, 2010 at 05:24 PM.
Reason: Minor change
Here is a really basic one. It uses the SysInfo control to get the proper WorkArea dimensions but you could replace this with API calls.
It handles the "on top" requirement I think. It also queues requests and shows them serially instead of doing any fancy "stacking" of toast windows. Push the "Request PopUp" button multiple times to see this.
You could do a lot to pretty this up. I ended up going with a borderless Form here because under Aero (Vista or later) the Width and Height of a fixed size Form are unreliable, due to extra border padding the VB6 program doesn't "see."
I don't claim elegance, but it should be easy to use.
Wow thats great! : D
Just downloaded it and reading through the source.
Just noticed that when im not focused on the program but on something else
Popups overlap the taskbar .. ;(
Hope i can fix it! ( or you :P coz i dont really know how its made )
Thanks for the source!
I'm not sure why the toast popups would overlap the taskbar. That doesn't happen here.
I made a small change that requires another API call to find the Taskbar hWnd and arrange the toast Form just beind that instead of "on top." Maybe that will fix it.
If you want stacking things get more complicated.
If the existing code is hard to understand then you might be better off using the CodeBank version. Sometimes you just have to use the provided code without looking at it or changing it. You'd have a heart attack if you looked at what goes on in something like a RichTextBox or even a TextBox.