why ?

Hello, a question please.

If I start my applicacion from a "form1" (example) I can use on another form form1.text, but if I start my application form "sub main" I can't. Why

Thanks...



Answer this question

why ?

  • Mita1

    My thought would be that the Enabled application Framework is more fully described as a "windows application Framework", as when you enable it the frame Windows Application Framework Properties is enabled.

    Since Sub main can be used for console applications - it would cause more problems with trying to use the framework features for purposes not intented and with legacy code.

    Requiring it to use a windows form to start ensures that the application is a windows application and not a console application - Reducing down potential problems.

    So you need to set some variables and stuff up - simply create a method in the initial form load and call it there.

    The idea of the framework is to enable quick and simple addition of items such as splash screens in a very simply standard and straightforward manner. If you want to do other more complicated stuff your still free to implement your own solutions.


  • Kumar Venkat

    You can open an application from a form or from a SUB main of a module. I started it from a SUB main. I do that because I have to load some vars at the begining and then I do

    Application.Run(New formlogin)

    To start form a SUB main, you have to unchecked "enabled application framework" and then you can choose "SUB MAIN".

    Thanks...


  • guimar16

    sorry you need to explain more than that. What do you mean by starting your application from sub main It does start it using that I believe - what happens

    the application is started from the form you set it as a startup form in the project properties of your solution



  • why ?