Click here to Skip to main content
15,886,788 members
Home / Discussions / C#
   

C#

 
GeneralRe: Threading Pin
MumbleB9-Feb-10 23:35
MumbleB9-Feb-10 23:35 
GeneralRe: Threading Pin
Luc Pattyn10-Feb-10 1:57
sitebuilderLuc Pattyn10-Feb-10 1:57 
QuestionLoading an assembly from a new AppDoamin Pin
ThetaClear9-Feb-10 20:28
ThetaClear9-Feb-10 20:28 
AnswerRe: Loading an assembly from a new AppDoamin Pin
Rob Philpott10-Feb-10 0:11
Rob Philpott10-Feb-10 0:11 
GeneralRe: Loading an assembly from a new AppDoamin Pin
ThetaClear10-Feb-10 9:53
ThetaClear10-Feb-10 9:53 
QuestionRSync Pin
satsumatable9-Feb-10 19:22
satsumatable9-Feb-10 19:22 
QuestionPreventing the dropdown from being opened when drop down button pressed in combobox? Pin
Ron.bharath9-Feb-10 18:53
Ron.bharath9-Feb-10 18:53 
AnswerRe: Preventing the dropdown from being opened when drop down button pressed in combobox? Pin
Hessam Jalali10-Feb-10 1:25
Hessam Jalali10-Feb-10 1:25 
Hello, I think this can be done by intercepting WM_COMMAND message in "WndProc" method.

this may help

public class SuperComboBox:ComboBox
    {
        public class DropDownValidate:EventArgs
        {
            public bool AllowDropDown{get;set;}

            public DropDownValidate()
            {
                this.AllowDropDown = true;
            }
        }

        private const int WM_COMMAND = 0x0111;

        public event EventHandler<DropDownValidate> ValidateOnDropDown;

        private bool _haltDrop;

        protected virtual void OnValidateDropDown(DropDownValidate e)
        {
            if (this.ValidateOnDropDown != null)
                this.ValidateOnDropDown(this, e);
        }

        protected override void WndProc(ref Message m)
        {
            if (m.Msg == WM_COMMAND)
            {
                var validationArg = new DropDownValidate();
                this.OnValidateDropDown(validationArg);
                _haltDrop = !validationArg.AllowDropDown;
                if (_haltDrop) return;
            }
            base.WndProc(ref m);
        }
    }


Good luck
QuestionSuspendLayout ResumeLayout Question Pin
Douglas Kirk9-Feb-10 18:52
Douglas Kirk9-Feb-10 18:52 
AnswerRe: SuspendLayout ResumeLayout Question Pin
Dave Kreskowiak10-Feb-10 2:07
mveDave Kreskowiak10-Feb-10 2:07 
AnswerRe: SuspendLayout ResumeLayout Question Pin
Luc Pattyn10-Feb-10 2:09
sitebuilderLuc Pattyn10-Feb-10 2:09 
QuestionRss Pin
kk.tvm9-Feb-10 18:21
kk.tvm9-Feb-10 18:21 
AnswerRe: Rss Pin
Arun Jacob9-Feb-10 19:13
Arun Jacob9-Feb-10 19:13 
AnswerRe: Rss Pin
Giorgi Dalakishvili9-Feb-10 19:32
mentorGiorgi Dalakishvili9-Feb-10 19:32 
QuestionIEnumerable Min() not working as expected Pin
Member 39190499-Feb-10 16:43
Member 39190499-Feb-10 16:43 
AnswerRe: IEnumerable Min() not working as expected Pin
Dave Kreskowiak10-Feb-10 2:02
mveDave Kreskowiak10-Feb-10 2:02 
QuestionWhat is the use of e.Handled in the KeyDown event Pin
Kalvin @ Work9-Feb-10 11:04
Kalvin @ Work9-Feb-10 11:04 
AnswerRe: What is the use of e.Handled in the KeyDown event Pin
loyal ginger9-Feb-10 11:22
loyal ginger9-Feb-10 11:22 
QuestionDatagridview C# Editable combo box control. Pin
Omersayeed9-Feb-10 7:45
Omersayeed9-Feb-10 7:45 
QuestionSQL select on two tables takes too long Pin
TheJudeDude9-Feb-10 7:42
TheJudeDude9-Feb-10 7:42 
AnswerRe: SQL select on two tables takes too long Pin
Jeremy Hutchinson9-Feb-10 8:37
professionalJeremy Hutchinson9-Feb-10 8:37 
GeneralRe: SQL select on two tables takes too long Pin
TheJudeDude9-Feb-10 9:46
TheJudeDude9-Feb-10 9:46 
AnswerRe: SQL select on two tables takes too long Pin
kevinnicol9-Feb-10 8:56
kevinnicol9-Feb-10 8:56 
GeneralRe: SQL select on two tables takes too long Pin
TheJudeDude9-Feb-10 9:45
TheJudeDude9-Feb-10 9:45 
GeneralRe: SQL select on two tables takes too long Pin
TheJudeDude9-Feb-10 10:02
TheJudeDude9-Feb-10 10:02 

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.