?
Solved

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

Posted on 1998-09-17
3
Medium Priority
?
225 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 150 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Suggested Courses
Course of the Month10 days, 3 hours left to enroll

762 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