Re: Make Form stay on top until application is deactivated
From: Randy Birch (rgb_removethis_at_mvps.org)
Date: 01/18/05
- Next message: Tom Esh: "Re: Make Form stay on top until application is deactivated"
- Previous message: Ken Wickes [MSFT]: "Re: Make Form stay on top until application is deactivated"
- In reply to: Ken Wickes [MSFT]: "Re: Make Form stay on top until application is deactivated"
- Next in thread: Tom Esh: "Re: Make Form stay on top until application is deactivated"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 17 Jan 2005 20:15:43 -0500
That sounds no different that specifying the Owner parameter in VB's Show
statement ...
form2.show vbmodeless, form1
This will make it topmost to the app - albeit not modal - and allow other
apps to appear over it.
-- Randy Birch MS MVP Visual Basic http://vbnet.mvps.org/ "Ken Wickes [MSFT]" <kenwic@online.microsoft.com> wrote in message news:eIufYKO$EHA.2876@TK2MSFTNGP12.phx.gbl... : CreateWindow hwndParent arg will set the owner for a top-level window. See : this from MSDN : : "Handle to the parent or owner window of the window being created. To create : a child window or an owned window, supply a valid window handle. This : parameter is optional for pop-up windows. " : : I agree it is confusing but the param and the GetWindowLong field are : overloaded. They do mean parent for child windows and owner for top-level : windows. : : : -- : : Ken Wickes [MSFT] : This posting is provided "AS IS" with no warranties, and confers no rights. : : : "Tom Esh" <tjeshGibberish@suscom.net> wrote in message : news:g2nlu01oko3sm9k00hjdaih8cr95ieqfrl@4ax.com... : > On Sun, 16 Jan 2005 12:43:36 -0800, "Ken Wickes [MSFT]" : > <kenwic@online.microsoft.com> wrote: : > : >>Setting the owner of an existing window sounds a little dangerous to me. : > : > Hi Ken, : > : > Never had a problem with it. AFIK the owner / owned relationship (not : > to be confused with parent / child BTW) effects only the zorder and : > visibility behavior. I've found the SDK docs to be sometimes confusing : > with regard to owner/owned vs parent/child relationships since they : > often use the terms interchangably (and incorrectly). For example the : > the defined name of the GWL_HWNDPARENT constant used with : > Get/SetWindowlong would imply that it relates to parent/child, when in : > fact it does not. (A more appropriate name choice would have been : > GWL_HWNDOWNER.) Using SetParent OTOH is a different story and caution : > would definitely be advisable :-) : > : >>Can't you just set the parent/owner param of CreateWindow or whatever the : >>VB : >>equivalent is? : > CreateWindow's hwndParent arg is entirely different as it set's the : > parent (not the owner). If you're referring to the Ownerform argument : > to VB's show statement, I can't see how it's useful in this case : > because it only accepts a Form object. My guess is behind the scenes : > it's calling SetWindowLong with GWL_HWNDPARENT anyway, which AFIK is : > the only way the API provides to set the owner. : > : > : > -Tom : > MVP - Visual Basic : > (please post replies to the newsgroup) : :
- Next message: Tom Esh: "Re: Make Form stay on top until application is deactivated"
- Previous message: Ken Wickes [MSFT]: "Re: Make Form stay on top until application is deactivated"
- In reply to: Ken Wickes [MSFT]: "Re: Make Form stay on top until application is deactivated"
- Next in thread: Tom Esh: "Re: Make Form stay on top until application is deactivated"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|