Solved

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

Posted on 1998-09-17
3
204 Views
Last Modified: 2008-02-01
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.
0
Comment
Question by:BillyBob
  • 2
3 Comments
 
LVL 2

Expert Comment

by:MelissaC
ID: 1435431
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?

0
 
LVL 2

Accepted Solution

by:
MelissaC earned 50 total points
ID: 1435432
Alright, here is the answer from the VB guide:

-------------------
The "Visible" Property


Returns or sets a value indicating whether an object is visible or hidden.
Syntax
object.Visible [= boolean]
      ..
The Visible property syntax has these parts:
Part      Description

object      An object expression that evaluates to an object in the Applies To list.
boolean      A Boolean expression specifying whether the object is visible or hidden.
      ..
Settings
The settings for boolean are:
Setting      Description

True      (Default) Object is visible.
False      Object is hidden.
      ..
Remarks
To hide an object at startup, set the Visible property to False at design time. Setting this property in code enables you to hide and later redisplay a control at run time in response to a particular event.
Note   Using the Show or Hide method on a form is the same as setting the form's Visible property in code to True or False, respectively.  <----- I think that's what you wanted to know...
-------
About TOPMOST etc:
Windows uses some kind of ZOrder to determine which windows overlap other windows (or controls). The topmost window is on top of all the other windows. a NOTOPMOST window is not. It's as easy as that. You could look in the Visual Basic Books online how to play with the ZOrder. Most control have the ZOrder property.

0
 

Author Comment

by:BillyBob
ID: 1435433
frm.show remembers the last focus position, frm.true does not.
Is there other differences?
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now