Results 1 to 14 of 14

Thread: Minimizing witout showing in TaskBar

  1. #1
    Guest

    Question

    Does any one know a way so that when you minimize any program (like netscape or IE) it doesnt show up in the task bar??

    -Steve

  2. #2
    Guest
    Set the Form's ShowInTaskBar property to False.

  3. #3
    Guest
    He means commercial programs that you didn't make.

    he gave examples... netscape, ie,

    damn, you are slow matthew....

    j/k



  4. #4
    Guest
    I dont mean a vb program. just any old program your running. are there any keystrokes so that when you minimize something it doesnt show in the taskbar.

    -Steve

  5. #5
    Guest
    Sorry Dennis. The window wasn't open, it was hot in my room so I just felt all stuffy. Wasn't paying attention .

    Damn, I wish I could be as smart you Dennis .

  6. #6
    Guest
    and so does everybody on this board, but you don't hear them bitching 'bout it.....


  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    lol, seems like Dennis is keeping the Smart Ass of the Year title next year too, hehe
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  8. #8
    Guest
    you're all just jealous because you wanna be as smart as me....

    and I have DSL......

    of other people would just realize how cool I am, the world would be a better place to live in....



  9. #9
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Originally posted by denniswrenn
    you're all just jealous because you wanna be as smart as me....
    YEP
    and I have DSL......
    And youre just jealous because i have cable, rolleyesrolleyesrolleyesrolleyesrolleyesrolleyes
    of other people would just realize how cool I am, the world would be a better place to live in....
    I haven't noticed anything yet!

    [/QUOTE]
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  10. #10
    Guest
    does anyone know the answer to my question??

    -Steve

  11. #11
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276

    Question ?


    I'm not sure why you want to do this, but there is a problem with what you are suggesting. If you minimize the program and it disappears in the taskbar, then there will be no immediate way to maximize or close the program. You will then have an unusable program occupying memory.


  12. #12
    Fanatic Member zmerlinz's Avatar
    Join Date
    May 2000
    Location
    in a world where the sun always shines on the bloody tv!!
    Posts
    604
    hi, the only thing that i can suggest is if when you minimise the program it minimises to the sys tray instead of the taskbar, here is some code that may help you

    Code:
    'Step-by-Step Example: 
    'Add the following code to the declarations section of a 'standard module in your project: 
    
    'user defined type required by Shell_NotifyIcon API call 
    Public Type NOTIFYICONDATA 
    cbSize As Long 
    hwnd As Long 
    uId As Long 
    uFlags As Long 
    uCallBackMessage As Long 
    hIcon As Long 
    szTip As String * 64 
    End Type 
    
    'constants required by Shell_NotifyIcon API call: 
    Public Const NIM_ADD = &H0 
    Public Const NIM_MODIFY = &H1 
    Public Const NIM_DELETE = &H2 
    Public Const NIF_MESSAGE = &H1 
    Public Const NIF_ICON = &H2 
    Public Const NIF_TIP = &H4 
    Public Const WM_MOUSEMOVE = &H200 
    Public Const WM_LBUTTONDOWN = &H201 'Button down 
    Public Const WM_LBUTTONUP = &H202 'Button up 
    Public Const WM_LBUTTONDBLCLK = &H203 'Double-click 
    Public Const WM_RBUTTONDOWN = &H204 'Button down 
    Public Const WM_RBUTTONUP = &H205 'Button up 
    Public Const WM_RBUTTONDBLCLK = &H206 'Double-click 
    
    Public Declare Function SetForegroundWindow Lib "user32" _ 
    (ByVal hwnd As Long) As Long 
    Public Declare Function Shell_NotifyIcon Lib "shell32" _ 
    Alias "Shell_NotifyIconA" _ 
    (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean 
    
    Public nid As NOTIFYICONDATA 
    
    
    
    'Add the following code to any form in your project that you want to respond to the System Tray Icon for your application: 
    
    Private Sub Form_Load() 
    'the form must be fully visible before calling Shell_NotifyIcon 
    Me.Show 
    Me.Refresh 
    With nid 
    .cbSize = Len(nid) 
    .hwnd = Me.hwnd 
    .uId = vbNull 
    .uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE 
    .uCallBackMessage = WM_MOUSEMOVE 
    .hIcon = Me.Icon 
    .szTip = "Your ToolTip" & vbNullChar 
    End With 
    Shell_NotifyIcon NIM_ADD, nid 
    End Sub 
    
    Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As 
    _ 
    Single, Y As Single) 
    'this procedure receives the callbacks from the System Tray icon. 
    Dim Result As Long 
    Dim msg As Long 
    'the value of X will vary depending upon the scalemode setting 
    If Me.ScaleMode = vbPixels Then 
    msg = X 
    Else 
    msg = X / Screen.TwipsPerPixelX 
    End If 
    Select Case msg 
    Case WM_LBUTTONUP '514 restore form window 
    Me.WindowState = vbNormal 
    Result = SetForegroundWindow(Me.hwnd) 
    Me.Show 
    Case WM_LBUTTONDBLCLK '515 restore form window 
    Me.WindowState = vbNormal 
    Result = SetForegroundWindow(Me.hwnd) 
    Me.Show 
    Case WM_RBUTTONUP '517 display popup menu 
    Result = SetForegroundWindow(Me.hwnd) 
    Me.PopupMenu Me.mPopupSys 
    End Select 
    End Sub 
    
    Private Sub Form_Resize() 
    'this is necessary to assure that the minimized window is hidden 
    If Me.WindowState = vbMinimized Then Me.Hide 
    End Sub 
    
    Private Sub Form_Unload(Cancel As Integer) 
    'this removes the icon from the system tray 
    Shell_NotifyIcon NIM_DELETE, nid 
    End Sub 
    
    Private Sub mPopExit_Click() 
    'called when user clicks the popup menu Exit command 
    Unload Me 
    End Sub 
    
    Private Sub mPopRestore_Click() 
    'called when the user clicks the popup menu Restore command 
    Me.WindowState = vbNormal 
    Result = SetForegroundWindow(Me.hwnd) 
    Me.Show 
    End Sub 
    
    
    
    'Make the following Property Settings on the same form to which you added the above code: 
    
    'Property Required Setting for System Tray example 
    '--------------------------------------------------------------- 
    'Icon = The icon you want to appear in the system tray. 
    'Minbutton = True 
    'ShownInTaskbar = False 
    
    
    
    'Add the following Menu items to the same form using the Menu Editor: 
    
    'Caption Name Enabled Visible Position 
    '--------------------------------------------------------- 
    &SysTray mPopupSys True False Main Level 
    &Restore mPopRestore True True Inset one 
    &Exit mPopExit True True Inset one 
    
    
    
    'You can add additional menu items as needed. 
    'System Tray Flexibility 
    'You can modify the ToolTip that appears over the System Tray icon by changing the following line in the Form_Load procedure: 
    
    .szTip = "Your ToolTip" & vbNullChar 
    'Replace "Your ToolTip" with the text that you want to appear. 
    
    'You can modify the Icon that appears in the System Tray by changing the following line in the Form_Load procedure: 
    
    .hIcon = Me.Icon 
    'Replace Me.Icon with any Icon in your project. 
    
    'You can change any of the System Trays settings at any time after the use of the NIM_ADD constant by reassigning the values in the nid variable and then using the following variation of the Shell_NotifyIcon API call: 
    
    Shell_NotifyIcon NIM_MODIFY, nid. 
    'However, if you want a different form to receive the callback, then you will need to delete the current icon first using "Shell_NotifyIcon NIM_Delete, nid" as the NIM_Modify function will not accept a new Hwnd, or you will need to add another Icon to the systray for the new form using "Shell_NotifyIcon NIM_ADD, nid" after refilling the nid type with the new forms Hwnd. You can also declare separate copies of the nid type for each form that you want to display an icon for in the Windows System Tray and change them in each form's activate event using the NIM_DELETE and NIM_ADD sequence.
    incase you were wondering why there are nos pelling mistakes i got this from msdn

    hope it helps

    Merlin

    Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
    -- Linus Torvalds

    [Galahtech.com] | [My Site] | [Fishsponge] | [UnixForum.co.uk]

  13. #13
    Guest
    First off, why the hell did that one post have no word wrapping and second of all, my VB teacher wanted to know how to do this since he caught some kid playing games in the middle of VB Class. oh and Dennis, i have a cable modem too.

    -Steve

  14. #14
    Guest
    Why would he need to know how to do this if he cought a kid playing games?

    the post had no word wrapping to keep the format of a code so it doesn't screw up

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