Re: Sending or Posting message to other control
From: AlexS (salexru2000NO_at_SPAMsympaticoPLEASE.ca)
Date: 06/01/04
- Next message: Peter Jausovec: "Re: GDI+"
- Previous message: Roman S.: "Re: GDI+"
- In reply to: Leon Chi: "Re: Sending or Posting message to other control"
- Next in thread: Leon Chi: "Re: Sending or Posting message to other control"
- Reply: Leon Chi: "Re: Sending or Posting message to other control"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Jun 2004 08:55:48 -0400
Leon,
your conclusion is not exactly right. You can use standard .Net methods for
this. Intercept mouse in MouseDown and set focus with Control.Focus and/or
Controll.Select methods.
HTH
Alex
"Leon Chi" <chijinliang@chinacom.jp> wrote in message
news:%23KB5gL5REHA.4020@TK2MSFTNGP11.phx.gbl...
> Alex:
>
> So I have to use API(s) to accomplish this? No way in .NET? If so,
pity!
>
> Leon
>
> "AlexS" <salexru2000NO@SPAMsympaticoPLEASE.ca> wrote in message
> news:OrvTsy4REHA.3300@TK2MSFTNGP09.phx.gbl...
> > Leon,
> >
> > yes I think I get you. Once again - .Net Framework provides some level
of
> > abstraction from underlying OS - be it Windows or something else. That's
> why
> > you should resort to Win32 API only when there are no standard methods
and
> > properties, which can do same task.
> >
> > HTH
> > Alex
> >
> > "Leon Chi" <chijinliang@chinacom.jp> wrote in message
> > news:O$VaBr3REHA.1644@TK2MSFTNGP09.phx.gbl...
> > > Alex
> > >
> > > Thanks for your reply.
> > >
> > > What I want to do is I want to Post a message to a control. For
example.
> I
> > > post a WM_SETFOCUS message to a control
> > > in another control's WM_LBUTTONDOWN event handler. So after the mouse
> > event
> > > handled. the control can get focus.
> > >
> > > Can you understand me?
> > >
> > > Best Regards
> > > Leon
> > >
> > >
> > > "AlexS" <salexru2000NO@SPAMsympaticoPLEASE.ca> wrote in message
> > > news:uAQ3VJ3REHA.3944@TK2MSFTNGP11.phx.gbl...
> > > > Hi, Leon
> > > >
> > > > In .Net it is expected that you use available methods and properties
> for
> > > > such tasks. So, the question is what you are trying to do?
> > > > For example, instead of SendMessage with WM_SETTEXT you can use
> > > Control.Text
> > > > property in assignment operator.
> > > >
> > > > HTH
> > > > Alex
> > > >
> > > >
> > > > "Leon Chi" <chijinliang@chinacom.jp> wrote in message
> > > > news:uiiLgD3REHA.3300@tk2msftngp13.phx.gbl...
> > > > > I was a VC++ programer. Now I am learning C#. In VC, you can
> > > > > use API SendMessage() or PostMessage() to send or post message
> > > > > to other window. Are there some classes defined in .NET can do
> these?
> > > > >
> > > > > Thanks.
> > > > >
> > > > > Best Regards
> > > > > Leon
> > > >
> > > >
> > >
> >
> >
>
- Next message: Peter Jausovec: "Re: GDI+"
- Previous message: Roman S.: "Re: GDI+"
- In reply to: Leon Chi: "Re: Sending or Posting message to other control"
- Next in thread: Leon Chi: "Re: Sending or Posting message to other control"
- Reply: Leon Chi: "Re: Sending or Posting message to other control"
- Messages sorted by: [ date ] [ thread ]