Nicholas
Thu Jan 22 10:52:50 CST 2004
Aaron,
You could override WndProc, and just toss out most of the messages that
come into the window. Of course, you would have a property that would turn
on and shut off this behavior. You will probably want to still handle
WM_PAINT messages, at the least.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"Aaron Queenan" <aqueenan_DieSpammerDie_@contingent.com.au> wrote in message
news:uHNxPeQ4DHA.2404@TK2MSFTNGP10.phx.gbl...
> Unfortunately, it will also change the background colour to grey, does
some
> wierd colouring of ListView controls which have items in, and
inconsistently
> disables scrollbars depending upon where they are and who owns them. :-(
>
> Is there any way I can disable the user interaction _without_ setting the
> Enabled property to false?
>
> Thanks,
> Aaron.
>
> "Jan Tielens" <jan@no.spam.please.leadit.be> wrote in message
> news:OtyjkbQ4DHA.1868@TK2MSFTNGP10.phx.gbl...
> > You can set the Enabled property of a control or even a form to false.
> This
> > will prevent any user interaction.
> >
> > --
> > Greetz,
> > Jan
> > __________________________________
> > Read my weblog:
http://weblogs.asp.net/jan
> > "Aaron Queenan" <aqueenan_DieSpammerDie_@contingent.com.au> schreef in
> > bericht news:OhkmWXQ4DHA.1804@TK2MSFTNGP12.phx.gbl...
> > > I have a form which performs some asynchronous code. I want to
display
> a
> > > wait cursor when it starts, and hide the wait cursor when it has
> > completed.
> > > This part works fairly well, using:
> > >
> > > this.TopLevelControl.Cursor =
> System.Windows.Forms.Cursors.WaitCursor;
> > >
> > > I also want to prevent user interaction with the controls on my form
> while
> > > the wait cursor is displayed, so that use events (except resize and
> > cancel)
> > > are blocked. What is the recommended way of doing this in .NET?
> > >
> > > Thanks,
> > > Aaron Queenan.
> > >
> > >
> >
> >
>
>