Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Always on top

Posted on 1999-06-28
5
Medium Priority
?
296 Views
Last Modified: 2010-05-02
I know how to make a form always on top...is it possible to for another application to always be on top? ( ie. another application running concurrently )?
0
Comment
Question by:dapump
[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
  • 4
5 Comments
 
LVL 2

Accepted Solution

by:
BeedleGuis earned 100 total points
ID: 1520371
yes . . just use the same setwindowpos api call using that applications window handle.  Let me know if you need more details.
0
 

Author Comment

by:dapump
ID: 1520372
How would i grab that application's handle?
0
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1520373
use one of the getwindow, getforgroundwindow.  What do you know about the application's window before you need to make the csll?  Haven't tried it yet, but I think you can use getdesktopwindow, the use getwindow passing the desktop windows handle and GW_FINDFIRST for the wcmd, then use the handle returned from that to call getwindowtext, compare the returned string to the applications title, use getwindow with that windows handle and GW_HWNDNEXT for the wcmd until the lpstring from getwindowtext = the applications title.  I'll write the routine if you want to up the points.
0
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1520374
oops that GW_CHILD for the getwindow call with the desktops handle.
0
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1520375
or if you want to do it the easy way:

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

handle = findwindow(vbnullstring,AppTitle)


forgot about this function

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
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…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

715 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