Click here to Skip to main content
16,012,316 members
Home / Discussions / C#
   

C#

 
GeneralHandle to form Pin
jelleo21-May-04 10:11
jelleo21-May-04 10:11 
GeneralCannot Call Invoke or InvokeAsync Pin
GostWryter21-May-04 1:25
GostWryter21-May-04 1:25 
GeneralRe: Cannot Call Invoke or InvokeAsync Pin
Dave Kreskowiak21-May-04 3:08
mveDave Kreskowiak21-May-04 3:08 
GeneralRe: Cannot Call Invoke or InvokeAsync Pin
Heath Stewart21-May-04 4:23
protectorHeath Stewart21-May-04 4:23 
GeneralRe: Cannot Call Invoke or InvokeAsync Pin
Grimolfr21-May-04 3:57
Grimolfr21-May-04 3:57 
GeneralRe: Cannot Call Invoke or InvokeAsync Pin
Heath Stewart21-May-04 4:24
protectorHeath Stewart21-May-04 4:24 
GeneralRe: Cannot Call Invoke or InvokeAsync Pin
Dave Kreskowiak21-May-04 4:36
mveDave Kreskowiak21-May-04 4:36 
GeneralRe: Cannot Call Invoke or InvokeAsync Pin
Heath Stewart21-May-04 4:42
protectorHeath Stewart21-May-04 4:42 
All you need is the .NET Framework SDK (which requires the .NET Framework). VS.NET just installs the SDK if you opt for it, but it doesn't come with just the SDK as well.

If you were to set a property for example, the set accessor would contain something like this:
if (IsHandleCreated)
{
  SendMessage(Handle, SOME_MESSAGE, 0, value); // Just making stuff up
  fieldSet = true;
}
else
{
  fieldSet = false;
}
fieldName = value;
In the override to OnHandleCreated, you'd have something like this:
if (!fieldSet)
  SendMessage(Handle, SOME_MESSAGE, 0, fieldName);
To do this with delegates wouldn't be a whole lot different since you can store the delegate in a field or an IList and invoke it later.

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Cannot Call Invoke or InvokeAsync Pin
Dave Kreskowiak21-May-04 4:44
mveDave Kreskowiak21-May-04 4:44 
GeneralRe: Cannot Call Invoke or InvokeAsync Pin
Dave Kreskowiak21-May-04 4:43
mveDave Kreskowiak21-May-04 4:43 
Generalbest pratice Pin
the last free name21-May-04 1:25
the last free name21-May-04 1:25 
GeneralRe: best pratice Pin
Dave Kreskowiak21-May-04 3:18
mveDave Kreskowiak21-May-04 3:18 
GeneralRe: best pratice Pin
the last free name21-May-04 4:34
the last free name21-May-04 4:34 
GeneralMSDN Pin
sreejith ss nair21-May-04 1:22
sreejith ss nair21-May-04 1:22 
GeneralRe: MSDN Pin
CWIZO21-May-04 2:10
CWIZO21-May-04 2:10 
GeneralRe: MSDN Pin
sreejith ss nair21-May-04 2:28
sreejith ss nair21-May-04 2:28 
GeneralRe: MSDN Pin
Aryadip21-May-04 2:42
Aryadip21-May-04 2:42 
GeneralRe: MSDN Pin
sreejith ss nair21-May-04 2:54
sreejith ss nair21-May-04 2:54 
GeneralRe: MSDN Pin
Dave Kreskowiak21-May-04 3:01
mveDave Kreskowiak21-May-04 3:01 
GeneralRe: MSDN Pin
Grimolfr21-May-04 4:05
Grimolfr21-May-04 4:05 
GeneralRe: MSDN Pin
Heath Stewart21-May-04 4:18
protectorHeath Stewart21-May-04 4:18 
GeneralOdd threads Pin
Christer Claesson21-May-04 1:20
Christer Claesson21-May-04 1:20 
GeneralRe: Odd threads Pin
Dave Kreskowiak21-May-04 2:59
mveDave Kreskowiak21-May-04 2:59 
GeneralYeah Pin
Christer Claesson21-May-04 3:05
Christer Claesson21-May-04 3:05 
GeneralExtremely odd freak incident. Pin
Christer Claesson21-May-04 3:02
Christer Claesson21-May-04 3:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.