|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to run a form in it's own thread in vb.net 2005Public Sub ThreadStartPoint
Application.Run(frmSomeForm) End Sub This 2003 code no longer works. What's the new model for accomplishing this task in vb.net 2005? >Public Sub ThreadStartPoint Have you set the thread's ApartmentState property to STA?> > Application.Run(frmSomeForm) > >End Sub > >This 2003 code no longer works. What's the new model for accomplishing this >task in vb.net 2005? Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. This was just a stupid mistake
"Application.Run" was by default referencing My.Application.Run I just needed to specify System.Windows.Forms.Application.Run. I was referencing the Run method of the wrong Application object. Show quoteHide quote "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message news:%23URT1LcPGHA.2176@TK2MSFTNGP10.phx.gbl... > >Public Sub ThreadStartPoint >> >> Application.Run(frmSomeForm) >> >>End Sub >> >>This 2003 code no longer works. What's the new model for accomplishing >>this >>task in vb.net 2005? > > > Have you set the thread's ApartmentState property to STA? > > > Mattias > > -- > Mattias Sjögren [C# MVP] mattias @ mvps.org > http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com > Please reply only to the newsgroup.
Convert double to string
How to put all code generated by the designer in external files (VS2005) ? Simple Graphics Question Custom DataGRidComboBoxStyle DataSource Problems Fill a tree view with a stored procedure Setting an object to a UserControl .NET 2.0 Conversion Wizard Flags Me.Cursor? How to use a PDB file login/users/roles in ASP.Net? httpwebrequest |
|||||||||||||||||||||||