Click here to Skip to main content
16,017,100 members
Home / Discussions / C#
   

C#

 
GeneralRe: button event handler where it drops it? Pin
Richard MacCutchan27-Aug-24 21:31
mveRichard MacCutchan27-Aug-24 21:31 
GeneralRe: button event handler where it drops it? Pin
geomeo12330-Aug-24 16:41
geomeo12330-Aug-24 16:41 
AnswerRe: button event handler where it drops it? Pin
Ravi Bhavnani4-Sep-24 12:23
professionalRavi Bhavnani4-Sep-24 12:23 
GeneralRe: button event handler where it drops it? Pin
geomeo12325-Sep-24 9:20
geomeo12325-Sep-24 9:20 
GeneralRe: button event handler where it drops it? Pin
Ravi Bhavnani26-Sep-24 4:42
professionalRavi Bhavnani26-Sep-24 4:42 
GeneralRe: button event handler where it drops it? Pin
geomeo12326-Sep-24 7:37
geomeo12326-Sep-24 7:37 
GeneralRe: button event handler where it drops it? Pin
Ravi Bhavnani26-Sep-24 15:15
professionalRavi Bhavnani26-Sep-24 15:15 
QuestionC# Enable or disable menu in a form frm another form Pin
Ismael_199924-Aug-24 4:36
Ismael_199924-Aug-24 4:36 
I have an application developed in Visual Studio 2022 that works with forms. In this application, there is a main form, from which other forms can be opened. In this main form, there is an item in the top menu (“selection”), whose name is M_Selecao, which must be activated or deactivated depending on which form was opened.

For example, when the “Expenses” form is opened, the menu must be activated (enabled).
When this secondary form is closed, the “selection” menu must be disabled. I can enable the menu, but I can’t disable it. I tried to make the main form’s menu “public” in the “TelaPrincipal.Designer.cs” file:
public System.Windows.Forms.ToolStripMenuItem M_Selecao;

This way I could disable the menu in the main form when closing the secondary form, but I get the message that "an object reference is required for the method or property 'TelaPrincipal.M_Selecao'. I also don't know how to do it from the main form. Can anyone help me? Thanks.
AnswerRe: C# Enable or disable menu in a form frm another form Pin
Richard Andrew x6424-Aug-24 5:34
professionalRichard Andrew x6424-Aug-24 5:34 
GeneralRe: C# Enable or disable menu in a form frm another form Pin
Ismael_199926-Aug-24 4:40
Ismael_199926-Aug-24 4:40 
AnswerRe: C# Enable or disable menu in a form frm another form Pin
OriginalGriff24-Aug-24 18:18
mveOriginalGriff24-Aug-24 18:18 
GeneralRe: C# Enable or disable menu in a form frm another form Pin
Ismael_199926-Aug-24 4:42
Ismael_199926-Aug-24 4:42 
QuestionSystem.* not defined or imported Pin
Pieter Claassens15-Aug-24 4:22
Pieter Claassens15-Aug-24 4:22 
AnswerRe: System.* not defined or imported Pin
Richard MacCutchan15-Aug-24 4:56
mveRichard MacCutchan15-Aug-24 4:56 
GeneralRe: System.* not defined or imported Pin
Pieter Claassens15-Aug-24 5:03
Pieter Claassens15-Aug-24 5:03 
GeneralRe: System.* not defined or imported Pin
Richard MacCutchan15-Aug-24 5:26
mveRichard MacCutchan15-Aug-24 5:26 
GeneralRe: System.* not defined or imported Pin
Richard Andrew x6415-Aug-24 11:21
professionalRichard Andrew x6415-Aug-24 11:21 
GeneralRe: System.* not defined or imported Pin
Richard MacCutchan15-Aug-24 22:13
mveRichard MacCutchan15-Aug-24 22:13 
AnswerRe: System.* not defined or imported Pin
OriginalGriff15-Aug-24 19:17
mveOriginalGriff15-Aug-24 19:17 
QuestionCombobox item selection Pin
Member 95057569-Aug-24 22:46
Member 95057569-Aug-24 22:46 
AnswerRe: Combobox item selection Pin
OriginalGriff10-Aug-24 2:30
mveOriginalGriff10-Aug-24 2:30 
QuestionPrintQueueWatch Pin
Jorge Carlos Iglesias Alvarez2-Aug-24 6:44
Jorge Carlos Iglesias Alvarez2-Aug-24 6:44 
AnswerRe: PrintQueueWatch Pin
Richard Andrew x642-Aug-24 7:28
professionalRichard Andrew x642-Aug-24 7:28 
AnswerRe: PrintQueueWatch Pin
OriginalGriff2-Aug-24 19:49
mveOriginalGriff2-Aug-24 19:49 
Questionnetwork change event/Compare Pin
geomeo1232-Aug-24 4:47
geomeo1232-Aug-24 4:47 

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.