Results 1 to 4 of 4

Thread: What does it mean by " <STAThread()> _"

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2003
    Posts
    436

    What does it mean by " <STAThread()> _"

    <STAThread()> _
    Shared Sub Main()
    Application.Run(New Customers)
    End Sub 'Main

    Customer is the name of the windows form

    I read some thing in help in regards to COM Interop..but in easy words what does STAThread mean?

    Any explanation is very helpful.

    thanks
    nath

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Single-Threaded Apartment threading model

    It signifies to the COM InterOp layer that STA is the threading model used. If you don't have any COM InterOp in your app, then you don't need to worry about it.
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2003
    Posts
    436

    Please correct me If I am wrong.

    "Com Interop" means If I am using any com dll's in my vb.net project, the .net should be able to communicate with dll (written in previous versions of vb) . Is that what it means?

    thanks

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Exactly
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

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