User Profile

Collapse

Profile Sidebar

Collapse
phommy
phommy
Last Activity: Apr 28 '10, 06:10 AM
Joined: Mar 9 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • try this: set Enabled=false after it is set to true with an input 'ABC'

    Code:
        public partial class Form1 : Form
        {
            Button btn;
            TextBox txt;
            public Form1()
            {
                InitializeComponent();
    
                //a textbox
                txt = new TextBox();
                Controls.Add(txt);
    
                //a button to change
    ...
    See more | Go to post

    Leave a comment:


  • you mean the controls' Enabled property is a result of more than one variant, is it?
    I'm afraid you need to set the Enabled value every time the input changes, or code want to change enable to true. i don't know any shortcut

    or you may change the logic slightly. Allow coder to change enabled property. and when endusers click the button with a input 'ABC', show a alert and return
    See more | Go to post

    Leave a comment:


  • I'm sorry to say that's a foolish question. I found there's no business with "DoubleBuff er".
    Under 16-bit color the backcolor of control is "GetNearestColo r"ed when drawn by system, so the color is different with
    Code:
    e.Graphics.FillRectangle(new SolidBrush(BackColor)
    thank you all the same
    See more | Go to post

    Leave a comment:


  • "FillRectangle" draws with a different color when DoubleBuffered

    please test this:

    Code:
            public Form1()
            {
                InitializeComponent();
                this.DoubleBuffered = true;
            }
    
            protected override void OnPaint(PaintEventArgs e)
            {
                e.Graphics.FillRectangle(new SolidBrush(BackColor), 0, 0, 50, 50);
                base.OnPaint(e);
            }
    The color it draw with is not...
    See more | Go to post
No activity results to display
Show More
Working...