TextBox1.Focus() and SecurityException

machinogodzilla

Active member
Joined
Mar 3, 2007
Messages
25
Programming Experience
Beginner
Hi!


I ve prepared a program that works fine on my pc. But when I try to
execute it on a workstation at my uni a security exception happens.

This is due to one line in my program:

TextBox1.Focus()

Getting focus to this textbox is crucial for me and I do not want to use
Tab key. Can I do it any other way to avoid the error?


Regards,
machinogodzilla
 
Are you running the program off a network drive? I often get security errors when using network drives, because of the settings set by the administrator. If you are running it off a network drive, try running it on the local computer.
 
Yep, bt I want this program to work in this case too as other
users will use it the same way.

Can anyone tell me what network restrictions cause TextBox1.Focus()
to return an error and what hidden danger this command possess.

Is there any other way to give focus to a control that will work
properly even on network computers?
 
Last edited:
Back
Top