|
-
Jul 26th, 2006, 10:01 AM
#1
Thread Starter
Frenzied Member
[02/03] Focus issue
I have 2 forms, frmMain and frmOptions. On frmOptions, there are 2 text boxes. When I load frmOptions, the first text box has focus. I don't want a cursor to be in either text box. If it is possible, I don't want any object on the form to have focus. I have code in the event that the first textbox has focus, and when the form loads and the textbox has automatically has focus and i don't want it to. How can i fix this?
Thanks.
-
Jul 26th, 2006, 10:51 AM
#2
Re: [02/03] Focus issue
Give focus to the form itself so that it is still on the top:
frmOptions.Activate
-
Jul 26th, 2006, 01:14 PM
#3
Thread Starter
Frenzied Member
Re: [02/03] Focus issue
Tried it and it still gave focus to the textbox.
-
Jul 26th, 2006, 01:18 PM
#4
Frenzied Member
Re: [02/03] Focus issue
mabye give the form focus on load?
-
Jul 26th, 2006, 02:14 PM
#5
Thread Starter
Frenzied Member
Re: [02/03] Focus issue
No, that is pretty much what frmOptions.Activate does. If anyone is using IE7, it want it to be like the search bar at the top right (even on firefox it does this i believe) where the cursor is not shown. I would like to do the same thing where there is text in gray (where it says MSN Search or Google or whatever you chose as your default search provider) and there is no cursor in the textbox control. Once the user clicks the textbox, the text disappears and the user and type in what they want. Once the user clicks out of the box and there is no text in the box, the gray text comes back. I would like to do this and I have it working, it's just that the cursor is set to the textbox on form load and the gray text is deleted because it activates the textbox_gotfocus function.
Anyone know what I am trying to describe?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|