You are correct with the z-order.  And the user form will have a button
that will execute methods.  The user form should be modeless.  

 

Maybe the best example is MS Word and CTRL+F.  The find dialogue box
will always be on top of MS Word.  It executes commands.  But if another
application is open, it will be topmost to all applications.

-dh-

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thom C. Blackwell
Sent: Tuesday, April 15, 2008 11:47 AM
To: [email protected]
Subject: RE: [Talk] findwindow and setparent functions

 

Greetings,

Before I go answering... what you want is to build a VB form that will
stay over the app you're connected to with Boston WorkStation.   However
if a user pops up a third, or more applications the z-order should be:

Another app

                Your Screen        

                                Connected app

So your screen & connected app are like a single application from a z
order standpoint.

Am I correct that the VB form could execute Boston WorkStation methods?
(that will preclude the need for some windows API calls)

 

I believe I've done the above - but it'll take me more time to track
that example down than the last... let me know if I am on the right
track.

 

Am I correct that the VB form could execute Boston WorkStation methods?
(that will preclude the need for some windows API calls)

 

Regards,

Thom

 

 

Thom C. Blackwell

Product Manager

Boston Software Systems

(866) 653-5105 ex 807

www.bossoft.com <http://www.bossoft.com/> 

Sign up for my weekly webinar!
<http://www.bostonworkstation.com/customer_center/special_events.aspx> 

 

LEGAL NOTICE Unless expressly stated otherwise, this message is
confidential and may be privileged. It is intended for the addressee(s)
only. Access to this E-mail by anyone else is unauthorized. If you are
not an addressee, any disclosure or copying of the contents of this
E-mail or any action taken (or not taken) in reliance on it is
unauthorized and may be unlawful. If you are not an addressee, please
inform the sender immediately, then delete this message and empty from
your trash.

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hayes, Daniel
Sent: Tuesday, April 15, 2008 10:54 AM
To: [email protected]
Subject: RE: [Talk] findwindow and setparent functions

 

This works really well to make the user form topmost.  I think .NET has
a property to do this making things a lot easier.  Is there a way to
make this topmost to the application I am connecting to?  I tried to use
findwindow and setparent.  Here is what I have in the code:

 

'user form

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA"
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Declare Function SetParent Lib "user32.dll" (ByVal hWndChild As
Long, ByVal hWndNewParent As Long) As Long

 

Private Sub UserForm_Activate()

Dim h As Long

'find windows handle of user form

h = FindWindow(vbNullString, Me.Caption)

 

'set form as a child to parent google

SetParent h, hWndGoogle

End Sub

 

'main script module

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA"
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Dim hWndGoogle As Long

 

Sub Main()

Shell_ http://www.google.com/

'find windows handle of google

hWndGoogle = FindWindow(vbNullString, "Google - Windows Internet
Explorer")

End Sub

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thom C. Blackwell
Sent: Monday, April 14, 2008 4:41 PM
To: [email protected]
Subject: RE: [Talk] findwindow and setparent functions

 

Greetings,

Seen this done before - here's some code I just tried that worked:

'Paste me into the Form in the Declarations

 

h

 

------------------------------------------------------------

Just in case someone asks about doing this  with a user form in VBA...
this links to an example in the script library - its moderately more
difficult to do in the VBA environment because you don't have me.Hwnd
like you do in a VB form.

 

http://www.bostonworkstation.com/customer_center/script_center/script_de
tails.aspx?id=206&cat=21

 

Regards,

Thom

 

 

Thom C. Blackwell

Product Manager

Boston Software Systems

(866) 653-5105 ex 807

www.bossoft.com <http://www.bossoft.com/> 

Sign up for my weekly webinar!
<http://www.bostonworkstation.com/customer_center/special_events.aspx> 

 

LEGAL NOTICE Unless expressly stated otherwise, this message is
confidential and may be privileged. It is intended for the addressee(s)
only. Access to this E-mail by anyone else is unauthorized. If you are
not an addressee, any disclosure or copying of the contents of this
E-mail or any action taken (or not taken) in reliance on it is
unauthorized and may be unlawful. If you are not an addressee, please
inform the sender immediately, then delete this message and empty from
your trash.

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Hayes, Daniel
Sent: Monday, April 14, 2008 4:28 PM
To: [email protected]
Subject: [Talk] findwindow and setparent functions

 

Does anyone have any experience using the findwindow and setparent
functions in VB6?

 

I have a modeless user form.  I want the form to float on top of a web
application.  The functionality I want is similar to the 'solution
explorer' or 'properties' windows in visual studio.  The form will
always stay on top of just the parent.  Any help is appreciated.

 

Danny Hayes

Level III Engineer

Streamline Health

 

________________________________


Spam <http://192.168.20.55/canit/b.php?i=1206448&m=81dd0ce3c7a5&c=s> 
Not spam <http://192.168.20.55/canit/b.php?i=1206448&m=81dd0ce3c7a5&c=n>

Forget previous vote
<http://192.168.20.55/canit/b.php?i=1206448&m=81dd0ce3c7a5&c=f> 

--------------------------------------------------------------------
The information contained in this e-mail message is intended by
Streamline Health for the use of the individual or entity to which
it is addressed and may contain information that is privileged,
confidential and protected from disclosure under applicable law.
If the reader of this message is not the intended recipient, or an
employee or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you received this email in error, please notify us immediately by
replying to the message and deleting it from your computer.

 

________________________________


Spam <http://192.168.20.55/canit/b.php?i=1207237&m=363f0b3d8917&c=s> 
Not spam <http://192.168.20.55/canit/b.php?i=1207237&m=363f0b3d8917&c=n>

Forget previous vote
<http://192.168.20.55/canit/b.php?i=1207237&m=363f0b3d8917&c=f> 

--------------------------------------------------------------------
The information contained in this e-mail message is intended by
Streamline Health for the use of the individual or entity to which
it is addressed and may contain information that is privileged,
confidential and protected from disclosure under applicable law.
If the reader of this message is not the intended recipient, or an
employee or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you received this email in error, please notify us immediately by
replying to the message and deleting it from your computer.

Reply via email to