|
-
Jun 13th, 2012, 02:16 PM
#1
'pin' to desktop
I've been googling for the past 1/2 hour with 1 result to a broken link. I'm making "Sticky Notes" and I want to be able to pin those stickies to the desktop. Sorta like a BottomMost function. Is there something like that I can use and if not, how would I even go about making a function that would keep my form on the desktop?
Edit - I'm not going to mark the thread resolved and I'll explain below, however this kinda works:
Code:
'Pins the program to the desktop
If saved = False Then
saved = True : PinToDesktopToolStripMenuItem.Checked = True : lblClose.Visible = False : Me.ShowInTaskbar = False
Else
saved = False : PinToDesktopToolStripMenuItem.Checked = False : lblClose.Visible = True : Me.ShowInTaskbar = True
End If
The reason I'm not going to mark it resolved is because if I click pin to desktop and the desktop isn't the application directly under my application then I have to minimize every program to get it to stay on the desktop.
Last edited by dday9; Jun 13th, 2012 at 02:59 PM.
-
Jun 13th, 2012, 03:14 PM
#2
Re: 'pin' to desktop
Search for GetDesktopWindow and SetParent API.
(Many other APIs are needed, but those 2 should help you getting started.)
-
Jun 14th, 2012, 01:47 AM
#3
Re: 'pin' to desktop
I don't really know what you mean my "pin" to desktop but based on your description, my instinct tells me to look up the SetWindowLong Win32 API. Maybe there is a constant/flag for it that can help do such a thing.
-
Jan 31st, 2013, 01:47 PM
#4
Re: 'pin' to desktop
What I believe is desired by the OP is (was ?) A bottommost API = His Form stays beneath all others.
I am not really thinking of multiple Sticky Notes, but probably could work for those as well.
I believe I have a solution for this.
Anyone interested ?
PS I just went to the top of this thread, to go up one level, and discovered this is VB.NOT
So I will retract my offer, as -
a) I hate VB.NOT
b) No doubt a VB6 solution won't work in VB.NOT
Last edited by Bobbles; Jan 31st, 2013 at 01:51 PM.
Reason: OOPs it is VB.NOT
-
Jan 31st, 2013, 06:13 PM
#5
Re: 'pin' to desktop
There is no need to do anything. Simply set the form property to not show in the taskbar and as other programs are activated it will sink to the bottom naturally with no way to bring it back. This is how Rainlendar and similar applications do it and I'm not sure that there's any alternative.
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
Feb 1st, 2013, 09:47 AM
#6
Re: 'pin' to desktop
Yeah, this was a resurection from June of last year. My solution is in my sticky notes link in my signature.
Edit - I'm sorry bobbles that you don't like vb.net, considering that it's been more than 12 years since vb6 has been replaced, have you tried using the power of the .net framework? I'm betting that you'll find a big boost in performance, if you don't use vb6 holdovers.
Last edited by dday9; Feb 1st, 2013 at 10:42 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|