Desktop Sticky Form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hdbbdh
    New Member
    • Dec 2008
    • 24

    Desktop Sticky Form

    Hello everyone,

    Can someone help me to make a desktop sticky form, always on the back not on top.
    I try to search on internet but I did not find anything.
    Please help.

    Thank you
  • CroCrew
    Recognized Expert Contributor
    • Jan 2008
    • 564

    #2
    Hello hdbbdh,

    This is more of a “could someone create an application for me” question.

    After you give it a try first yourself and find that you are not getting the results that you are looking for then please post your code here and we will be happy to provide you with a solution to your coding problems.

    <cough /><cough />

    <hint /><hint />

    Happy Coding,
    CroCrew~

    Comment

    • hdbbdh
      New Member
      • Dec 2008
      • 24

      #3
      Hello CroCrew,

      Thanks for your responding.
      As you see, I submitted this question in vb.net section, and I reached before for the same link that you mention, but I don’t find anything written in vb.net.
      This question is not like "could someone create an application for me", because I am asking about a tip only, and I tried to find anything on internet, but unfortunately I found nothing.
      Please note that I am not a proffesional programmer, because if I am proffesional I will not ask.

      Thanks and Best Regards

      Comment

      • CroCrew
        Recognized Expert Contributor
        • Jan 2008
        • 564

        #4
        Hello hdbbdh,

        Your question is worded:

        Can someone help me to make a desktop sticky form, always on the back not on top. I try to search on internet but I did not find anything. Please help.”


        My reply had a tip in it, a link to an article called “A Desktop Sticky Notes Application in the .NET Framework 2.0”. So what that it is not written in vb.net?

        You’re looking to create an application that would not be tasked to a novice programmer. Can it be done by a novice programmer? YES. But, it is going to be painful at first because as you see there are not many examples out there.

        So, if you are going to proceed with this endeavor then you’re going to have to learn more then what you’re comfortable with to date. I understand now that you’re not a programmer because you just told us so. But, even a “professio nal programmer” needs help for time to time. Every programmer is continually learning something new with each application they develop.

        Again; if you still want to take on this project; pull up your boots and quit with the copouts. Learn something new today.

        All the best,
        CroCrew~

        Comment

        • hdbbdh
          New Member
          • Dec 2008
          • 24

          #5
          Hello everyone,

          The best code that I can do is something like the following:

          Code:
          Imports System.Runtime.InteropServices
          
          Public Class Form1
              Public Const HWND_BOTTOM = 1
              Public Const SWP_NOSIZE = &H1
              Public Const SWP_NOMOVE = &H2
              Public Const SWP_NOACTIVATE = &H10
          
              <DllImport( _
              "user32.dll", _
              CharSet:=CharSet.Auto, _
              CallingConvention:=CallingConvention.StdCall _
              )> _
              Public Shared Function SetWindowPos( _
              ByVal hWnd As IntPtr, _
              ByVal hWndInsertAfter As IntPtr, _
              ByVal X As Int32, _
              ByVal Y As Int32, _
              ByVal cx As Int32, _
              ByVal cy As Int32, _
              ByVal uFlags As Int32) _
              As Boolean
              End Function
          
              Protected Overrides Sub OnActivated(ByVal e As System.EventArgs)
                  MyBase.OnActivated(e)
          
                  Dim b As Boolean = SetWindowPos( _
                  Me.Handle, New IntPtr(HWND_BOTTOM), _
                  0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE Or SWP_NOACTIVATE)
              End Sub
          End Class
          The problem now when I press WinLogo+D (Show Desktop), the form become minimized, and it must be in normal state, then any idea for correction?

          Comment

          • tlhintoq
            Recognized Expert Specialist
            • Mar 2008
            • 3532

            #6
            Make it a Vista/Win7 gadget.

            Comment

            • hdbbdh
              New Member
              • Dec 2008
              • 24

              #7
              Thank you tlhintoq for your help.
              I don't know about this technology, but I will study it and I will come back.
              Thank you again.

              Comment

              • searock
                New Member
                • Mar 2010
                • 9

                #8
                Well in that case you can use a timer to determine the WindowState and set it to normal if it is minimized.

                Comment

                Working...