I always get an exception when I try to switch between different forms in my program. Maybe you will help me to solve this issue. Here is the exception message:

*Control.Invoke must be used to interact with controls created on a separate thread*

I have attached the forms to very nice variables and this problem occurs when I try to use command like MyForm.Show().

It does not happen when the forms are not attached to variables, but then I have collosal problems with refreshing the textboxes and stuff.

Hope to hear you soon!

---

edit;

I have 4 different forms. When I load the main module and main form, in the Sub (...) Handles MyBase.Load I execute the following code:

In module:

```
Public StartupForm As frmStartup
Public RegularForm As frmRegularUse
Public LoginForm As frmLogin
Public PasswordForm As frmPassword
Public SettingsForm As frmSettings

```

In main form:

```
RegularForm = Me
StartupForm = frmStartup
LoginForm = frmLogin
PasswordForm = frmPassword
SettingsForm = frmSettings

```

This is the aproach I worked out to get the full control over refreshing the forms. It is a program for Motorola Scanner with Windows CE. Now, for example, when I enter the correct password in LoginForm, I want to switch to the RegularForm. When I try to use RegularForm.Show() or RegularForm.ShowDialog or RegularForm.BringToFront(), I get an exception. When I try to call the form with the frmRegularUse.Show() I can call the form, but it is being created in a different thread, I believe, so I loose control over it (when I try to put something from the keyboard, there is no response).