Announcement

Collapse
No announcement yet.

How to hide my apps dialogs on task bar?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to hide my apps dialogs on task bar?

    My program has an icon that sits in the system tray... when I minimise my program, I want it to remove its 'button' from the task bar, and then when it is restored again the button should come back. both a MSDN, POFFS and online search yielded no fruits... in VB its just a matter of one line so im assuming there's just one or two API calls behind it - but which, I'm not sure
    Code:
    CallBack Function DlgProc
    ON ERROR RESUME NEXT
       Select Case CbMsg
        CASE %WM_SIZE
           Select Case CBwparam
                  Case %SIZE_MINIMIZED
                       'remove our apps button from task bar
                  CASE %SIZE_RESTORED
                       'restore our apps button to task bar


    ------------------
    -

  • #2
    Check out DIALOG SHOW STATE in the Help File. Using %SW_HIDE will hide the Task Bar button as well as the dialog itself, and %SW_SHOW will bring it back.

    -- Eric


    ------------------
    Perfect Sync Development Tools
    Perfect Sync Web Site
    Contact Us: mailto:[email protected][email protected]</A>

    [This message has been edited by Eric Pearson (edited March 04, 2001).]
    "Not my circus, not my monkeys."

    Comment


    • #3
      Try "ShowWindow CHNDL, %SW_HIDE"
      and "ShowWindow CHNDL, "%SW_SHOW"


      ------------------
      Check out my free software at http://www.lexacorp.com.pg

      Comment


      • #4
        DOALOG SHOW encapsulates ShowWindow(), but if you are using DDT, then we recommend that you use the DDT statements where possible to ensure the DDT engine is "synchronized" with the true state of the dialog.

        BTW, in the last message above, CHNDL should actually be entered as CBHNDL.

        ------------------
        Lance
        PowerBASIC Support
        mailto:[email protected][email protected]</A>
        Lance
        mailto:[email protected]

        Comment


        • #5
          Ahhh geez... I had a feeling it was going to be as simple as that. That works perfectly. Thanks all for making me feel stupid and getting me back to work

          ------------------
          -

          Comment

          Working...
          X