473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Keeping a VB.Net Window in foreground

I have a VB.Net windows application which must look as if it was
embedded in a larger windows application. The 2nd application will not
allow embedding of a VB.Net application - only ActiveX. This means that
the VB.Net application must be called as an EXE.

I need the VB.Net window to remain in the foreground, even when the
larger application gets focus. It's fairly easy to bring the window to
the foreground when some event occurs, but it's another matter to keep
it there all the time.

I think there's probably a simple way to do this but I don't know it.

Frank Maxey

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
4 5922
Set form TopMost property to true.

HTH,

Shane

<fdmaxey> wrote in message news:eT**************@TK2MSFTNGP10.phx.gbl...
I have a VB.Net windows application which must look as if it was
embedded in a larger windows application. The 2nd application will not
allow embedding of a VB.Net application - only ActiveX. This means that
the VB.Net application must be called as an EXE.

I need the VB.Net window to remain in the foreground, even when the
larger application gets focus. It's fairly easy to bring the window to
the foreground when some event occurs, but it's another matter to keep
it there all the time.

I think there's probably a simple way to do this but I don't know it.

Frank Maxey

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #2

<fdmaxey> wrote in message news:eT**************@TK2MSFTNGP10.phx.gbl...
I have a VB.Net windows application which must look as if it was
embedded in a larger windows application. The 2nd application will not
allow embedding of a VB.Net application - only ActiveX. This means that
the VB.Net application must be called as an EXE.

I need the VB.Net window to remain in the foreground, even when the
larger application gets focus. It's fairly easy to bring the window to
the foreground when some event occurs, but it's another matter to keep
it there all the time.

I think there's probably a simple way to do this but I don't know it.


No, not really. SStory's suggestion will keep the app on top of ALL windows,
not just the 2nd application, so I don't think it's what you want. I think
your best bet would be to use the SetParent() API function to make your .NET
app an "owned window" of the 2nd app.
Nov 20 '05 #3
Thanks! I new it was something embarrassingly simple. I just didn't
know where to look.

Frank Maxey

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #4
This is true it will be topmost of all....

Shane

"Jeff Johnson [MVP: VB]" <i.***@enough.spam> wrote in message
news:uJ**************@TK2MSFTNGP12.phx.gbl...

<fdmaxey> wrote in message news:eT**************@TK2MSFTNGP10.phx.gbl...
I have a VB.Net windows application which must look as if it was
embedded in a larger windows application. The 2nd application will not
allow embedding of a VB.Net application - only ActiveX. This means that
the VB.Net application must be called as an EXE.

I need the VB.Net window to remain in the foreground, even when the
larger application gets focus. It's fairly easy to bring the window to
the foreground when some event occurs, but it's another matter to keep
it there all the time.

I think there's probably a simple way to do this but I don't know it.
No, not really. SStory's suggestion will keep the app on top of ALL

windows, not just the 2nd application, so I don't think it's what you want. I think
your best bet would be to use the SetParent() API function to make your ..NET app an "owned window" of the 2nd app.

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Brian Kitt | last post by:
I don't know where to ask this question. If you know of a better place to ask it, please let me know. I have a main web page containing many links to detail pages. All detail links open with...
11
by: objectref | last post by:
Hi to all, is there a way to get the window handle of the main window of an application or process ? For example, if someone opens Microsoft Word, he gets a window so he/she can write text....
0
by: Tom | last post by:
Here is a very strange problem that I am stumped by. I have a rather large application written in VB.NET (of course) using Framework 1.1. As you know, with an MDI application you can have multiple...
8
by: Tom | last post by:
I am using VB.NET to control another program. I have the program's window hwnd; however, I need to be able to set the focus to that other programs window so I can send it some keystrokes. I thought...
3
by: Carl Fenley | last post by:
I am trying to capture the Windows QueryCancelAutoPlay message that is sent to the "foreground window" when an AutoRun enabled CD is inserted into a drive. Enabling and Disabling AutoRun...
1
by: Terry Olsen | last post by:
In my chat application, I create a new window for each private chat. I use the FlashWindowEx API to flash the window if it's not the Foreground window. I determine the Foreground window using the...
6
by: Jen | last post by:
I've implemented single-instance functionality in my .exe by using the mutex method. Works great. But when the .exe detects that it is not the first instance I want to bring the main window of...
1
by: kia | last post by:
Is there any way with JavaScript(I mean programmatically) that we can open the window as a new foreground tab, every time a new tabbed window is opened? For example, like IE7, when user clicks a...
2
by: niros | last post by:
Hi, I am working with 2 softwares (2 process). Sometimes, when process A pop's up an MDI window, If I will scroll the mouse wheel on it, it will scroll (and send the needed WM) process B. If I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.