Click here to Skip to main content
15,891,864 members
Home / Discussions / Windows Forms
   

Windows Forms

 
GeneralRe: How to Improve the performance of a database application Pin
Wendelius23-Dec-08 3:23
mentorWendelius23-Dec-08 3:23 
GeneralRe: How to Improve the performance of a database application Pin
Uma Kameswari23-Dec-08 18:05
Uma Kameswari23-Dec-08 18:05 
GeneralRe: How to Improve the performance of a database application Pin
Wendelius28-Dec-08 10:35
mentorWendelius28-Dec-08 10:35 
QuestionVisual studio addin Pin
Fadi Yoosuf14-Dec-08 16:11
Fadi Yoosuf14-Dec-08 16:11 
AnswerRe: Visual studio addin Pin
Lev Danielyan15-Dec-08 19:55
Lev Danielyan15-Dec-08 19:55 
QuestionArrayList Problem Pin
bapu288912-Dec-08 8:31
bapu288912-Dec-08 8:31 
QuestionNot able to retain DataGridViewComboBox Cell's selected item value Pin
Member 62119111-Dec-08 18:38
Member 62119111-Dec-08 18:38 
QuestionSimple custom control repaint problem Pin
TheRedEye10-Dec-08 22:05
TheRedEye10-Dec-08 22:05 
I've done a simple custom label in .net 2.0 that allows a border color to be set. The problem is I can't get the control to repaint if another form is dragged over the control. I've tried the SetStyle() method and it doesn't seem to help.
   public partial class BorderLabel: Label
    {
        public BorderLabel()
        {
            InitializeComponent();
            this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer, true); // this doesn't help        
        }
                  
        private Color _borderColor = Color.Black;
        public Color BorderColor
        {
            get { return _borderColor; }
            set
            {
                _borderColor = value;
                Invalidate();
            }
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);
            int borderWidth = 1;
            ControlPaint.DrawBorder(e.Graphics, e.ClipRectangle, _borderColor,
                      borderWidth, ButtonBorderStyle.Solid, _borderColor, borderWidth,
                      ButtonBorderStyle.Solid, _borderColor, borderWidth, ButtonBorderStyle.Solid,
                      _borderColor, borderWidth, ButtonBorderStyle.Solid);
        }
}

What other events should I be overriding to cause the control to repaint when a form is dragged over the control?
AnswerRe: Simple custom control repaint problem Pin
Dave Kreskowiak11-Dec-08 2:04
mveDave Kreskowiak11-Dec-08 2:04 
GeneralRe: Simple custom control repaint problem Pin
TheRedEye11-Dec-08 4:05
TheRedEye11-Dec-08 4:05 
GeneralRe: Simple custom control repaint problem Pin
Dave Kreskowiak11-Dec-08 4:42
mveDave Kreskowiak11-Dec-08 4:42 
Questionhow to change language dependent datetime picker dynamically in .net window forms Pin
arunmca.r10-Dec-08 21:43
arunmca.r10-Dec-08 21:43 
AnswerRe: how to change language dependent datetime picker dynamically in .net window forms Pin
Mycroft Holmes11-Dec-08 20:37
professionalMycroft Holmes11-Dec-08 20:37 
GeneralRe: how to change language dependent datetime picker dynamically in .net window forms Pin
arunmca.r14-Dec-08 17:31
arunmca.r14-Dec-08 17:31 
Questionarraylist problem Pin
bapu288910-Dec-08 9:12
bapu288910-Dec-08 9:12 
AnswerRe: arraylist problem Pin
Ben Fair10-Dec-08 10:05
Ben Fair10-Dec-08 10:05 
QuestionRe: arraylist problem Pin
bapu288910-Dec-08 19:57
bapu288910-Dec-08 19:57 
AnswerRe: arraylist problem Pin
Ben Fair11-Dec-08 3:13
Ben Fair11-Dec-08 3:13 
QuestionRe: arraylist problem Pin
bapu288911-Dec-08 9:43
bapu288911-Dec-08 9:43 
QuestionAccessing ListBox from multiple threads Pin
Mr.Brainley8-Dec-08 5:39
Mr.Brainley8-Dec-08 5:39 
AnswerRe: Accessing ListBox from multiple threads Pin
Giorgi Dalakishvili8-Dec-08 6:01
mentorGiorgi Dalakishvili8-Dec-08 6:01 
GeneralRe: Accessing ListBox from multiple threads Pin
Mr.Brainley8-Dec-08 6:12
Mr.Brainley8-Dec-08 6:12 
GeneralRe: Accessing ListBox from multiple threads Pin
Giorgi Dalakishvili8-Dec-08 6:28
mentorGiorgi Dalakishvili8-Dec-08 6:28 
AnswerRe: Accessing ListBox from multiple threads Pin
Fadi Yoosuf13-Dec-08 3:03
Fadi Yoosuf13-Dec-08 3:03 
QuestionPanel OnPaint Help [modified] Pin
Zippy Pack7-Dec-08 8:45
Zippy Pack7-Dec-08 8:45 

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.