473,407 Members | 2,312 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,407 software developers and data experts.

Focus on a form

Hi

Does anybody know of a way of preventing a form from receiving the focus?
Okay, I know I can do it via a ShowDialog call in another form but what if I
don't want to use that technique.

My problem is that I'm displaying a form in the middle of another form. When
I click the outer form, the inner form disappears. I don't want this to
happen. How can I do this without using ShowDialog?

Ta

Phil
Nov 21 '05 #1
4 1211

Hi,.

This is one way: In the LostFocus event handler of the second form, have
Me.Focus()

Not sure this is what you are looking for.

"Phil" <putitinthepost@nowhere> wrote in message
news:41***********************@news.dial.pipex.com ...
Hi

Does anybody know of a way of preventing a form from receiving the focus?
Okay, I know I can do it via a ShowDialog call in another form but what if I
don't want to use that technique.

My problem is that I'm displaying a form in the middle of another form. When
I click the outer form, the inner form disappears. I don't want this to
happen. How can I do this without using ShowDialog?

Ta

Phil

Nov 21 '05 #2
Why do you not want to use showdialog? You can try the topmost property of
the inner form. Set that to true, see if that does the trick for you.

Chris
"Phil" <putitinthepost@nowhere> wrote in message
news:41***********************@news.dial.pipex.com ...
Hi

Does anybody know of a way of preventing a form from receiving the focus?
Okay, I know I can do it via a ShowDialog call in another form but what if
I don't want to use that technique.

My problem is that I'm displaying a form in the middle of another form.
When I click the outer form, the inner form disappears. I don't want this
to happen. How can I do this without using ShowDialog?

Ta

Phil

Nov 21 '05 #3
Hi Chris

I'm just curious on how to do it without showdialog. Thanks for the
suggestion.

Phil

"Chris, Master of All Things Insignificant" <chris@No_Spam_Please.com> wrote
in message news:e2*************@TK2MSFTNGP14.phx.gbl...
Why do you not want to use showdialog? You can try the topmost property
of the inner form. Set that to true, see if that does the trick for you.

Chris
"Phil" <putitinthepost@nowhere> wrote in message
news:41***********************@news.dial.pipex.com ...
Hi

Does anybody know of a way of preventing a form from receiving the focus?
Okay, I know I can do it via a ShowDialog call in another form but what
if I don't want to use that technique.

My problem is that I'm displaying a form in the middle of another form.
When I click the outer form, the inner form disappears. I don't want this
to happen. How can I do this without using ShowDialog?

Ta

Phil


Nov 21 '05 #4
Thanks Shiva

"Shiva" <sh******@online.excite.com> wrote in message
news:O4**************@TK2MSFTNGP14.phx.gbl...

Hi,.

This is one way: In the LostFocus event handler of the second form, have
Me.Focus()

Not sure this is what you are looking for.

"Phil" <putitinthepost@nowhere> wrote in message
news:41***********************@news.dial.pipex.com ...
Hi

Does anybody know of a way of preventing a form from receiving the focus?
Okay, I know I can do it via a ShowDialog call in another form but what if
I
don't want to use that technique.

My problem is that I'm displaying a form in the middle of another form.
When
I click the outer form, the inner form disappears. I don't want this to
happen. How can I do this without using ShowDialog?

Ta

Phil

Nov 21 '05 #5

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

Similar topics

5
by: tshad | last post by:
I have a date validation function that I want to stay at the object I am validating if there is a Validation error, but it always goes to the next object. The Javascript: function...
17
by: Neil Ginsberg | last post by:
OK, this is a stupid thing, but I can't seem to get this to work. I have a form with a subform (in continuous form view). A combo box on the main form has code in the AfterUpdate event which adds a...
8
by: copyco | last post by:
I want to be able to test if my app's form has focus, (ie: not in background, behind other windows). How can I do this? I tried the Me.Focused, but that doesn't work. I think it's because a...
5
by: Tosch | last post by:
I have a usercontrol with a label, a textbox, a treeview, a grid and a couple of checkboxes. The usercontrol is hosted on a form together with a cancel and a accept button. This form is used to...
4
by: Aung Thu | last post by:
Hi, there! I want to set focus on a control, of which TabIndex is not the first, when a form is loaded. In the form's load event, I have used Control.Focus() but it doesn't not work. The focus...
3
by: jab3 | last post by:
Hello. I"m new to this group, and to JavaScript in general, so please forgive me if I breach local etiquette. I'm trying to implement some client-side 'dynamic' validation on a form. I'm having...
2
by: Sid Price | last post by:
Is there a way of stopping a form getting focus in VB.NET. The scenario I have is a main form and a form used for display only. There are no user controls on the display form and it does not ever...
6
by: =?Utf-8?B?U2NvdHQgTGFt?= | last post by:
Hi, I have a VB.NET form with a bunch of controls in it . The focus is in one of the controls , (i.e. a textbox), is there any way to click on the form itself and make the textbox lose focus and...
3
by: jan.loucka | last post by:
Hi, I looked around for this specific problem but could not find any answer - there's few things in VB but still nothing exactly like this so I'd appreciate any help. We're writing C# WinForm...
2
by: Joergen Bech | last post by:
Hope someone has a solution or some suggestions for this. This cannot be right?!? Problem: I have multiple non-modal forms open at the same time. One or more of these forms have a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.