Link to home
Start Free TrialLog in
Avatar of BillyBob
BillyBob

asked on

frm.visible.false, frm.hide, notopmost ---what diff.

What the difference between

1)frm.visible=false
2)frm.hide
3) Call SetWindowPos(Me.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)

Of course theres also show, true, top

I'm confused as to which to use all the time

Please Do not answer unless a complete explanation is included.
Avatar of MelissaC
MelissaC

1. frm.visible=false makes the frame invisible.
2. frm.hide hides the window
(I think one of the above cannot receive windows messages, I don't exactly know, I'll find out in a minute...)
3. SetWindowPos (HWND_NOTOPMOST) makes the window "Not topmost"
If a window is TOPMOST, it will always be on top of all the other windows that are not TOPMOST, even if the window is not active. When the window is NOTOPMOST, it will still be visible. (gray titlebar in stead of blue).

What do you want to do with your window?

ASKER CERTIFIED SOLUTION
Avatar of MelissaC
MelissaC

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of BillyBob

ASKER

frm.show remembers the last focus position, frm.true does not.
Is there other differences?