Click here to Skip to main content
15,920,005 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to check in form2 if a button on form1 has been clicked Pin
Malcolm Smart12-Sep-07 1:00
Malcolm Smart12-Sep-07 1:00 
AnswerRe: How to check in form2 if a button on form1 has been clicked Pin
Xmen Real 12-Sep-07 1:24
professional Xmen Real 12-Sep-07 1:24 
GeneralRe: How to check in form2 if a button on form1 has been clicked Pin
Lucy12-Sep-07 1:29
Lucy12-Sep-07 1:29 
GeneralRe: How to check in form2 if a button on form1 has been clicked Pin
Xmen Real 12-Sep-07 1:31
professional Xmen Real 12-Sep-07 1:31 
GeneralRe: How to check in form2 if a button on form1 has been clicked Pin
Lucy12-Sep-07 1:32
Lucy12-Sep-07 1:32 
GeneralRe: How to check in form2 if a button on form1 has been clicked Pin
Xmen Real 12-Sep-07 1:35
professional Xmen Real 12-Sep-07 1:35 
GeneralRe: How to check in form2 if a button on form1 has been clicked Pin
Pete O'Hanlon12-Sep-07 1:49
mvePete O'Hanlon12-Sep-07 1:49 
AnswerRe: How to check in form2 if a button on form1 has been clicked Pin
Anthony Mushrow12-Sep-07 2:02
professionalAnthony Mushrow12-Sep-07 2:02 
AnswerRe: How to check in form2 if a button on form1 has been clicked Pin
Paras Kaneriya12-Sep-07 22:32
Paras Kaneriya12-Sep-07 22:32 
Question[Message Deleted] Pin
P_Elza12-Sep-07 0:12
P_Elza12-Sep-07 0:12 
AnswerRe: Go to a particular node. Pin
Mark Churchill12-Sep-07 0:14
Mark Churchill12-Sep-07 0:14 
GeneralRe: Go to a particular node. Pin
P_Elza12-Sep-07 0:56
P_Elza12-Sep-07 0:56 
AnswerRe: Go to a particular node. Pin
Xmen Real 12-Sep-07 1:29
professional Xmen Real 12-Sep-07 1:29 
GeneralRe: Go to a particular node. Pin
P_Elza12-Sep-07 2:12
P_Elza12-Sep-07 2:12 
AnswerRe: Go to a particular node. Pin
Scott Dorman12-Sep-07 8:20
professionalScott Dorman12-Sep-07 8:20 
GeneralRe: Go to a particular node. [modified] Pin
P_Elza12-Sep-07 17:01
P_Elza12-Sep-07 17:01 
QuestionHash Table Pin
Nishad8512-Sep-07 0:07
Nishad8512-Sep-07 0:07 
AnswerRe: Hash Table Pin
mertkan6512-Sep-07 21:13
mertkan6512-Sep-07 21:13 
QuestionDraw gradient image Pin
greekius11-Sep-07 23:51
greekius11-Sep-07 23:51 
AnswerRe: Draw gradient image Pin
Amar Chaudhary12-Sep-07 0:33
Amar Chaudhary12-Sep-07 0:33 
QuestionProblem: tabControl (TabAlignment.Left) Pin
Soo Star11-Sep-07 23:39
Soo Star11-Sep-07 23:39 
AnswerRe: Problem: tabControl (TabAlignment.Left) Pin
Martin#12-Sep-07 8:35
Martin#12-Sep-07 8:35 
Questionequivalent of DocumentCompleted in WebBrowser while loading with AJAX Pin
scoroop11-Sep-07 23:37
scoroop11-Sep-07 23:37 
AnswerRe: equivalent of DocumentCompleted in WebBrowser while loading with AJAX Pin
scoroop12-Sep-07 3:15
scoroop12-Sep-07 3:15 
QuestionC# [DllImport()] questions. Pin
ioctl5111-Sep-07 23:34
ioctl5111-Sep-07 23:34 
When declaring:

[DllImport("kernel32.dll")]
public static extern int OpenProcess(int dwDesiredAccess, bool bInheritHandle, int dwProcessId);

It dosnt seem to matter what argument datatypes you use, for instance, this works aswell:

[DllImport("kernel32.dll")]
public static extern UInt32 OpenProcess(uint dwDesiredAccess, uint bInheritHandle, Int32 dwProcessId);

Question 1:
What should you think of when declaring imported functions? Should you try to match the c/c++ datatype to its c# datatype couterpart? (For instance, for c++ int, c# Int32). Or does it not matter?

Question 2:
Arguments that are pointers. I dont quite understand how IntPtr etc works since im quite new to c#. But if a function has a parameter that is a pointer (int* return_val for instance. Should you use a IntPtr for that? Or an unsafe c# pointer?

Question 3:
Arguments that are typedef'ed types, for instance handles that are a c++ (void*). Should you use c# unsafe void*? Or is an int just as fine? Are there any rules for this? For instance, HWND is a UInt32 or something like that..

Question 4:
The "out" parameter, should it be used for c++ pointers and references that returns values (non const)?

Thanks.

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.