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

C# Form focus and Alt-Tab

I'm a beginner with C#. I've got a Forms C# application that has an
AxWebBrowser component embedded. While the C# application runs, a user
is filling out some text boxes in the AxWebBrowser. If they then alt-
tab out and alt-tab back into the C# forms application, their blinking
cursor is no longer there. How can I ensure that if they alt-tab back,
that the AxWebBrowser webpage has it's curser blinking in the place
where they left off?? I get confused with words like focus, activated
etc...

Any help is greatly appreciated!

Alex

Mar 2 '07 #1
3 8845
On Mar 1, 8:48 pm, claudioilla...@gmail.com wrote:
I'm a beginner with C#. I've got a Forms C# application that has an
AxWebBrowser component embedded. While the C# application runs, a user
is filling out some text boxes in the AxWebBrowser. If they then alt-
tab out and alt-tab back into the C# forms application, their blinking
cursor is no longer there. How can I ensure that if they alt-tab back,
that the AxWebBrowser webpage has it's curser blinking in the place
where they left off?? I get confused with words like focus, activated
etc...

Any help is greatly appreciated!

Alex
I'm guessing you've already been told to put the following line of
code

this.Focus();

in your forms Activated event. If you haven't been told that, that is
one way to solve you problem. If what I just said is what is confusing
you let me know and I can explain how to put that code in your forms
Activated event.

Mar 2 '07 #2

In the main form_activated method I've tried:

this.Focus();
and
this.axWebBrowser1.Focus();

but neither is putting the focus on the text box that they left off
at... any other suggestions??
On Mar 1, 8:59 pm, "justin creasy" <justin.cre...@gmail.comwrote:
On Mar 1, 8:48 pm, claudioilla...@gmail.com wrote:
I'm a beginner with C#. I've got a Forms C# application that has an
AxWebBrowser component embedded. While the C# application runs, a user
is filling out some text boxes in the AxWebBrowser. If they then alt-
tab out and alt-tab back into the C# forms application, their blinking
cursor is no longer there. How can I ensure that if they alt-tab back,
that the AxWebBrowser webpage has it's curser blinking in the place
where they left off?? I get confused with words likefocus, activated
etc...
Any help is greatly appreciated!
Alex

I'm guessing you've already been told to put the following line of
code

this.Focus();

in your forms Activated event. If you haven't been told that, that is
one way to solve you problem. If what I just said is what is confusing
you let me know and I can explain how to put that code in your forms
Activated event.

Mar 2 '07 #3
Yeah, I had to get the htmlDocument from the AxWebBrowser and then do
a focus on the document, thanks!!!

On Mar 2, 9:49 am, "alex77ander77" <claudioilla...@gmail.comwrote:
In the main form_activated method I've tried:

this.Focus();
and
this.axWebBrowser1.Focus();

but neither is putting thefocuson the text box that they left off
at... any other suggestions??

On Mar 1, 8:59 pm, "justin creasy" <justin.cre...@gmail.comwrote:
On Mar 1, 8:48 pm, claudioilla...@gmail.com wrote:
I'm a beginner withC#. I've got a FormsC#application that has an
>AxWebBrowsercomponent embedded. While theC#application runs, a user
is filling out some text boxes in theAxWebBrowser. If they thenalt-
>tabout andalt-tabback into theC#forms application, their blinking
cursor is no longer there. How can I ensure that if theyalt-tabback,
that theAxWebBrowserwebpage has it's curser blinking in the place
where they left off?? I get confused with words likefocus, activated
etc...
Any help is greatly appreciated!
Alex
I'm guessing you've already been told to put the following line of
code
this.Focus();
in your forms Activated event. If you haven't been told that, that is
one way to solve you problem. If what I just said is what is confusing
you let me know and I can explain how to put that code in your forms
Activated event.- Hide quoted text -

- Show quoted text -

Mar 2 '07 #4

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

Similar topics

5
by: 'bonehead | last post by:
Greetings, I'm still something of a newbie to html/php/mysql. I have a php/html form with several fields of type "input". If the user enters improper data in a particular field and clicks the...
1
by: twopeak | last post by:
Hello I'm making a script, that should allow users to change a select box, and this changes the alt and the src of several images. I have made a script (see under) that exactly does what it's...
12
by: i6033162556-signup1 | last post by:
How do I remove the new line after </form> It looks very bad in my HTML, as each <form></form> will create a new line after the block of </form> Is there a way for me to remove it?
1
by: IkBenHet | last post by:
Hello, I found this script to create a simple rich text form (http://programmabilities.com/xml/index.php?id=17): <html> <head> <title>Rich Text Editor</title> </head> <body>
3
by: Hans Karman | last post by:
I have a form (giving details of a person) and a subform (giving details of the person's assets). A search in the form for a particular name using the Find dialog box finds the wanted person. The...
13
by: HABJAN ®iga | last post by:
I'am using form's keypreview property & keydown (on form) to look for hotkeys (alt+?) Everything works fine, except when i have focus on combobox. Then the event on form isn't raised. Can...
5
by: Olly | last post by:
Hello Everyone! Could someone please have a look at my JS Form I posted below....Something wrong there, but I don't understand what's exactly. Many thanks. Olly ...
5
by: freelancex | last post by:
Hi, Im new to this forum, and new to scripting in general. Im an ICT Technician for a high school and i am designing a Form in visual basic 2005. The intended purpose of the Form, is to prevent...
5
by: sierra7 | last post by:
Hi I have been writing Access applications for some years now and have moved away from from the 'Switchboard' type of opening form to using a menubar accross the top of the screen and borderless...
3
by: blackrunner | last post by:
ERROR in my Query?! ERROR: Element GESCHLECHT is undefined in FORM. i think everything ok. Maby somebody can help me here Element GESCHLECHT is undefined in FORM. The error occurred...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.