|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Enabling STAThreadAttributeHow would I enable STAThreadAttribute in my Main function.
I assume the error means Sub Main(). Apparently this may fix my openfiledialog error so it's worth a go. Thanks, Adam I've solved this now sorry, this thread may be deleted.
Adam Show quoteHide quote "Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> wrote in message news:OubnycocGHA.4108@TK2MSFTNGP03.phx.gbl... > How would I enable STAThreadAttribute in my Main function. > > I assume the error means Sub Main(). > > Apparently this may fix my openfiledialog error so it's worth a go. > > Thanks, > Adam > "Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> schrieb: I'd still try to determine the reason for 'MTAThread' being used. Are you > I've solved this now sorry, this thread may be deleted. using any old COM components within your application? -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Old as in?
It's all .NET 2.0 as far as I can tell. The only "older" components that possibly use COM and are on my forms are TreeView ListView StatusLabel RichTextBox Timer I didn't set 'MTAThread' by default, this seems to be the default setting when a thread is launched in the application. Adam Show quoteHide quote "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message news:OMtlXrrcGHA.3632@TK2MSFTNGP02.phx.gbl... > "Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> schrieb: >> I've solved this now sorry, this thread may be deleted. > > I'd still try to determine the reason for 'MTAThread' being used. Are you > using any old COM components within your application? > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://classicvb.org/petition/>
Alternative to OpenFileDialog?
ToolStrip with ToolStripDropDownButton Accessing SQL dataset value from button Regex references Serial Port - How To Use "Invoke" On The Second Thread NULL Value - Specified cast is not valid array operators Beginner- 2 Forms & Events Different Events File access issue |
|||||||||||||||||||||||