Results 1 to 3 of 3

Thread: Hide/Show windows

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Posts
    46

    Post

    Hi, i only want to know how to hide and show windows by API or windows-messages.

    I want to hide the window completely: from task-bar, system-tray and off course the desktop.


    Please message me,
    Kiron.

  2. #2
    Junior Member
    Join Date
    Mar 2000
    Location
    India, Visakhapatnam
    Posts
    19

    Post Show Windows

    Hai Kiron,
    it is easy to show or hide windows from the desktop by using the API ShowWindow with constants like SW_HIDE or SW_MINIMIZE or SW_SHOWNORMAL or SW_SHOW but to remove it from the task bar or systray is little bit difficult. i dont think it is possible to remove it from systray since only the application that keeps it will be able to remove it while it can be removed from taskbar. i dont know how i am working on it.

    Reply to
    <[email protected]>
    Dinesh
    reply to
    <[email protected]>

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

    Post Sample Code

    Dim dl As Long
    Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

    Private Const SW_SHOWMAXIMIZED = 3
    Private Const SW_SHOWMINIMIZED = 2
    Private Const SW_SHOWNORMAL = 1
    Private Const SW_HIDE = 0


    Private Command1_Click ()
    'Hide the Window
    dl = ShowWindow(Me.hwnd, SW_HIDE)
    End Sub

    Private Command2_Click ()
    'Show the Window
    dl = ShowWindow(Me.hwnd, SW_SHOWNORMAL)
    End Sub

    Private Command3_Click ()
    'Minimized the Window
    dl = ShowWindow(Me.hwnd, SW_SHOWMINIMIZED)
    End Sub

    Private Command4_Click ()
    'Maximized the Window
    dl = ShowWindow(Me.hwnd, SW_SHOWMAXIMIZED)
    End Sub

    Hope thsi can resolve your problem.

    Edited by Chris on 03-11-2000 at 02:43 PM

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