Results 1 to 6 of 6

Thread: 'pin' to desktop

  1. #1

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,376

    '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.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  2. #2
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: 'pin' to desktop

    Search for GetDesktopWindow and SetParent API.

    (Many other APIs are needed, but those 2 should help you getting started.)
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  3. #3
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    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.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  4. #4
    Frenzied Member
    Join Date
    Dec 2008
    Location
    Melbourne Australia
    Posts
    1,487

    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

  5. #5
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    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!

  6. #6

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,376

    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.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width