Results 1 to 5 of 5

Thread: Somebody can make this ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Location
    Guadalajara, Jalisco, Mex
    Posts
    105

    Exclamation

    I like to make a Program in VB that can make a window ( or program )dissapeared from the window's task bar, but the program keep loaded.
    (Sorry my english)

  2. #2
    Hyperactive Member
    Join Date
    Jan 2000
    Posts
    355
    set the form's ShowInTaskbar property to false and it doesnt appear in the taskbar..
    buzzwords are the language of fools

  3. #3
    Lively Member
    Join Date
    Nov 1999
    Location
    Cincinnati, OH
    Posts
    66
    I you are shelling the program, yoo could declare a variable as an object, set it equal to shell(progid...)
    then set the objects visible property to false

  4. #4
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Thumbs up ShowWindow will do

    Is this what you mention?

    Code:
    Public Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
    Public Const SW_SHOWNORMAL = 1
    Public Const SW_HIDE = 0
    Public hWnd As Long
    
    Public Sub HideWnd(ByVal strWnd As String)
        hWnd = FindWindow(0&, strWnd)
        If hWnd <> 0 Then ShowWindow hWnd, SW_HIDE
    End Sub
    Public Sub ShowWnd(ByVal strhWnd As String)
        hWnd = FindWindow(0&, strhWnd)
        If hWnd <> 0 Then
            ShowWindow hWnd, SW_SHOWNORMAL
        End If
    End Sub
    
    'Useage
    Private Sub Command1_Click()
        HideWnd "<Your Application Window Title>"
    End Sub
    
    Private Sub Command2_Click()
     ShowWnd "<Your Application Window Title>"
    End Sub

  5. #5
    New Member
    Join Date
    Dec 2000
    Location
    Madrid, Spain
    Posts
    3
    I think this could be ....

    Code:
    Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
    Private Declare Function RegisterServiceProcess Lib "kernel32" (ByVal dwProcessID As Long, ByVal dwType As Long) As Long
    
    Private Sub Form_Initialize()
    Dim lI As Long
    Dim lJ As Long
    
        lI = GetCurrentProcessId()
        ' 1 To see it visible y 0 not visible
        lJ = RegisterServiceProcess(lI, 1)
    
    End Sub

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