|
You're Welcome.
I suggest getting a book, it will helpyou greatly to get started with C#.
|
|
|
|
|
How can I make sure my form stay on top of everything. I set the TopMostLevel to true, and it works when I work in windows. Then, I load a game and my form is hidden. Does the game take over the priority or what, and how do I change that?
Thanks
|
|
|
|
|
Games write directly to the screen buffer, not through GDI or GDI+ like Windows does. A system modal dialog would only appear atop a windowed-game, and good luck trying to find any decent ones these days.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
For me to write screen buffer, would I have to use DirectX or something of that sorts?
Thanks in advance.
|
|
|
|
|
You can, or you can P/Invoke the massive amount of APIs required to communicate with the display HAL, which doing in managed code (except, perhaps, Managed C++) would truly be a nightmare.
And just implementing DirectX won't necessary fix the problem: the game may not share its hold on the display device (or any other devices it's using). An exclusive lock may be used. Games like the older Everquest versions (according to my friend) did have such an exclusive lock and if you tried to circumvent the lock the game would crash and eventually your account would be locked out.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hey, I have a vertical splitter between two groupboxes but after i enabled
visualstyles in my application it doesnt work ok ,after i move it the
groupbox which is supposed to fill doesnt and i cant move the splitter any
more, Help , did anyone incounter this kind of problem?
|
|
|
|
|
Check if you set the "Align" property properly. When use splitter, you should set the "Align" property of the splitter as well as the groupbox.
|
|
|
|
|
thanks , but the splitter and groupbox dont have an align property.
|
|
|
|
|
Sorry, I make a mistake. It is the "Dock" property, not the "Align" property. See whether the codes below could work.
groupBox2.Dock = DockStyle.Fill;
splitter1.Dock = DockStyle.Left;
groupBox1.Dock = DockStyle.Left;
|
|
|
|
|
Does anyone know how, or seen a snippet/class for performing a name server lookup on a hostname? If you do and could share your knowledge that'd be appreciated.
|
|
|
|
|
Read about Dns.GetHostByName in the .NET Framework SDK. There's other helpful classes in the System.Net namespace you should read about as well.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanks, I can see how the array returned could have the nameservers in. I actually found an opensource mail server (Lumisoft mailserver), which has one namespace: LumiSoft.Net.Dns that contains all I need: mx record lookup, name servers, CNAME, ptrs etc. Worth a look if anyone needs it, as it can be extracted from the whole class library without it breaking from dependencies
|
|
|
|
|
I'm new to C# and am having a hard time with a project I am working on. I work primarily with PeopleSoft, and we are interfacing to the PeopleSoft API via C#. I have a good example for VB 6 or C/C++, but am having problems wrapping it for C#.
Firstly, it uses a lot of #defines, not sure how to translate them into C#. Should I just use the raw codes. See below for the psmsgapi.h header file.
Secondly, many of the parameters used by the functional prototypes have structures or pointers.
Any help would be greatly appreciated!! My email is sfcarroll@yahoo.com
An example of a C program that will do what I am trying to do:
#include <string.h>
#include <stdio.h>
#include "/opt/psoft/hr762dev/src/inc/psmsgapi.h"
void PrintError(char *);
PSMSGHANDLE hCtx;
main()
{
PSOPERATOR Opr;
int Result;
int nReplyOption;
strcpy(Opr.szOprId, "USER");
strcpy(Opr.szOprPswd, "PASSWORD");
Result = PSMsgConnect(PSMSG_APIVERSION, "10.141.136.100:8030", &Opr, &hCtx);
if (Result != PSMSG_OK)
PrintError("Error in Connect");
Result = PSMsgStartMessage(hCtx, "HS_email_processing", "HS_update_email", 0);
if (Result != PSMSG_OK)
PrintError("Error in Start Message");
Result = PSMsgSetField(hCtx, "EMPLID", "000212");
if (Result != PSMSG_OK)
PrintError("Error in Setfield on emplid");
Result = PSMsgSetField(hCtx, "HS_EMAIL_ADDRESS", "sfcarroll@yahoo.com");
if (Result != PSMSG_OK)
PrintError("Error in Setfield on email address");
Result = PSMsgSetField(hCtx, "HS_DO_NOT_EMAIL", "Y");
if (Result != PSMSG_OK)
PrintError("Error in Setfield on email check box");
Result = PSMsgProcessMessage(hCtx, &nReplyOption);
if (Result != PSMSG_OK)
PrintError("Error in Process Message");
Result = PSMsgDisconnect(hCtx);
if (Result != PSMSG_OK)
PrintError("error in disconnect");
printf("!! SUCCESS !! \n");
return (0);
HEADER FILE - psmsgapi.h
#ifndef _INC_PSMSGAPI_H /* only include psmsgapi.h once */
#define _INC_PSMSGAPI_H
/***********************************************************************
* defines *
***********************************************************************/
// the API version number to be passed in to PSMsgConnect
#define PSMSG_APIVERSION 1
// API return codes
#define PSMSG_OK 0 // operation successful
#define PSMSG_ERROR 1 // general runtime error
#define PSMSG_NOTLOADED 2 // Message Agent not present
#define PSMSG_BADCONTEXT 3 // invalid PSMSGHANDLE
#define PSMSG_NOTFOUND 4 // requested definition not found
#define PSMSG_NOMATCHINGROWS 5 // no matching rows
#define PSMSG_NOMOREAGENTS 6 // no more free agents
// reply options for PSMsgProcessMessage
#define PSMSG_NOREPLY 0
#define PSMSG_REPLY 1
#define PSMSG_FORWARD 2
// Message Agent Option Flags - Multiple options can be OR'ed
#define PSMSG_OPT_RESET 0x000 // Reset all options
#define PSMSG_OPT_CHANGEMODEADDUPDATE 0x001 // change panel mode from add to
// update if level 0 record was
// found
#define PSMSG_OPT_NOGUI 0x002 // NO LONGER SUPPORTED - Disable GUI
#define PSMSG_OPT_NOFIELDEDITS 0x004 // NOT IMPLEMENTED
// Disable Field edits. This will
// stop checking for valid values
// for fields, so use it when you
// are reading validated values
// and pushing it back into
// application tables.
#define PSMSG_OPT_FIELDORDER 0x008 // Order outputlist by how they
// appear in Field Mapping
#define PSMSG_OPT_MODE_ADD 0x010 // Action mode flags
#define PSMSG_OPT_MODE_UPDATE 0x020
#define PSMSG_OPT_MODE_UPDATEALL 0x030
#define PSMSG_OPT_MODE_CORRECTION 0x040
#define PSMSG_OPT_MODE_DATAENTRY 0x050
#define PSMSG_OPT_MODE_MASK 0x0F0
#define PSMSG_OPT_UNFORMATTED_IN 0x100 // Input data are unformatted
#define PSMSG_OPT_UNFORMATTED_IN_OFF 0x200 // turn off UNFORMATTED_IN
#define PSMSG_CHANGEMODEADDUPDATE PSMSG_OPT_CHANGEMODEADDUPDATE
#define PSMSG_SEARCHMODE_EXACT 0
#define PSMSG_SEARCHMODE_LIKE 1
#define PSMSG_SEARCHMODE_PROMPT 2
// Constants used by/for PSMsgCheckAndSetOperator() function
#define PSMSG_OPERATORLEN 8 // Operator name length
// Constants used by/for PSMsgGetFieldList() function
#define PSMSG_FIELDNAMELEN 30 // Field name length
#define PSMSG_RECNAMELEN 15
#define PSMSG_USE_UNSUPPORTED 0x00000000 // Field mapping use(s)
#define PSMSG_USE_INPUT 0x00000001
#define PSMSG_USE_OUTPUT 0x00000002
#define PSMSG_USE_BOTH 0x00000003
#define PSMSG_USE_SEARCHKEY 0x00000004
#define PSMSG_USE_FIELDKEY 0x00000008
#define PSMSG_USE_REQUIRED 0x00000100
#define PSMSG_USE_EDITXLAT 0x00000200
#define PSMSG_USE_YESNO 0x00002000
#define PSMSG_USE_EDITTABLE 0x00004000
#define PSMSG_XFR_UNSUPPORTED 0 // Field mapping transfer method(s)
#define PSMSG_XFR_COPY 1
#define PSMSG_XFR_XLATS 2
#define PSMSG_XFR_XLATL 3
#define PSMSG_XFR_REVERSE 4
#define PSMSG_TYPE_UNSUPPORTED 0 // Field type(s)
#define PSMSG_TYPE_CHAR 1
#define PSMSG_TYPE_NUMBER 2
#define PSMSG_TYPE_DATE 3
#define PSMSG_TYPE_TIME 4
#define PSMSG_TYPE_DATETIME 5
// Additional Defines For Search Dialog Processing
// Note that these values must be synched up with those #define's
// found in rdmdefs.h
#define PSMSG_USE_KEY 0x001 // RDM_KEY
#define PSMSG_USE_DUPLKEY 0x002 // RDM_DUPLKEY
#define PSMSG_USE_ALTKEY 0x010 // RDM_ALTKEY
#define PSMSG_USE_LISTITEM 0x020 // RDM_LISTITEM
#define PSMSG_USE_DESCKEY 0x040 // RDM_DESCKEY
#define PSMSG_USE_SEARCHITEM 0x800 // RDM_SEARCHITEM
// as defined in pslen.h
#define PSMSG_LONGNAMELEN 30 // RDM_LONGNAMELEN
#define PSMSG_SHORTNAMELEN 15 // RDM_SHORTNAMELEN
#define PSMSG_MAXVALUELEN 30
// the PSMSGHANDLE is a unique 32-bit context identifier given to a user of
// the PeopleSoft Message Agent API when a connection is made
#ifdef _WIN32
#define MSGAPIFUNCTION int __stdcall
#else
#define MSGAPIFUNCTION int
#endif
typedef void *PSMSGHANDLE;
const char C_fmtPSMagReady[] = "PSMAG:Ready:%s";
typedef struct
{
char szFieldName[PSMSG_FIELDNAMELEN + 1]; // Field name
int fFieldType; // Field type
// - PSMSG_TYPE_CHAR
// - PSMSG_TYPE_NUMBER
// - PSMSG_TYPE_DATE
// - PSMSG_TYPE_TIME
// - PSMSG_TYPE_DATETIME
// - PSMSG_TYPE_UNSUPPORTED
int nFieldSize; // Field size in bytes
int fFieldMapUse; // Field use attribute(s)
// - PSMSG_USE_INPUT
// - PSMSG_USE_OUTPUT
// - PSMSG_USE_BOTH
// - PSMSG_USE_SEARCHKEY
int fFieldMapTransfer; // Field method attribute(s)
// - PSMSG_XFR_COPY
// - PSMSG_XFR_XLATS
// - PSMSG_XFR_XLATL
// - PSMSG_XFR_REVERSE
int nFieldLevel; // Field's scroll level
char szEditTable[PSMSG_RECNAMELEN + 1]; // Edit Table
} PSMSGFIELDINFO;
typedef PSMSGFIELDINFO *LPPSMSGFIELDINFO;
typedef struct // Search Field Info
{
char szFieldName [PSMSG_FIELDNAMELEN + 1]; // Field name
char szLongName[PSMSG_LONGNAMELEN + 1]; // Long name
char szShortName[PSMSG_SHORTNAMELEN + 1]; // Short name
int fFieldType; // Field type
// - PSMSG_TYPE_CHAR
// - PSMSG_TYPE_NUMBER
// - PSMSG_TYPE_DATE
// - PSMSG_TYPE_TIME
// - PSMSG_TYPE_DATETIME
// - PSMSG_TYPE_UNSUPPORTED
int nFieldSize; // Size in bytes
int fFieldUse; // Field attributes in hex
// - PSMSG_USE_KEY
// - PSMSG_USE_DUPLKEY
// - PSMSG_USE_ALTKEY
// - PSMSG_USE_DESCKEY
// - PSMSG_USE_SEARCHITEM
// - PSMSG_USE_LISTITEM
char szEditTable[PSMSG_RECNAMELEN + 1]; // Edit Table
} PSMSGSEARCHFIELD;
typedef PSMSGSEARCHFIELD *LPPSMSGSEARCHFIELD;
typedef struct // Search Dialog Results
{
char szFieldName[PSMSG_FIELDNAMELEN + 1]; // Field Name
char szValue[PSMSG_MAXVALUELEN + 1]; // Field value
int nFieldNameSize; // Field's size in bytes
int nValueSize; // Value's size in bytes
} PSMSGLISTBOXFIELDINFO;
typedef PSMSGLISTBOXFIELDINFO *LPPSMSGLISTBOXFIELDINFO;
typedef struct /* logon information structure */
{
char szOprId[PSMSG_OPERATORLEN + 1];
char szOprPswd[PSMSG_OPERATORLEN + 1];
} PSOPERATOR;
typedef PSOPERATOR *LPPSOPERATOR;
/***********************************************************************
* PSMSGAPI version 1 function prototypes *
***********************************************************************/
#if defined (__cplusplus)
extern "C"
{
#endif
/* Session Level Operations */
MSGAPIFUNCTION PSMsgCheckAndSetOperator(PSMSGHANDLE hContext,
LPPSOPERATOR lpOperator);
MSGAPIFUNCTION PSMsgConnect(long lMsgAPIVersion,
const char *lpcszTopic,
LPPSOPERATOR lpOperator,
PSMSGHANDLE *lphContext);
MSGAPIFUNCTION PSMsgDisconnect(PSMSGHANDLE hContext);
MSGAPIFUNCTION PSMsgSetOptions(PSMSGHANDLE hContext,
int fOptions);
/* Processing Messages */
MSGAPIFUNCTION PSMsgStartMessage(PSMSGHANDLE hContext,
const char *lpcszActivityName,
const char *lpcszMsgName,
int bOriginatorVerified);
MSGAPIFUNCTION PSMsgProcessMessage(PSMSGHANDLE hContext,
int *lpnReplyOption);
/* Field Level Operations */
MSGAPIFUNCTION PSMsgSetField(PSMSGHANDLE hContext,
const char *lpcszFieldName,
const char *lpcszValue);
MSGAPIFUNCTION PSMsgGetMaxFieldNameLength(PSMSGHANDLE hContext,
int *lpnLength);
MSGAPIFUNCTION PSMsgGetMaxValueLength(PSMSGHANDLE hContext,
int *lpnLength);
MSGAPIFUNCTION PSMsgFindField(PSMSGHANDLE hContext,
const char *lpcszFieldName);
MSGAPIFUNCTION PSMsgFindFirstField(PSMSGHANDLE hContext);
MSGAPIFUNCTION PSMsgFindNextField(PSMSGHANDLE hContext);
MSGAPIFUNCTION PSMsgFindNextOutputRow(PSMSGHANDLE hContext);
MSGAPIFUNCTION PSMsgGetFieldCount(PSMSGHANDLE hContext,
int *lpnCount);
MSGAPIFUNCTION PSMsgGetFieldList(PSMSGHANDLE hContext,
LPPSMSGFIELDINFO lpFields);
MSGAPIFUNCTION PSMsgGetFieldNameLength(PSMSGHANDLE hContext,
int *lpnLength);
MSGAPIFUNCTION PSMsgGetFieldName(PSMSGHANDLE hContext,
char *lpszFieldName,
int nSize);
MSGAPIFUNCTION PSMsgGetValueLength(PSMSGHANDLE hContext,
int *lpnLength);
MSGAPIFUNCTION PSMsgGetValue(PSMSGHANDLE hContext,
char *lpszValue,
int nSize);
/* Error Processing */
MSGAPIFUNCTION PSMsgGetErrorExplainTextLength(PSMSGHANDLE hContext,
int *lpnLength);
MSGAPIFUNCTION PSMsgGetErrorExplainText(PSMSGHANDLE hContext,
char *lpszExplainText, int nSize);
MSGAPIFUNCTION PSMsgGetErrorFieldName(PSMSGHANDLE hContext,
char *lpszErrorFieldName, int nSize);
MSGAPIFUNCTION PSMsgGetErrorFieldNameLength(
PSMSGHANDLE hContext, int *lpnLength);
MSGAPIFUNCTION PSMsgGetErrorRecordName(PSMSGHANDLE hContext,
char *lpszErrorRecordName,
int nSize);
MSGAPIFUNCTION PSMsgGetErrorRecordNameLength(
PSMSGHANDLE hContext,
int *lpnLength);
MSGAPIFUNCTION PSMsgGetErrorTextLength(PSMSGHANDLE hContext,
int *lpnLength);
MSGAPIFUNCTION PSMsgGetErrorText(PSMSGHANDLE hContext,
char *lpszErrorText,
int nSize);
/* Search Dialog Processing */
MSGAPIFUNCTION PSMsgGetSearchFieldCount(PSMSGHANDLE hContext,
int *lpnCount);
MSGAPIFUNCTION PSMsgGetSearchList(PSMSGHANDLE hContext,
LPPSMSGSEARCHFIELD lpSearchInfo);
MSGAPIFUNCTION PSMsgGetSearchRecord(PSMSGHANDLE hContext,
char *lpszSearchRecordName, int nSize);
MSGAPIFUNCTION PSMsgGetSearchRecordLength(PSMSGHANDLE hContext,
int *lpnLength);
MSGAPIFUNCTION PSMsgProcessSearchDialog(PSMSGHANDLE hContext,
#if defined (__cplusplus)
int nMaxRows = 0);
#else
int nMaxRows);
#endif
MSGAPIFUNCTION PSMsgProcessSearchDialogWithMode(PSMSGHANDLE hContext,
#if defined (__cplusplus)
int nMaxRows = 0,
int nMode = 0);
#else
int nMaxRows,
int nMode);
#endif
/* List Box Processing */
MSGAPIFUNCTION PSMsgFindFirstListBoxField(PSMSGHANDLE hContext);
MSGAPIFUNCTION PSMsgFindFirstListBoxRow(PSMSGHANDLE hContext);
MSGAPIFUNCTION PSMsgFindListBoxField(PSMSGHANDLE hContext,
const char *lpcszFieldName);
MSGAPIFUNCTION PSMsgFindListBoxRow(PSMSGHANDLE hContext,
int nRowIndex);
MSGAPIFUNCTION PSMsgFindNextListBoxField(PSMSGHANDLE hContext);
MSGAPIFUNCTION PSMsgFindNextListBoxRow(PSMSGHANDLE hContext);
MSGAPIFUNCTION PSMsgGetListBoxField(PSMSGHANDLE hContext,
LPPSMSGLISTBOXFIELDINFO lpFieldInfo);
MSGAPIFUNCTION PSMsgGetListBoxFieldCount(PSMSGHANDLE hContext,
int *lpnCount);
MSGAPIFUNCTION PSMsgGetListBoxRow(PSMSGHANDLE hContext,
LPPSMSGLISTBOXFIELDINFO lpRowInfo);
MSGAPIFUNCTION PSMsgGetListBoxRowCount(PSMSGHANDLE hContext,
int *lpnRowCount);
/* Edit Table Processing */
MSGAPIFUNCTION PSMsgFindFirstPromptValueRow(PSMSGHANDLE hContext);
MSGAPIFUNCTION PSMsgFindNextPromptValueRow(PSMSGHANDLE hContext);
MSGAPIFUNCTION PSMsgFindPromptValueRow(PSMSGHANDLE hContext,
int nRowIndex);
MSGAPIFUNCTION PSMsgGetEditTableFieldCount(PSMSGHANDLE hContext,
const char *lpcszRecordName,
int *lpnFieldCount);
MSGAPIFUNCTION PSMsgGetEditTableFieldList(PSMSGHANDLE hContext,
const char *lpcszRecordName,
LPPSMSGSEARCHFIELD lpRecordInfo);
MSGAPIFUNCTION PSMsgGetPromptValueFieldCount(PSMSGHANDLE hContext,
int *lpnFieldCount);
MSGAPIFUNCTION PSMsgGetPromptValueRow(PSMSGHANDLE hContext,
LPPSMSGLISTBOXFIELDINFO lpFieldInfo);
MSGAPIFUNCTION PSMsgGetPromptValueRowCount(PSMSGHANDLE hContext,
int *lpnRowCount);
MSGAPIFUNCTION PSMsgProcessPromptTable(PSMSGHANDLE hContext,
const char *lpcszRecordName,
#if defined (__cplusplus)
int nMaxRows = 0);
#else
int nMaxRows);
#endif
#if defined (__cplusplus)
} // extern "C"
#endif
#endif /* _INC_PSMSGAPI_H */
|
|
|
|
|
Declare #define s as const fields of a class, or as an enum .
This forum, however, is to help you with specific problems, not do your work for you. You were hired for this job and are expected to know about P/Invoke and marshaling. If you have specific questions, please ask, but don't expect us to translate all your code for you.
Besides, you just posted confidential information. You might want to read the comment in the middle of the source. I doubt PeopleSoft would be very happy.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanks - I set the defines up as
public const int, seems to be compiling OK.
Since I am a beginner in C#, I don't really know about P/Invoke, marshaling etc. Would appreciate any help.
I am trying to create structures to replace the C structures, ie:
[StructLayout(LayoutKind.Sequential)]
public struct PSOPERATOR
{
public string szOprID;
public string szOprPswd;
}
But when I try to assign values I get an error. Do I need to overload '='???
PSOPERATOR Opr = new PSOPERATOR();
Opr.szOprID = "USER";
Opr.szOprPswd = "PASSWORD";
......PeopleSoftAccess\Class1.cs(112): Invalid token '=' in class, struct, or interface member declaration
|
|
|
|
|
Read the following to learn more about P/Invoke and COM interop:Pay close attention to Platform Invoke Data Types[^] under the first section I linked. For example, a native long is actually a managed Int32 (int in C#), not an Int64 (long in C#).
As far as the error you mentioned, it seems like you're using a different keyboard layout that may not be using character code 61 ('=').
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanks very much Heath I will read those articles.
I'm surprised to hear you think the '=' problem is from a keyboard layout. I'm running a US Toshiba laptop, XP media center edition.
The '=' worked fine for assigning values to int variables:
public const int PSMSG_SHORTNAMELEN = 15;
public const int PSMSG_MAXVALUELEN = 30;
Not sure where to go from here....
|
|
|
|
|
"Invalid token" means that the compiler encountered an invalid token. It's possible that invalid whitespace appears before or after the = assignment operator as well. If you click on the Edit menu in VS.NET, there's an option buried somewhere to show all characters. Somewhere there's an invalid token, and if a different = sign was used (there are multiple characters that look like that in the Unicode character set), they would both cause a problem.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Heath - I worked it out - the code was outside of main. Newbie mistake...
Thanks for the pointers.
|
|
|
|
|
Oops! I do not believe you wanted to do that!
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
My Blog
|
|
|
|
|
This is cool, were getting the inside scoop.
/\ |_ E X E GG
|
|
|
|
|
I'm creating a user control which constists of a Panel control containing multiple Panel controls layed out in a grid format. I've overridden the WndProc method in my UserControl class to attempt to trap the WM_LBUTTONCLICK message to determine which child Panel in the grid was clicked. However the WM_LBUTTONDOWN messag (0x0201) never makes it to the WndProc procedure. I tested this out by overrriding the WndProc in the Parent Form that my UserControl is in and the messsage was trapped fine, but it appears to stop there. Will the main Form's message pump change the message to soemthing else when it passes it to one of it's child controls ?
I used Debug.WriteLine to see what messages are being sent to the UserControl's WndProc when the mouse is clicked and it seems to be message 33 (0x0021) WM_MOUSEACTIVATE, but its not a reliable message (not sent every click)
Anyone have any input ?
|
|
|
|
|
You have to handle WM_PARENTNOTIFY (assuming the child control notifies its parent of that message), of which the Message.WParam contains the child message as an IntPtr (so declare a readonly static (can't be a const since it's not a primative) to new IntPtr(0x0201) ).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I was able to solve the problem by implementing an IMessageFilter in my UserControl. I'm glad you cleared this up for me, since I'm sure I'll run into it again.
|
|
|
|
|
I wouldn't recommend that - it's overkill and can decrease the performance of your application. Just handle the WM_PARENTNOTIFY (0x0210) like I mentioned before:
public class MyControl : UserControl
{
static readonly IntPtr WM_LBUTTONDOWN = new IntPtr(0x0201);
const int WM_PARENTNOTIFY = 0x0210;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_PARENTNOFITY)
{
if (m.WParam == WM_LBUTTONDOWN)
{
}
}
base.WndProc(ref m);
}
}
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|