Click here to Skip to main content
15,880,405 members
Home / Discussions / C#
   

C#

 
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 
GeneralDataGridView Issue Pin
Member 400849228-Apr-08 22:38
Member 400849228-Apr-08 22:38 
GeneralRe: DataGridView Issue Pin
dan!sh 28-Apr-08 23:20
professional dan!sh 28-Apr-08 23:20 
GeneralRe: DataGridView Issue Pin
Member 400849229-Apr-08 0:44
Member 400849229-Apr-08 0:44 
GeneralRe: DataGridView Issue Pin
dan!sh 29-Apr-08 1:16
professional dan!sh 29-Apr-08 1:16 
Generalunable to find a version of the runtime to run this application Pin
Muhammad Gouda28-Apr-08 22:29
Muhammad Gouda28-Apr-08 22:29 
GeneralRe: unable to find a version of the runtime to run this application Pin
J a a n s29-Apr-08 5:02
professionalJ a a n s29-Apr-08 5:02 
GeneralAccess Controls from other Classes Pin
softwarejaeger28-Apr-08 22:25
softwarejaeger28-Apr-08 22:25 
General[Message Deleted] Pin
stancrm28-Apr-08 22:39
stancrm28-Apr-08 22:39 

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.