Results 1 to 2 of 2

Thread: Post Message API .......

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2000
    Posts
    16

    Question

    (1) I have code that during form_Initialize minimizes all applications via this line:

    Call PostMessage(lngHwnd, WM_COMMAND, MIN_ALL, 0&)

    (I found this code snippet in an older post here at VBWorld)

    Next I want just my app to appear in it's normal state. I can get a handle on my app BUT what are the values that I have to pass to PostMessage for this happen?

    (2) Can you please tell me of any API value resources, i.e., tables of values, with descriptions?

    Thanks a million.



  2. #2
    Guest
    Q1:

    I have posted the MinimizeAll/RestoreAll code before and if you've noticed, it does minimize your program as well. You can restore just your program if you want though.


    Code:
    Private Sub RestoreMe(frm As Form)
    'Use this after you minimize all to restore only your program
      Dim lngHwnd As Long
      lngHwnd = findwindow(frm.hwnd, vbNullString)
      Call PostMessage(lngHwnd, WM_COMMAND, MIN_ALL_UNDO, 0&)
    End Sub
    Q2:

    API Resources:

    http://www.vbapi.com
    http://www.allapi.net
    http://www.microsoft.com

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