Click here to Skip to main content
15,884,237 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: VB6 - Property Let, Event and '\' - c# how? Pin
J. Dunlap1-Aug-03 9:00
J. Dunlap1-Aug-03 9:00 
GeneralRe: VB6 - Property Let, Event and '\' - c# how? Pin
sburton@amersham1-Aug-03 8:18
sburton@amersham1-Aug-03 8:18 
AnswerRe: VB6 - Property Let, Event and '\' - c# how? Pin
sburton@amersham31-Jul-03 9:41
sburton@amersham31-Jul-03 9:41 
QuestionUsing Custom .dll files - where do they go? Pin
mikemilano31-Jul-03 7:07
mikemilano31-Jul-03 7:07 
AnswerRe: Using Custom .dll files - where do they go? Pin
Martin Cook31-Jul-03 7:21
professionalMartin Cook31-Jul-03 7:21 
AnswerRe: Using Custom .dll files - where do they go? Pin
mikemilano31-Jul-03 7:36
mikemilano31-Jul-03 7:36 
GeneralRe: Using Custom .dll files - where do they go? Pin
Rein Hillmann31-Jul-03 22:20
Rein Hillmann31-Jul-03 22:20 
GeneralHiding Form on Startup Pin
Adam Durity31-Jul-03 5:40
Adam Durity31-Jul-03 5:40 
GeneralRe: Hiding Form on Startup Pin
JM_FL31-Jul-03 6:27
JM_FL31-Jul-03 6:27 
GeneralRe: Hiding Form on Startup Pin
Ista31-Jul-03 6:57
Ista31-Jul-03 6:57 

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.