hexagon logo

How do I get my cursor to begin in the edit box of a form when executing a program?

I'm fairly experienced with PC-DMIS, but relatively new to writing VB script. I've been googling this question but couldn't find anything, so I thought I'd see if anyone here can help. Quite simply, I'm looking for a setting or a code that will allow my cursor to start off in the edit box of a form once it is called up. Currently I have to click the screen or the edit box itself to get this to happen. How do I get around this? Thanks guys!
Parents
  • I'm fairly experienced with PC-DMIS, but relatively new to writing VB script. I've been googling this question but couldn't find anything, so I thought I'd see if anyone here can help. Quite simply, I'm looking for a setting or a code that will allow my cursor to start off in the edit box of a form once it is called up. Currently I have to click the screen or the edit box itself to get this to happen. How do I get around this? Thanks guys!


    You should be able to do this with 'SetFocus'. Something like Edit1.SetFocus

    The form must be visible to set the focus. I don't remember the available events but I do believe there was one when the form becomes visible. This would be the place to put the code (assuming it is fired *after* the form is visible).
Reply
  • I'm fairly experienced with PC-DMIS, but relatively new to writing VB script. I've been googling this question but couldn't find anything, so I thought I'd see if anyone here can help. Quite simply, I'm looking for a setting or a code that will allow my cursor to start off in the edit box of a form once it is called up. Currently I have to click the screen or the edit box itself to get this to happen. How do I get around this? Thanks guys!


    You should be able to do this with 'SetFocus'. Something like Edit1.SetFocus

    The form must be visible to set the focus. I don't remember the available events but I do believe there was one when the form becomes visible. This would be the place to put the code (assuming it is fired *after* the form is visible).
Children
No Data