Results 1 to 9 of 9
  1. #1
    deathninjak0's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    1,510
    Reputation
    12
    Thanks
    294
    My Mood
    Cool

    How to make your program minimize into the task bar?

    How do you make your program when you minimize it, it hides in the task bar.
    Thanks if you know

    Last edited by deathninjak0; 11-27-2009 at 09:08 AM.

  2. #2
    PoP_KiLLaH's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Watching Hentai
    Posts
    644
    Reputation
    17
    Thanks
    229
    My Mood
    Devilish
    Isn't it Hide? -.-

  3. #3
    deathninjak0's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    1,510
    Reputation
    12
    Thanks
    294
    My Mood
    Cool
    yeah...same thing

  4. #4
    Dark_Goliath's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Location
    Romania
    Posts
    308
    Reputation
    10
    Thanks
    28
    My Mood
    Sad

  5. #5
    deathninjak0's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    1,510
    Reputation
    12
    Thanks
    294
    My Mood
    Cool
    Are you spamming my thread or something?

  6. #6
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    -Rest in peace leechers-

    Your PM box is 100% full.

  7. The Following User Says Thank You to Zoom For This Useful Post:

    deathninjak0 (11-27-2009)

  8. #7
    Jerry12358's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    gdg
    Posts
    28
    Reputation
    10
    Thanks
    16
    My Mood
    Drunk

    Post

    Try:

    me.minimizebox()
    me.hide()
    If it doesn't work, then i don't know

  9. #8
    Lolland's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Lolland!
    Posts
    3,156
    Reputation
    49
    Thanks
    868
    My Mood
    Inspired
    I'm working on it.

    Final edit: This works:
    Code:
    'add a notify Icon
    
    Public Class Form1
        Inherits System.Windows.Forms.Form
    #Region " Minimize To System Tray "
        Structure RECT
            Public left As Integer
            Public top As Integer
            Public right As Integer
            Public bottom As Integer
        End Structure
    
        Structure APPBARDATA
            Public cbSize As Integer
            Public hWnd As IntPtr
            Public uCallbackMessage As Integer
            Public uEdge As ABEdge
            Public rc As RECT
            Public lParam As IntPtr
        End Structure
    
        Enum ABMsg
            ABM_NEW = 0
            ABM_REMOVE = 1
            ABM_QUERYPOS = 2
            ABM_SETPOS = 3
            ABM_GETSTATE = 4
            ABM_GETTASKBARPOS = 5
            ABM_ACTIVATE = 6
            ABM_GETAUTOHIDEBAR = 7
            ABM_SETAUTOHIDEBAR = 8
            ABM_WINDOWPOSCHANGED = 9
            ABM_SETSTATE = 10
        End Enum
    
        Enum ABNotify
            ABN_STATECHANGE = 0
            ABN_POSCHANGED
            ABN_FULLSCREENAPP
            ABN_WINDOWARRANGE
        End Enum
    
        Enum ABEdge
            ABE_LEFT = 0
            ABE_TOP
            ABE_RIGHT
            ABE_BOTTOM
        End Enum
    
        Public Declare Function SHAppBarMessage Lib "shell32.dll" Alias "SHAppBarMessage" (ByVal dwMessage As Integer, ByRef pData As APPBARDATA) As Integer
        Private Const ABM_GETTASKBARPOS As Integer = &H5&
        Private Const WM_SYSCOMMAND As Integer = &H112
        Private Const SC_MINIMIZE As Integer = &HF020
    
        Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
            If m.Msg = WM_SYSCOMMAND AndAlso m.WParam.ToInt32() = SC_MINIMIZE Then
                AnimateWindow(True)
                Exit Sub
            End If
            MyBase.WndProc(m)
        End Sub
    
        Private Sub NotifyIcon1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles NotifyIcon1.DoubleClick
            AnimateWindow(False)
        End Sub
    
        Private Sub AnimateWindow(ByVal ToTray As Boolean)
            Dim screenRect As Rectangle = Screen.GetBounds(Me.Location)
            Dim destPoint As Point
            Dim BarData As APPBARDATA
            BarData.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(BarData)
            SHAppBarMessage(ABMsg.ABM_GETTASKBARPOS, BarData)
            Select Case BarData.uEdge
                Case ABEdge.ABE_BOTTOM, ABEdge.ABE_RIGHT
                    destPoint = New Point(screenRect.Width, screenRect.Height)
                Case ABEdge.ABE_LEFT
                    destPoint = New Point(0, screenRect.Height)
                Case ABEdge.ABE_TOP
                    destPoint = New Point(screenRect.Width, 0)
            End Select
            Dim a, b, s As Single
            If ToTray Then
                a = 0
                b = 1
                s = 0.05
            Else
                a = 1
                b = 0
                s = -0.05
            End If
            Dim curPoint As Point, curSize As Size
            Dim startPoint As Point = Me.Location
            Dim dWidth As Integer = destPoint.X - startPoint.X
            Dim dHeight As Integer = destPoint.Y - startPoint.Y
            Dim startWidth As Integer = Me.Width
            Dim startHeight As Integer = Me.Height
            Dim i As Single
            For i = a To b Step s
                curPoint = New Point(startPoint.X + i * dWidth, startPoint.Y + i * dHeight)
                curSize = New Size((1 - i) * startWidth, (1 - i) * startHeight)
                ControlPaint.DrawReversibleFrame(New Rectangle(curPoint, curSize), Me.BackColor, FrameStyle.Thick)
                System.Threading.Thread.Sleep(15)
                ControlPaint.DrawReversibleFrame(New Rectangle(curPoint, curSize), Me.BackColor, FrameStyle.Thick)
            Next
            If ToTray Then
                Me.Hide()
                NotifyIcon1.Visible = True
            Else
    
                NotifyIcon1.Visible = False
                Me.Show()
            End If
        End Sub
    #End Region
    
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
        End Sub
    End Class
    I didn't make that code, I just fixed the bugs and made it look really cool
    Last edited by Lolland; 11-28-2009 at 02:32 PM.

  10. #9
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Quote Originally Posted by lolland View Post
    I'm working on it.

    Final edit: This works:
    Code:
    'add a notify Icon
    
    Public Class Form1
        Inherits System.Windows.Forms.Form
    #Region " Minimize To System Tray "
        Structure RECT
            Public left As Integer
            Public top As Integer
            Public right As Integer
            Public bottom As Integer
        End Structure
    
        Structure APPBARDATA
            Public cbSize As Integer
            Public hWnd As IntPtr
            Public uCallbackMessage As Integer
            Public uEdge As ABEdge
            Public rc As RECT
            Public lParam As IntPtr
        End Structure
    
        Enum ABMsg
            ABM_NEW = 0
            ABM_REMOVE = 1
            ABM_QUERYPOS = 2
            ABM_SETPOS = 3
            ABM_GETSTATE = 4
            ABM_GETTASKBARPOS = 5
            ABM_ACTIVATE = 6
            ABM_GETAUTOHIDEBAR = 7
            ABM_SETAUTOHIDEBAR = 8
            ABM_WINDOWPOSCHANGED = 9
            ABM_SETSTATE = 10
        End Enum
    
        Enum ABNotify
            ABN_STATECHANGE = 0
            ABN_POSCHANGED
            ABN_FULLSCREENAPP
            ABN_WINDOWARRANGE
        End Enum
    
        Enum ABEdge
            ABE_LEFT = 0
            ABE_TOP
            ABE_RIGHT
            ABE_BOTTOM
        End Enum
    
        Public Declare Function SHAppBarMessage Lib "shell32.dll" Alias "SHAppBarMessage" (ByVal dwMessage As Integer, ByRef pData As APPBARDATA) As Integer
        Private Const ABM_GETTASKBARPOS As Integer = &H5&
        Private Const WM_SYSCOMMAND As Integer = &H112
        Private Const SC_MINIMIZE As Integer = &HF020
    
        Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
            If m.Msg = WM_SYSCOMMAND AndAlso m.WParam.ToInt32() = SC_MINIMIZE Then
                AnimateWindow(True)
                Exit Sub
            End If
            MyBase.WndProc(m)
        End Sub
    
        Private Sub NotifyIcon1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles NotifyIcon1.DoubleClick
            AnimateWindow(False)
        End Sub
    
        Private Sub AnimateWindow(ByVal ToTray As Boolean)
            Dim screenRect As Rectangle = Screen.GetBounds(Me.Location)
            Dim destPoint As Point
            Dim BarData As APPBARDATA
            BarData.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(BarData)
            SHAppBarMessage(ABMsg.ABM_GETTASKBARPOS, BarData)
            Select Case BarData.uEdge
                Case ABEdge.ABE_BOTTOM, ABEdge.ABE_RIGHT
                    destPoint = New Point(screenRect.Width, screenRect.Height)
                Case ABEdge.ABE_LEFT
                    destPoint = New Point(0, screenRect.Height)
                Case ABEdge.ABE_TOP
                    destPoint = New Point(screenRect.Width, 0)
            End Select
            Dim a, b, s As Single
            If ToTray Then
                a = 0
                b = 1
                s = 0.05
            Else
                a = 1
                b = 0
                s = -0.05
            End If
            Dim curPoint As Point, curSize As Size
            Dim startPoint As Point = Me.Location
            Dim dWidth As Integer = destPoint.X - startPoint.X
            Dim dHeight As Integer = destPoint.Y - startPoint.Y
            Dim startWidth As Integer = Me.Width
            Dim startHeight As Integer = Me.Height
            Dim i As Single
            For i = a To b Step s
                curPoint = New Point(startPoint.X + i * dWidth, startPoint.Y + i * dHeight)
                curSize = New Size((1 - i) * startWidth, (1 - i) * startHeight)
                ControlPaint.DrawReversibleFrame(New Rectangle(curPoint, curSize), Me.BackColor, FrameStyle.Thick)
                System.Threading.Thread.Sleep(15)
                ControlPaint.DrawReversibleFrame(New Rectangle(curPoint, curSize), Me.BackColor, FrameStyle.Thick)
            Next
            If ToTray Then
                Me.Hide()
                NotifyIcon1.Visible = True
            Else
    
                NotifyIcon1.Visible = False
                Me.Show()
            End If
        End Sub
    #End Region
    
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    
        End Sub
    End Class
    I didn't make that code, I just fixed the bugs and made it look really cool
    Really advanced code
    -Rest in peace leechers-

    Your PM box is 100% full.

Similar Threads

  1. TUTORIAL: How to make your Windows 7 into Windows 7 Ultimate
    By Sir Nathan in forum General Hacking
    Replies: 7
    Last Post: 12-06-2010, 06:48 AM
  2. Replies: 13
    Last Post: 12-28-2009, 01:13 AM
  3. Replies: 6
    Last Post: 11-16-2009, 08:53 PM
  4. HOW TO make your charcater white in the game
    By LDS3196 in forum Combat Arms Hacks & Cheats
    Replies: 10
    Last Post: 07-31-2009, 01:29 PM
  5. How to make your own radiostation?
    By nasir91 in forum General
    Replies: 3
    Last Post: 04-30-2007, 07:25 AM

Tags for this Thread