Click here to Skip to main content
15,898,939 members
Home / Discussions / C#
   

C#

 
GeneralRe: Cannot connect to SQL Server 2005 Pin
stonebergftw15-Apr-09 10:32
stonebergftw15-Apr-09 10:32 
QuestionHow to Scan Remote PC For UDP Open & Closed Ports? Pin
alparody15-Apr-09 6:34
alparody15-Apr-09 6:34 
QuestionInvoking a WMI method on a Remote Machine Pin
bbranded15-Apr-09 6:05
bbranded15-Apr-09 6:05 
AnswerRe: Invoking a WMI method on a Remote Machine Pin
bbranded15-Apr-09 8:22
bbranded15-Apr-09 8:22 
Questionsynchronous and asynchronous communication Pin
yesu prakash15-Apr-09 5:52
yesu prakash15-Apr-09 5:52 
AnswerRe: synchronous and asynchronous communication Pin
0x3c015-Apr-09 6:29
0x3c015-Apr-09 6:29 
GeneralRe: synchronous and asynchronous communication Pin
yesu prakash15-Apr-09 18:08
yesu prakash15-Apr-09 18:08 
QuestionProblem in disabling close button(X) of window. Pin
priyamtheone15-Apr-09 5:25
priyamtheone15-Apr-09 5:25 
Hi,
I am trying to work on an application that disables the close button (X) on the upper right hand corner of a window. In order to do that I need to use calls to API methods like GetSystemMenu, EnableMenuItem and RemoveMenu. I can figure out how these methods work but there are certain parameters that these methods have whose values that need to be passed to them as argument is unknown to me. How can I know them.

E.G.- for EnableMenuItem, the parameters are- hMenu (handle to the menu), uIDEnableItem (The menu item to be enabled, disabled, or grayed), uEnable (This parameter must be a combination of at least two of the following:
MF_BYCOMMAND or MF_BYPOSITION
MF_ENABLED, MF_DISABLED, or MF_GRAYED)

Now when I call this method from my application I supply the current window handle as the first argument, the item no. to be disabled/enabled as the second argument but I CAN'T UNDERSTAND WHAT TO SEND AS THE THIRD ARGUMENT. What exactly are the possible values for those parameters- MF_BYCOMMAND or MF_DISABLED. I checked certain examples where they are supplying hexadecimal values like &HF060, &H1, 0x400, 0x1000, 0x2 etc. or integer values like 1024, 2 etc. But how would I know what exactly these values are and when to use which value. The same problem arises in case of calling RemoveMenu method. If you know about any chart or tutorial that lists the values of these parameters then plz refer. Waiting for your help. Thanks.
AnswerRe: Problem in disabling close button(X) of window. [modified] Pin
DaveyM6915-Apr-09 5:31
professionalDaveyM6915-Apr-09 5:31 
AnswerRe: Problem in disabling close button(X) of window. Pin
agent00zelda15-Apr-09 5:32
agent00zelda15-Apr-09 5:32 
GeneralRe: Problem in disabling close button(X) of window. Pin
priyamtheone15-Apr-09 20:16
priyamtheone15-Apr-09 20:16 
AnswerRe: Problem in disabling close button(X) of window. Pin
Luc 64801115-Apr-09 5:40
Luc 64801115-Apr-09 5:40 
AnswerRe: Problem in disabling close button(X) of window. Pin
DaveyM6915-Apr-09 5:43
professionalDaveyM6915-Apr-09 5:43 
AnswerRe: Problem in disabling close button(X) of window. Pin
PIEBALDconsult15-Apr-09 6:03
mvePIEBALDconsult15-Apr-09 6:03 
NewsRe: Problem in disabling close button(X) of window. Pin
priyamtheone15-Apr-09 21:25
priyamtheone15-Apr-09 21:25 
QuestionSIteMap Pin
kibromg15-Apr-09 4:02
kibromg15-Apr-09 4:02 
AnswerRe: SIteMap Pin
hat_master15-Apr-09 6:04
hat_master15-Apr-09 6:04 
GeneralRe: SIteMap Pin
kibromg15-Apr-09 6:36
kibromg15-Apr-09 6:36 
AnswerRe: SIteMap Pin
hat_master15-Apr-09 7:18
hat_master15-Apr-09 7:18 
GeneralRe: SIteMap Pin
kibromg16-Apr-09 0:54
kibromg16-Apr-09 0:54 
QuestionStopping a Windows Service in a Timely Manner... Pin
agent00zelda15-Apr-09 3:42
agent00zelda15-Apr-09 3:42 
AnswerRe: Stopping a Windows Service in a Timely Manner... Pin
PIEBALDconsult15-Apr-09 6:15
mvePIEBALDconsult15-Apr-09 6:15 
GeneralRe: Stopping a Windows Service in a Timely Manner... Pin
agent00zelda15-Apr-09 7:38
agent00zelda15-Apr-09 7:38 
QuestionNeed a clue with Configuration Sections Pin
Optimus Chaos15-Apr-09 3:28
Optimus Chaos15-Apr-09 3:28 
Questionoverload operator + Pin
al3xutzu0015-Apr-09 2:16
al3xutzu0015-Apr-09 2:16 

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.