Click here to Skip to main content
15,900,511 members
Home / Discussions / C#
   

C#

 
QuestionMaking a form modeless? Pin
vlusardi31-Jul-03 11:24
vlusardi31-Jul-03 11:24 
AnswerRe: Making a form modeless? Pin
Ista31-Jul-03 12:24
Ista31-Jul-03 12:24 
GeneralRe: Making a form modeless? Pin
vlusardi31-Jul-03 12:35
vlusardi31-Jul-03 12:35 
GeneralRe: Making a form modeless? Pin
Ista31-Jul-03 16:01
Ista31-Jul-03 16:01 
GeneralRe: Making a form modeless? Pin
vlusardi1-Aug-03 5:11
vlusardi1-Aug-03 5:11 
GeneralRe: Making a form modeless? Pin
Ista1-Aug-03 5:14
Ista1-Aug-03 5:14 
GeneralMSDE PROBLEM Pin
eggie531-Jul-03 11:04
eggie531-Jul-03 11:04 
GeneralRe: MSDE PROBLEM Pin
apferreira31-Jul-03 11:53
apferreira31-Jul-03 11:53 
GeneralRe: MSDE PROBLEM Pin
eggie51-Aug-03 15:18
eggie51-Aug-03 15:18 
GeneralRe: MSDE PROBLEM Pin
Rein Hillmann31-Jul-03 22:14
Rein Hillmann31-Jul-03 22:14 
GeneralRe: MSDE PROBLEM Pin
eggie51-Aug-03 15:17
eggie51-Aug-03 15:17 
GeneralDatagrid Collaspe Property Pin
Milancie31-Jul-03 10:02
Milancie31-Jul-03 10:02 
GeneralRe: Datagrid Collaspe Property Pin
Ista31-Jul-03 12:25
Ista31-Jul-03 12:25 
QuestionConvert WBMP to BMP? Pin
Bog31-Jul-03 8:36
Bog31-Jul-03 8:36 
GeneralUDL File with C# Pin
Jerin31-Jul-03 8:32
Jerin31-Jul-03 8:32 
GeneralRe: UDL File with C# Pin
Mike Dimmick31-Jul-03 13:44
Mike Dimmick31-Jul-03 13:44 
QuestionVB6 - Property Let, Event and '\' - c# how? Pin
Chua Wen Ching31-Jul-03 7:24
Chua Wen Ching31-Jul-03 7:24 
AnswerRe: VB6 - Property Let, Event and '\' - c# how? Pin
J. Dunlap31-Jul-03 8:31
J. Dunlap31-Jul-03 8:31 
Public Event Buttonclicked(MessageBoxNumber As Integer,
       OKButton As Boolean, CancelButton As Boolean, 
       ExitButton As Boolean)


...becomes...

public event ButtonClickedEventHandler ButtonClicked;
protected void OnButtonClicked(ButtonClickedEventArgs args)
{
   if(ButtonClicked!=null)
	ButtonClicked(this,args);
}


To raise the event:

OnButtonClicked(new ButtonClickedEventArgs(messageboxnumber,

Then outside your class, you will need:

public delegate void ButtonClickedEventHandler(object sender, ButtonClickedEventArgs e);
public class ButtonClickedEventArgs : EventArgs
{
   int m_MessageBoxNumber=0;
   bool m_OKButton=false;
   bool m_CancelButton=false;
   bool m_ExitButton=false;
		
   public ButtonClickedEventArgs(int messageboxnumber, 
            bool okbutton,bool cancelbutton,
            bool exitbutton)
   {
      m_MessageBoxNumber=messageboxnumber;
      m_CancelButton=cancelbutton;
      m_OKButton=okbutton;
      m_ExitButton=exitbutton;

   }
		
   public int MessageBoxNumber
   {
      get
      {
	 return m_MessageBoxNumber;
      }
   }
   public bool CancelButton
   {
      get
      {
	 return m_CancelButton;
      }
   }
   public bool OKButton
   {
      get
      {
	 return m_OKButton;
      }
   }
   public bool ExitButton
   {
      get
      {
	 return m_ExitButton;
      }
   }
}



"Blessed are the peacemakers, for they shall be called sons of God." - Jesus

"You must be the change you wish to see in the world." - Mahatma Gandhi







GeneralRe: VB6 - Property Let, Event and '\' - c# how? Pin
Anonymous31-Jul-03 15:23
Anonymous31-Jul-03 15:23 
GeneralRe: VB6 - Property Let, Event and '\' - c# how? Pin
J. Dunlap31-Jul-03 15:38
J. Dunlap31-Jul-03 15:38 
GeneralRe: VB6 - Property Let, Event and '\' - c# how? Pin
Anthony_Yio31-Jul-03 16:35
Anthony_Yio31-Jul-03 16:35 
AnswerRe: VB6 - Property Let, Event and '\' - c# how? Pin
J. Dunlap31-Jul-03 8:39
J. Dunlap31-Jul-03 8:39 
GeneralRe: VB6 - Property Let, Event and '\' - c# how? Pin
Chua Wen Ching31-Jul-03 15:22
Chua Wen Ching31-Jul-03 15:22 
GeneralRe: VB6 - Property Let, Event and '\' - c# how? Pin
J. Dunlap31-Jul-03 15:34
J. Dunlap31-Jul-03 15:34 
GeneralRe: VB6 - Property Let, Event and '\' - c# how? Pin
Chua Wen Ching31-Jul-03 23:47
Chua Wen Ching31-Jul-03 23: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.