Results 1 to 4 of 4

Thread: Application.Run method.....?

  1. #1

    Thread Starter
    Fanatic Member khalik_ash's Avatar
    Join Date
    Aug 2002
    Location
    Singapore
    Posts
    724

    Application.Run method.....?

    hi

    why should i use application.run method

    Code:
    Public Sub Main()
            Dim frm As New Frm_Logon()
            frm.Show()
        End Sub
    it does not work...

    if i add Application.Run()
    works fine...

    why is it so....

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Re: Application.Run method.....?

    Why ? Because every proj in .NET Environment must have at least either inherited Form class or a Main Method which called Application.Run .

    This code runs without Application.Run which requires to show your form modally .

    VB Code:
    1. Module Module1
    2.     Public Sub Main()
    3.         Dim frm As New Form()
    4.         frm.ShowDialog()
    5.     End Sub
    6. End Module

  3. #3

    Thread Starter
    Fanatic Member khalik_ash's Avatar
    Join Date
    Aug 2002
    Location
    Singapore
    Posts
    724

    Re: Re: Application.Run method.....?

    Originally posted by Pirate
    Why ? Because every proj in .NET Environment must have at least either inherited Form class or a Main Method which called Application.Run .

    This code runs without Application.Run which requires to show your form modally .

    VB Code:
    1. Module Module1
    2.     Public Sub Main()
    3.         Dim frm As New Form()
    4.         frm.ShowDialog()
    5.     End Sub
    6. End Module
    thanks a lot for the info....

    as i am a new to this
    when i execute my app and it get error it is giving some error like cannot copy the exe to bin folder.. i think the application is still in memory when i try to delete from the bin folder i am not able to....

    i am using application.exit other wise works fine..

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Re: Re: Re: Application.Run method.....?

    Are you trying to delete the exe file while the program is running ??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width