|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Alternative to OpenFileDialog?Given I have problems with using OpenFileDialog as explained in another
thread here, what other options are there? All I need is for the user to be able to browse for files and select one or more. That's it. Thanks Adam Adam,
Threads are not meant for UI operations, (while it is not impossible would I like to avoid that just because of design). Cor Show quoteHide quote "Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> schreef in bericht news:u$dBOUmcGHA.1276@TK2MSFTNGP03.phx.gbl... > Given I have problems with using OpenFileDialog as explained in another > thread > here, what other options are there? > > All I need is for the user to be able to browse for files and select one > or more. That's it. > > Thanks > Adam > A form is started in a thread.
Both font and color dialog controls open up and work fine. openfiledialog just crashes out. Adam Show quoteHide quote "Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message news:%23uoyvmmcGHA.3908@TK2MSFTNGP04.phx.gbl... > Adam, > > Threads are not meant for UI operations, (while it is not impossible would > I like to avoid that just because of design). > > Cor > > "Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> schreef in bericht > news:u$dBOUmcGHA.1276@TK2MSFTNGP03.phx.gbl... >> Given I have problems with using OpenFileDialog as explained in another >> thread >> here, what other options are there? >> >> All I need is for the user to be able to browse for files and select one >> or more. That's it. >> >> Thanks >> Adam >> > > On Mon, 8 May 2006 07:42:32 +0100, "Adam Honek"
<AdamHo***@Webmaster2001.freeserve.co.uk> wrote: Show quoteHide quote >A form is started in a thread. Just a shot in the dark.> >Both font and color dialog controls open up and work fine. > >openfiledialog just crashes out. > >Adam > >"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message >news:%23uoyvmmcGHA.3908@TK2MSFTNGP04.phx.gbl... >> Adam, >> >> Threads are not meant for UI operations, (while it is not impossible would >> I like to avoid that just because of design). >> >> Cor >> >> "Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> schreef in bericht >> news:u$dBOUmcGHA.1276@TK2MSFTNGP03.phx.gbl... >>> Given I have problems with using OpenFileDialog as explained in another >>> thread >>> here, what other options are there? >>> >>> All I need is for the user to be able to browse for files and select one >>> or more. That's it. >>> >>> Thanks >>> Adam >>> >> >> > Are you using the FileDialog component or FileDialog Class? I cannot get the ImageList compnent to work, here, to save my life, but the ImageList Class works fine and is what I am having to use. The component seems to work for others, however. Perhaps, you are experiencing a similar querk. Gene The control.
Does the class also support firing up the GUI to select the file? Adam Show quoteHide quote "gene kelley" <o***@by.me> wrote in message news:lput52d50ad8oip51mj1ubarvt11uh1in4@4ax.com... > On Mon, 8 May 2006 07:42:32 +0100, "Adam Honek" > <AdamHo***@Webmaster2001.freeserve.co.uk> wrote: > >>A form is started in a thread. >> >>Both font and color dialog controls open up and work fine. >> >>openfiledialog just crashes out. >> >>Adam >> >>"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message >>news:%23uoyvmmcGHA.3908@TK2MSFTNGP04.phx.gbl... >>> Adam, >>> >>> Threads are not meant for UI operations, (while it is not impossible >>> would >>> I like to avoid that just because of design). >>> >>> Cor >>> >>> "Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> schreef in >>> bericht >>> news:u$dBOUmcGHA.1276@TK2MSFTNGP03.phx.gbl... >>>> Given I have problems with using OpenFileDialog as explained in another >>>> thread >>>> here, what other options are there? >>>> >>>> All I need is for the user to be able to browse for files and select >>>> one >>>> or more. That's it. >>>> >>>> Thanks >>>> Adam >>>> >>> >>> >> > Just a shot in the dark. > > Are you using the FileDialog component or FileDialog Class? > > I cannot get the ImageList compnent to work, here, to save my life, > but the ImageList Class works fine and is what I am having to use. The > component seems to work for others, however. > > Perhaps, you are experiencing a similar querk. > > Gene > > On Mon, 8 May 2006 09:19:15 +0100, "Adam Honek"
<AdamHo***@Webmaster2001.freeserve.co.uk> wrote: >The control. Yes. > >Does the class also support firing up the GUI to select the file? > >Adam > Gene Show quoteHide quote >"gene kelley" <o***@by.me> wrote in message >news:lput52d50ad8oip51mj1ubarvt11uh1in4@4ax.com... >> On Mon, 8 May 2006 07:42:32 +0100, "Adam Honek" >> <AdamHo***@Webmaster2001.freeserve.co.uk> wrote: >> >>>A form is started in a thread. >>> >>>Both font and color dialog controls open up and work fine. >>> >>>openfiledialog just crashes out. >>> >>>Adam >>> >>>"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message >>>news:%23uoyvmmcGHA.3908@TK2MSFTNGP04.phx.gbl... >>>> Adam, >>>> >>>> Threads are not meant for UI operations, (while it is not impossible >>>> would >>>> I like to avoid that just because of design). >>>> >>>> Cor >>>> >>>> "Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> schreef in >>>> bericht >>>> news:u$dBOUmcGHA.1276@TK2MSFTNGP03.phx.gbl... >>>>> Given I have problems with using OpenFileDialog as explained in another >>>>> thread >>>>> here, what other options are there? >>>>> >>>>> All I need is for the user to be able to browse for files and select >>>>> one >>>>> or more. That's it. >>>>> >>>>> Thanks >>>>> Adam >>>>> >>>> >>>> >>> >> Just a shot in the dark. >> >> Are you using the FileDialog component or FileDialog Class? >> >> I cannot get the ImageList compnent to work, here, to save my life, >> but the ImageList Class works fine and is what I am having to use. The >> component seems to work for others, however. >> >> Perhaps, you are experiencing a similar querk. >> >> Gene >> >> > "Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> schrieb: Check the value 'System.Threading.Thread.CurrentThread.ApartmentState' >A form is started in a thread. returns. If it's 'ApartmentState.MTA' set it to 'ApartmentState.STA'. > Both font and color dialog controls open up and work fine. All of those dialogs are internally based on Win32 API calls, and maybe some > > openfiledialog just crashes out. of them only work with STA. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Followed your advice and finally.....it worked.
Why can't MS put this stuff in the help files beats me. Thanks so much, problem solved. Adam Show quoteHide quote "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message news:e%23MCVLocGHA.3952@TK2MSFTNGP04.phx.gbl... > "Adam Honek" <AdamHo***@Webmaster2001.freeserve.co.uk> schrieb: >>A form is started in a thread. > > Check the value 'System.Threading.Thread.CurrentThread.ApartmentState' > returns. If it's 'ApartmentState.MTA' set it to 'ApartmentState.STA'. > >> Both font and color dialog controls open up and work fine. >> >> openfiledialog just crashes out. > > All of those dialogs are internally based on Win32 API calls, and maybe > some of them only work with STA. > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://classicvb.org/petition/>
Count Instances Of String Within String
Large text file import: MVP question Accessing SQL dataset value from button ToolStrip with ToolStripDropDownButton Regex references NULL Value - Specified cast is not valid array operators Using Streamreader with files in servers Beginner- 2 Forms & Events Different Events |
|||||||||||||||||||||||