samsmithnz Posted July 28, 2004 Posted July 28, 2004 I've downloaded a demo from MSDN, and I keep seeing this. What is the <STAThread()> bit do? What does this mean? <STAThread()> _ Shared Sub Main() 'more things here I've left out for you... End Sub Quote Thanks Sam http://www.samsmith.co.nz
Administrators PlausiblyDamp Posted July 28, 2004 Administrators Posted July 28, 2004 STAThread denotes the thread that is running the Main routine will be a Single Threaded Apartment model - this only had any meaning to COM and was a work around for certain issues when dealing with COM interop in the 1.0 Framework. In most cases it wasn't needed and since the 1.1 framework has been released and the bugs fixed it is totally un-needed now. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
samsmithnz Posted July 28, 2004 Author Posted July 28, 2004 But I found it in an Online Application Block example (http://msdn.microsoft.com/smartclient/default.aspx?pull=/library/en-us/dnpag/html/offline.asp), which was written in 2004 on 1.1... Anyhow, I've removed it and it seems to be working ok... thanks Quote Thanks Sam http://www.samsmith.co.nz
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.