Click here to Skip to main content
15,889,266 members
Home / Discussions / C#
   

C#

 
QuestionDoesnot implement interface member System.IComparable.CompareTo(Object) Pin
ADTC#29-Apr-08 3:06
ADTC#29-Apr-08 3:06 
AnswerRe: Doesnot implement interface member System.IComparable.CompareTo(Object) Pin
J a a n s29-Apr-08 3:09
professionalJ a a n s29-Apr-08 3:09 
Questionyet another one cropped up Pin
ADTC#29-Apr-08 3:19
ADTC#29-Apr-08 3:19 
GeneralInstallation Pin
coders_need29-Apr-08 1:14
coders_need29-Apr-08 1:14 
GeneralRe: Installation Pin
J a a n s29-Apr-08 1:25
professionalJ a a n s29-Apr-08 1:25 
GeneralRe: Installation Pin
Vikram A Punathambekar29-Apr-08 2:17
Vikram A Punathambekar29-Apr-08 2:17 
QuestionHow to use regular expression Pin
Exelioindia29-Apr-08 0:07
Exelioindia29-Apr-08 0:07 
AnswerRe: How to use regular expression Pin
c242329-Apr-08 0:48
c242329-Apr-08 0:48 
GeneralRe: How to use regular expression Pin
Exelioindia29-Apr-08 1:05
Exelioindia29-Apr-08 1:05 
AnswerRe: How to use regular expression Pin
Pete O'Hanlon29-Apr-08 0:51
mvePete O'Hanlon29-Apr-08 0:51 
GeneralRe: How to use regular expression Pin
Exelioindia29-Apr-08 1:03
Exelioindia29-Apr-08 1:03 
GeneralTCP Socket Exception , two ports / one IP address Pin
Rick van Woudenberg28-Apr-08 23:40
Rick van Woudenberg28-Apr-08 23:40 
GeneralRe: TCP Socket Exception , two ports / one IP address Pin
Bert delaVega29-Apr-08 5:07
Bert delaVega29-Apr-08 5:07 
GeneralNumericUpDown control in ToolStrip Pin
mcbass28-Apr-08 23:00
mcbass28-Apr-08 23:00 
GeneralRe: NumericUpDown control in ToolStrip Pin
John_Adams29-Apr-08 1:04
John_Adams29-Apr-08 1:04 
GeneralRe: NumericUpDown control in ToolStrip Pin
mcbass29-Apr-08 2:28
mcbass29-Apr-08 2:28 
Thanks a lot, the ToolStripControlHost did it. However I only get it to work when I manually edit the Control.Designer.cs and its not showing in the IDE, anything I have to add here ?

This is what I have :


<br />
public class ToolStripNumericUpDown : ToolStripControlHost {<br />
        // Call the base constructor passing in a NumericUpDown instance.<br />
        public ToolStripNumericUpDown() : base(new NumericUpDown()) {<br />
        }<br />
<br />
        /// <summary><br />
        /// Gets the numeric up down control.<br />
        /// </summary><br />
        /// <value>The numeric up down control.</value><br />
        public NumericUpDown NumericUpDownControl {<br />
            get {<br />
                return Control as NumericUpDown;<br />
            }<br />
        }<br />
<br />
<br />
<br />
        /// <summary><br />
        /// Gets or sets the value.<br />
        /// </summary><br />
        /// <value>The value.</value><br />
        public decimal  Value {<br />
            get {<br />
                return NumericUpDownControl.Value;<br />
            }<br />
            set {<br />
                value = NumericUpDownControl.Value;<br />
            }<br />
        }<br />
<br />
        /// <summary><br />
        /// Subscribe and unsubscribe the control events you wish to expose.<br />
        /// </summary><br />
        /// <param name="c">The c.</param><br />
        protected override void OnSubscribeControlEvents(Control c) {<br />
            // Call the base so the base events are connected.<br />
            base.OnSubscribeControlEvents(c);<br />
<br />
            // Cast the control to a NumericUpDown control.<br />
            NumericUpDown mumControl = (NumericUpDown)c;<br />
<br />
            // Add the event.<br />
            mumControl.ValueChanged += new EventHandler ( OnValueChanged );<br />
        }<br />
<br />
        /// <summary><br />
        /// Subscribe and unsubscribe the control events you wish to expose.<br />
        /// </summary><br />
        /// <param name="c">The c.</param><br />
        protected override void OnUnsubscribeControlEvents(Control c) {<br />
            // Call the base method so the basic events are unsubscribed.<br />
            base.OnUnsubscribeControlEvents(c);<br />
<br />
            // Cast the control to a NumericUpDown control.<br />
            NumericUpDown mumControl = (NumericUpDown) c;<br />
<br />
            // Remove the event.<br />
            mumControl.ValueChanged -= new EventHandler ( OnValueChanged );<br />
        }<br />
<br />
        // Declare the ValueChanged event.<br />
        public event EventHandler ValueChanged;<br />
<br />
        // Raise the ValueChanged event.<br />
        private void OnValueChanged(object sender, EventArgs e) {<br />
            if (ValueChanged != null) {<br />
                ValueChanged(this, e);<br />
            }<br />
        }<br />
    }<br />


thx agian
GeneralRe: NumericUpDown control in ToolStrip Pin
PubLee23-Jan-10 0:16
PubLee23-Jan-10 0:16 
GeneralRunning code in a different appdomain Pin
laserbaronen28-Apr-08 22:59
laserbaronen28-Apr-08 22:59 
GeneralRe: Running code in a different appdomain Pin
Simon P Stevens28-Apr-08 23:27
Simon P Stevens28-Apr-08 23:27 
GeneralRe: Running code in a different appdomain Pin
Simon P Stevens28-Apr-08 23:31
Simon P Stevens28-Apr-08 23:31 
GeneralRe: Running code in a different appdomain Pin
laserbaronen29-Apr-08 1:25
laserbaronen29-Apr-08 1:25 
GeneralRe: Running code in a different appdomain Pin
Simon P Stevens29-Apr-08 1:59
Simon P Stevens29-Apr-08 1:59 
GeneralAdding header to the print of DevExpress Grid Control Pin
Chapooki28-Apr-08 22:58
Chapooki28-Apr-08 22:58 
GeneralRe: Adding header to the print of DevExpress Grid Control Pin
Bert delaVega29-Apr-08 8:24
Bert delaVega29-Apr-08 8:24 
GeneralRe: Adding header to the print of DevExpress Grid Control Pin
Chapooki29-Apr-08 18:10
Chapooki29-Apr-08 18:10 

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.