🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #99

Re: PostMessage?

#99
From: Marc Rohloff TeamB
Date: Fri, 14 Apr 2006 01:37
23 lines
1995 bytes
On Thu, 13 Apr 2006 19:16:06 -0400, Ron Sawyer wrote:

> I'm liking a lot of things about C#, but man I am finding it frustrating in
> some areas...
> 
> Anyway, how do I post a message to a form?  Before I would use PostMessage
> or SendMessage.  Is there an equivelent in C#?  (Perhaps I should more
> propely ask if there is an equivelent in .NET?)
> 
> As an aside, I wasn't sure where to post this - where would have been
> better?
Here is fine.
Generally, because .NET is typesafe, you need to define a different
version of PostMessage for each set of parameters you are going to
use.
A common definition is:
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern IntPtr PostMessage(HandleRef hwnd, int msg, 
                                   int wparam, int lparam);

-- 
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com
Technical Details
Message-ID: <skwb5ks7d5xl$.dlg@dlg.marcrohloff.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <443edba4$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,8750003f22da9212
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Marc Rohloff [TeamB]" <"on request">
Subject: Re: PostMessage?
Newsgroups: borland.public.csharpbuilder.language.csharp
User-Agent: 40tude_Dialog/2.0.15.1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
References: <443edba4$1@newsgroups.borland.com>
Date: Thu, 13 Apr 2006 21:37:48 -0400
Message-ID: <skwb5ks7d5xl$.dlg@dlg.marcrohloff.com>
X-Face: "huzh55Xi]!ZNni78>a*5+).`SK?<^q2MlHk-C]Z2M9T@\J5ZCB$95Ey+s"XQuhGFA[eutZ :0^AV!Q;t>gE`1-=8d;HZ6~*o1dH<X9\b$!|(}+I'!Xq)@3Op}%0ArW&nf'Qh*EwR
X-Antivirus: avast! (VPS 0615-2, 04/12/2006), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 65.31.1.121
X-Trace: newsgroups.borland.com 1144978666 65.31.1.121 (13 Apr 2006 18:37:46 -0700)
Lines: 23
X-Authenticated-User: mrohloff
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail