Reducing Desktop Area

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amitkgupta28
    New Member
    • Apr 2009
    • 7

    Reducing Desktop Area

    Hello friends,

    I am creating a side bar application like Vista Widgets for Windows XP. How can I reduce the active desktop area so that whenever a new or old window get maximized it occupy the remaining space of screen only.

    Thanks in advance.

    Regards,
    Amit
  • amitkgupta28
    New Member
    • Apr 2009
    • 7

    #2
    How to create shAppBar in .NET

    How can we create an App Bar while working in .NET framework?


    I am using Visual C++

    Comment

    • tlhintoq
      Recognized Expert Specialist
      • Mar 2008
      • 3532

      #3
      What do you mean by "App Bar" ? Like a place for several applications to go when they are off work? Have a couple drinks... shoot some pool...

      Or more correctly... What is an "app bar", to you?

      Comment

      • amitkgupta28
        New Member
        • Apr 2009
        • 7

        #4
        Seems like you have a good sense of humor :)

        You must have seen some side bar application like Google Tool Bar which stick themselves to right side, and whenever you maximize other windows they occupy the remaining space only.

        Like task bar is one example.

        Comment

        • tlhintoq
          Recognized Expert Specialist
          • Mar 2008
          • 3532

          #5
          Since your two posts are essentially the same thing I've merged the threads. This helps avoid duplicate posts or answers from different people that don't work off of each other's input.

          How can we create an App Bar while working in .NET framework?
          This is really a VERY broad question. The volunteers here really don't get into laying out an entire solution for free. This would be the 'engineering' part of 'software engineer'. Basically it's like asking someone to architect your new home design for free so you can just come in and just do the carpentry and follow their plans.

          We more help people with specific coding problems they've run in to. Generally people make an effort on their own first, by doing some research, doing some trial-and-error learning/experimentation . Then when they run into a problem they post the offending code and ask for help.

          Comment

          • BoxerVR4
            New Member
            • Jan 2010
            • 1

            #6
            re: Reducing Desktop Area

            Wow what a waste of a response... anyways heres the code to change the work area of the primary screen..


            Enum SPI
            SPI_SETWORKAREA = &H2F
            End Enum

            Enum SPIF
            None = &H0
            SPIF_UPDATEINIF ILE = &H1 ' Writes the new system-wide parameter setting to the user profile.
            SPIF_SENDCHANGE = &H2 ' Broadcasts the WM_SETTINGCHANG E message after updating the user profile.
            SPIF_SENDWININI CHANGE = &H2 ' Same as SPIF_SENDCHANGE .
            End Enum

            Structure RECT
            Public Left As Integer
            Public Top As Integer
            Public Right As Integer
            Public Bottom As Integer
            End Structure

            <DllImport("use r32", SetLastError:=T rue, CharSet:=CharSe t.Auto)> _
            Public Shared Function SystemParameter sInfo( _
            ByVal intAction As Integer, _
            ByVal intParam As Integer, _
            ByVal strParam As RECT, _
            ByVal intWinIniFlag As Integer) As Integer
            ' returns non-zero value if function succeeds
            End Function

            Public Function SetWorkArea(ByV al area As RECT) As Integer
            Dim intReturn As Integer = Nothing
            Dim intError As Integer = Nothing

            intReturn = SystemParameter sInfo(SPI.SPI_S ETWORKAREA, 0, area, SPIF.SPIF_UPDAT EINIFILE Or SPIF.SPIF_SENDC HANGE)
            intError = Marshal.GetLast Win32Error()

            If intReturn = 0 Then
            Return 0
            Else
            Return intError
            End If
            End Function

            Comment

            Working...