473,503 Members | 9,887 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting focus on a form

Hi,

I have a few forms in my application. One of the forms is to confirm
some action done on the other form. I want to make sure that the user
clicks this form (by choosing 'yes' or 'no') before continuing to do
anything else. In other words, I want to keep the focus of the user on
this form till it is used.

Is that possible?

Thanks,
Avanti

Jan 13 '07 #1
3 1931
Instead of choosing myForm.Show, use myForm.ShowDialog().
They will not be able to do anything else until they
click on that form.
Robin S.
-----------------------
"avanti" <av****@gmail.comwrote in message
news:11**********************@l53g2000cwa.googlegr oups.com...
Hi,

I have a few forms in my application. One of the forms is to confirm
some action done on the other form. I want to make sure that the user
clicks this form (by choosing 'yes' or 'no') before continuing to do
anything else. In other words, I want to keep the focus of the user on
this form till it is used.

Is that possible?

Thanks,
Avanti

Jan 13 '07 #2
Thanks. That helped.
However, now I show the form with showdialogue and when I call Close on
this form, the parent window closes as well.

Is there a workaround?

Thanks,
Avanti

RobinS wrote:
Instead of choosing myForm.Show, use myForm.ShowDialog().
They will not be able to do anything else until they
click on that form.
Robin S.
-----------------------
"avanti" <av****@gmail.comwrote in message
news:11**********************@l53g2000cwa.googlegr oups.com...
Hi,

I have a few forms in my application. One of the forms is to confirm
some action done on the other form. I want to make sure that the user
clicks this form (by choosing 'yes' or 'no') before continuing to do
anything else. In other words, I want to keep the focus of the user on
this form till it is used.

Is that possible?

Thanks,
Avanti
Jan 15 '07 #3
Thanks. That helped.
However, now I show the form with showdialogue and when I call Close on
this form, the parent window closes as well.

Is there a workaround?

Thanks,
Avanti

RobinS wrote:
Instead of choosing myForm.Show, use myForm.ShowDialog().
They will not be able to do anything else until they
click on that form.
Robin S.
-----------------------
"avanti" <av****@gmail.comwrote in message
news:11**********************@l53g2000cwa.googlegr oups.com...
Hi,

I have a few forms in my application. One of the forms is to confirm
some action done on the other form. I want to make sure that the user
clicks this form (by choosing 'yes' or 'no') before continuing to do
anything else. In other words, I want to keep the focus of the user on
this form till it is used.

Is that possible?

Thanks,
Avanti
Jan 15 '07 #4

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

Similar topics

5
3765
by: Melissa | last post by:
1. Is there a way to programatically remove the focus from the form; ie, so the focus is not on any control on the form? 2. Is there a way to programatically set the focus to the same place as...
2
3630
by: MLH | last post by:
A form named frmVehicleEntryForm has a number of textbox controls who's OnGotFocus property setting is an expression... =Change2Green() Change2Green() looks something like this... Dim MyControl...
2
7389
by: Mystery Man | last post by:
We have an MDI application that is not setting always setting focus to the newly corrected MDI. It is creating the form and it is the topmost but it does not have focus. The code we are using to...
1
1884
by: Jason | last post by:
I have created a c-sharp app that has keyup, keydown events tied to the form. The form also has some other controls, buttons, labels and 1 custom control that I made which inherits from user...
1
6321
by: Rachel Suddeth | last post by:
I have an form where the whole display is a tab control (well, that plus a status bar.) I want to set the focus to the first TextBox on the first TabPage when it loads. I tried to put that into...
3
8305
by: Steve Yerkes | last post by:
There seems to be way too much confusion over how to set focus on the a field using a field validator. I looked all over the web and found people trying to do this, but not getting anywhere. There...
3
5612
by: Brian Henry | last post by:
Hi, I have a bunch of forms in a DLL that I call from my main application. The one form is a login form, and I have the tab order set in the order I want it (password box first, then ok button...
1
2030
by: clickon | last post by:
For testing purposes i have got a 2 step WizardControl. Eqach step contains a text box, TextBox1 and TextBox2 respectively. If i put the following code in the respective activate event handlers...
7
8037
by: Zytan | last post by:
I want to set a control in a form to have the default focus. This is not the accept button -- that's set to a button when is 'clicked' when you press ENTER. I want a textbox to have the focus...
5
2023
by: Finn Stampe Mikkelsen | last post by:
Hi How can i set a focus to a textbox in my codebehind page?? I have this WebForm, that takes information from a user and 2 buttons on the form. One that takes action on the entered...
0
7361
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...
1
7015
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
7470
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
5602
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
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...
0
3183
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1523
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.