473,382 Members | 1,349 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,382 software developers and data experts.

Determine Which Form You Have Lost Focus To

Hi,

ive just had to make a Find dialog for an application and to get it in a
similar style to the MS ones i have had to set the control style to TopMost
so that i can move the caret around whilst the find dialog is open. However
i want to know when i lose the focus, if it ISNT the form that called my
find dialog, i want to change the topmost style to a normal style so that it
wont be displayed on top of the other form.
Does that make sense? If there is a better way of howto go about doing that
doesnt hesitate to mention it.

Thanks

Mark
Nov 15 '05 #1
2 3745

"Mark Ingram" <ma*********@nexsan.com> wrote in message
news:vN****************@newsfe3-win.server.ntli.net...
Hi,

ive just had to make a Find dialog for an application and to get it in a
similar style to the MS ones i have had to set the control style to TopMost so that i can move the caret around whilst the find dialog is open. However i want to know when i lose the focus, if it ISNT the form that called my
find dialog, i want to change the topmost style to a normal style so that it wont be displayed on top of the other form.
Does that make sense? If there is a better way of howto go about doing that doesnt hesitate to mention it.

Thanks

Mark


I would check to see if one of the overloaded methods of ShowDialog couldn't
be used to make the framework do that for you. Then you pass a reference to
the form when you show the find box using .ShowDialog. Anyway, I haven't
done it, just that I'd look at that.

HTH,
Eric
Nov 15 '05 #2
I think you have mis-understood what i meant. Using ShowDialog() will not
allow any focus on the form that called the dialog, my needs are to allow
focus on that form, and that form only. In effect, opposite of the
ShowDialog() function. If i change focus to say outlook from my app, it
should stop the find dialog from being top most.

Look at notepad, see how when you open up the find dialog box it allows you
to carry on working in the background of notepad? That is what i want to
implement.

Cheers

Mark
"Eric Eggermann >" <<none> wrote in message
news:Ob**************@TK2MSFTNGP12.phx.gbl...

"Mark Ingram" <ma*********@nexsan.com> wrote in message
news:vN****************@newsfe3-win.server.ntli.net...
Hi,

ive just had to make a Find dialog for an application and to get it in a
similar style to the MS ones i have had to set the control style to TopMost
so that i can move the caret around whilst the find dialog is open.

However
i want to know when i lose the focus, if it ISNT the form that called my
find dialog, i want to change the topmost style to a normal style so

that it
wont be displayed on top of the other form.
Does that make sense? If there is a better way of howto go about doing that
doesnt hesitate to mention it.

Thanks

Mark


I would check to see if one of the overloaded methods of ShowDialog

couldn't be used to make the framework do that for you. Then you pass a reference to the form when you show the find box using .ShowDialog. Anyway, I haven't
done it, just that I'd look at that.

HTH,
Eric

Nov 15 '05 #3

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

Similar topics

4
by: pizzy | last post by:
INTRO: I tried to clean it up for easy reading. I hope I didn't make any mistakes. PROBLEM: WOW, this is some crazy sh!t. I can't get my checkbox (see "TAGSELECTED") to print my textboxes (see...
1
by: hzgt9b | last post by:
I want to determine the back color that treeview node takes on when selected... its some blue value but I haven't been able to determine what it is... The reason that I ask is that when the...
3
by: Carl | last post by:
Hi, I have a from called frmBatchUpdate. On it I have created 10 text boxes in one column txtTRN1, txtTRN2 etc.. (Tenancy Reference Numbers) and another 10 to the right txtRPA1, txtRPA2 etc.....
13
by: M O J O | last post by:
Hi, I need to create a popup form what will not steal focus. I've searched the net and I managed to put some code together. Below is the result of my code, but I have a single question .......
2
by: ghobley | last post by:
Hello, My application has 2 forms on display at one time. The form on the left contains a tree view which drives the contents of the form on the right. My problem is that I would like to capture...
4
by: easoftware | last post by:
I am using VS .Net 2003 and VB. I have an app with one parent and two Mdi child forms. I need to validate data in the Mdi form. The Form.Validating event works when I try to close a Mdi form,...
4
by: vandanasridhar | last post by:
Hi, its Vandana. I m a begginer of VB, Trying to create a form Having three command buttons Add, Modify, Exit. I made coding & it is running well, but technically not very sound. I use lost focus...
10
by: John Brown | last post by:
Hi there, Does anyone know how to (generically) determine the currently active form for an application using a "static" function (so I can call it from anywhere). There is no offiical way I've...
6
tuxalot
by: tuxalot | last post by:
braindead here...can't find a resolution to what should be a silly issue. I have a pop-up calendar form that I wish to close when the user clicks back on the main form of my app. I've tried...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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...

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.