|
|
|||
| Outlook Form Design Printer Friendly Version | |||
|
|
Designing custom Outlook forms and form regions and writing code for them | ||
| Topic | |||
|
|
How to SetFocus in VBScript format
I am attempting to adapt the code on Page 387 of your book the "SetFocus" to VBScript. Is there a similar function to "SetFocus" in VBScript? After a user answers the vbQuestion, I'd like the focus to go to the field that is in question... -Peter Peter Schnellman 17-Mar-2003 12:45 |
||
|
|
Peter Schnellman
17-Mar-2003 16:50
I figured it out... -Peter |
||
|
|
Sue Mosher
17-Mar-2003 22:49
Good for you! Got a snippet you want to share? |
||
|
|
Peter Schnellman
18-Mar-2003 09:34
Thank you Sue. -Peter Here is what I figured out:
|
||
|
|
Sue Mosher
19-Mar-2003 09:04
Changing the BackColor property of the control is a nice touch! Just to make sure the user doesn't miss it. I'm going to start using that one in my projects. Thanks for the idea! |
||
|
|
Peter Schnellman
19-Mar-2003 09:49
Thank you Sue. My humble contributions pale in comparison to the hard work you are doing with assisting and guiding us. -Peter |
||
|
|
Ben Speer
24-Jul-2003 11:56
I use SetFocus on a multiline TextBox after an error and I display a msgbox, but the insertion bar does not show up in the box, and typing does not enter characters into the field. I think the SetFocus worked, because Tab and Alt-Tab move to the next/prev tabOrder. It looks like the window is active, but I still have to click into the field to get the insertion bar. Any ideas? |
||
|
|
Sue Mosher
24-Jul-2003 12:16
Unfortunately, SetFocus doesn't work consistently, so you may be getting the best result you're going to see. See http://www.outlookcode.com/threads.aspx?forumid=3&messageid=489 and and http://www.outlookcode.com/threads.aspx?forumid=3&messageid=1105 for other discussions of SetFocus frustrations. |
||
|
|
deepak
27-Aug-2003 01:41
i can't understand make it simple pls |
||
|
|
Sue Mosher
27-Aug-2003 09:33
Deepak, please be specific about what information you are looking for. |
||
|
|
Suzi Placek
27-Aug-2003 18:06
I have found that on other than the 1st page, the setfocus method does not display the insertion bar in the control unless the User has clicked on the modified form page at some time through the user interface. Setting the page programatically with the inspector.SetModifiedFormPage method does not seem to be sufficient. The control has the focus, but the insertion bar is hidden. |
||
|
|
|||
