Solved

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

Posted on 1998-09-17
3
217 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 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

690 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