"Sankar Nemani" <snemani@nospamlumedx.com> wrote in message
news:OVm9%23K43DHA.1052@TK2MSFTNGP12.phx.gbl...
> DOes anyone know how to detect if .NET exists on the client machine and
> redirect them to a download page?
>
> "Chris Botha" <chris_s_botha@hotmail.com> wrote in message
> news:uw2wjC43DHA.1632@TK2MSFTNGP12.phx.gbl...
> > I am just thinking that I am using the Web browser control with no-touch
> > deployment and it works (no threads involved opening forms, which I
think
> > causes your problem).
> > As a test, do you know how to customize the toolbox and how to get the
Web
> > browser control on it, and then drag it onto a form?
> > Then to test the concept, rather than using AxHost, create a simple app
> with
> > NO threads and a Web browser control on the form and on the form_load
> > navigate to some site and then no-touch deploy the app.
> >
> >
> > "pfurb" <leonardfurby@hotmail.com> wrote in message
> > news:6c7eb516.0401200010.6010baba@posting.google.com...
> > > Thanks for your reply.
> > > No the code you presented does not solves the problem. When I use an
> > > ActiveX component and No-Touch-Deployment I have to explicitly set the
> > > thread in ApartmentState.STA. Like this...
> > >
> > > [STAThread]
> > > static void Main()
> > > {
> > > Thread newThread = new Thread(new ThreadStart(RunMain));
> > > newThread.ApartmentState = ApartmentState.STA;
> > > newThread.Start();
> > > }
> > >
> > > static void RunMain()
> > > {
> > > Application.Run(new Form1());
> > > }
> > >
> > > Otherwise I can not get it to work together with an ActiveX component
> > > using AxHost. (For example: Try deploying this code using NTD and
> > > Full-trust
> >
>
http://groups.google.se/groups?hl=sv&lr=&ie=UTF-8&selm=en%23UikVlBHA.696%40tkmsftngp05).
> > > But when I start the application like above the
> > > System.Windows.Forms.Timer causes an exception. When the application
> > > closes it will get an exception due to the timer, but the exception is
> > > also caused by the fact that the timer tries to read information from
> > > the users disk. (Which is ok in Full-Trust and NTD without explicitly
> > > setting ApartmentState.STA). It is almost like the Timer fails to
> > > marshal to the main application thread. If I create a customized timer
> > > using thread it will not work at all.
> > >
> > > I guess this is a bug in IEExe, but there is got to be a workaround. I
> > > really hope that someone could explain what is happening and why and
> > > how to solve it.
> > >
> > > Best Regards.
> > >
> > > > I had a similar problem with VS.NET 2002 and a no-touch-deployment
> app,
> > is
> > > > that what you are using?
> > > > I think all your problems should go away if the main app runs in STA
> and
> > you
> > > > don't use threads to do the UI stuff.
> > > > To make the main app run in STA, inside your 1st form (if it is
called
> > > > Form1), do something like
> > > >
> > > > <STAThread()> _
> > > > Public Shared Sub main()
> > > > Dim fff As Form1 = New Form1
> > > > fff.ShowDialog()
> > > > End Sub
> > > >
> > > > Just to make sure the app is running in STA, in the Form_Load event
of
> > the
> > > > main form, do a
> > > > MsgBox(System.Threading.Thread.CurrentThread.ApartmentState)
> > > > and it should return a zero (0 = STA)
> > > >
> > > > Let us know if this solves the problem
> >
> >
>
>