Kamil,
1. This code was wrote to open the Form just one time. When you left your program alive the error was raised.
2. SAPBusinessOneSDK is not a part of SAP B1 instalation, at least not for my installation.
3. You will fix your code with this steps:
In Program class:
3.1 In the Main Method, delete the line: "CreateForm()"
3.2 In the CreateForm Method, enable the line "oForm.Visible = true"
In Menu class:
3.3 Change the line: "Program.oForm.VisibleEx = true;" for "Program.CreateForm();"
You receive this error because when your form is unloaded , your form is destroyed, and when you call again, the form doesn't is valid.
Regards,
Diego