Click here to Skip to main content
15,949,686 members
Home / Discussions / C#
   

C#

 
GeneralRe: progressBar with percents display Pin
Som Shekhar18-Apr-10 4:13
Som Shekhar18-Apr-10 4:13 
AnswerRe: progressBar with percents display Pin
igalep13218-Apr-10 11:48
igalep13218-Apr-10 11:48 
QuestionMessage Removed Pin
17-Apr-10 21:19
Nadia Monalisa17-Apr-10 21:19 
AnswerRe: Do I need to uninstall Visual Studio 2008 in order to install VS 2010 Professional ? Pin
OriginalGriff17-Apr-10 21:30
mveOriginalGriff17-Apr-10 21:30 
GeneralRe: Do I need to uninstall Visual Studio 2008 in order to install VS 2010 Professional ? Pin
Nadia Monalisa17-Apr-10 21:40
Nadia Monalisa17-Apr-10 21:40 
QuestionWill my .NET 2.0 Control work in .NET 4.0 application ? Pin
Nadia Monalisa17-Apr-10 21:14
Nadia Monalisa17-Apr-10 21:14 
AnswerRe: Will my .NET 2.0 Control work in .NET 4.0 application ? Pin
Abhinav S17-Apr-10 23:19
Abhinav S17-Apr-10 23:19 
QuestionSelect Area Pin
Frozzeg17-Apr-10 10:44
Frozzeg17-Apr-10 10:44 
Hello. I wrote a simple select area, but its working slow when form is maximized, who knows some alternative fast methods for this

here is my code

sry for bad english
public partial class Form1 : Form
    {
        bool canResize;
        int mX, mY;
        Rectangle rect = new Rectangle();

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Paint(object sender, PaintEventArgs e)
        {
            e.Graphics.DrawRectangle(new Pen(Brushes.Purple, 2), rect);
        }

        private void Form1_MouseDown(object sender, MouseEventArgs e)
        {
            canResize = true;
            mX = e.X; mY = e.Y;

            rect.Location = new Point(mX, mY);
        }

        private void Form1_MouseUp(object sender, MouseEventArgs e)
        {
            canResize = false;
        }

        private void Form1_MouseMove(object sender, MouseEventArgs e)
        {
            if (canResize)
            {
                if (mX < e.X)
                {
                    rect.X = mX;
                    rect.Width = e.X - mX;
                }
                else
                {
                    rect.X = e.X;
                    rect.Width = mX - e.X;
                }
                if (mY < e.Y)
                {
                    rect.Y = mY;
                    rect.Height = e.Y - mY;
                }
                else
                {
                    rect.Y = e.Y;
                    rect.Height = mY - e.Y;
                }
                this.Invalidate();
            }
        }
    }

AnswerRe: Select Area Pin
Luc Pattyn17-Apr-10 11:42
sitebuilderLuc Pattyn17-Apr-10 11:42 
GeneralRe: Select Area [modified] Pin
Frozzeg17-Apr-10 22:59
Frozzeg17-Apr-10 22:59 
QuestionWaiting until myclass.something() is finished Pin
BuggingMe17-Apr-10 9:16
BuggingMe17-Apr-10 9:16 
AnswerRe: Waiting until myclass.something() is finished Pin
Garth J Lancaster17-Apr-10 16:03
professionalGarth J Lancaster17-Apr-10 16:03 
AnswerRe: Waiting until myclass.something() is finished Pin
#realJSOP18-Apr-10 1:35
professional#realJSOP18-Apr-10 1:35 
AnswerRe: Waiting until myclass.something() is finished Pin
Ashfield18-Apr-10 22:28
Ashfield18-Apr-10 22:28 
QuestionDrawing in GDI Pin
snouto17-Apr-10 4:45
snouto17-Apr-10 4:45 
AnswerRe: Drawing in GDI Pin
Dan Mos17-Apr-10 6:50
Dan Mos17-Apr-10 6:50 
QuestionHow to set text of textbox with value user entered in another form at form close Pin
linqabc17-Apr-10 4:29
linqabc17-Apr-10 4:29 
AnswerRe: How to set text of textbox with value user entered in another form at form close Pin
Brij17-Apr-10 4:36
mentorBrij17-Apr-10 4:36 
GeneralRe: How to set text of textbox with value user entered in another form at form close Pin
OriginalGriff17-Apr-10 4:50
mveOriginalGriff17-Apr-10 4:50 
GeneralRe: How to set text of textbox with value user entered in another form at form close Pin
Brij18-Apr-10 0:26
mentorBrij18-Apr-10 0:26 
GeneralRe: How to set text of textbox with value user entered in another form at form close Pin
linqabc17-Apr-10 22:21
linqabc17-Apr-10 22:21 
AnswerRe: How to set text of textbox with value user entered in another form at form close Pin
OriginalGriff17-Apr-10 4:47
mveOriginalGriff17-Apr-10 4:47 
GeneralRe: How to set text of textbox with value user entered in another form at form close Pin
linqabc17-Apr-10 22:26
linqabc17-Apr-10 22:26 
GeneralRe: How to set text of textbox with value user entered in another form at form close Pin
OriginalGriff17-Apr-10 22:36
mveOriginalGriff17-Apr-10 22:36 
GeneralRe: How to set text of textbox with value user entered in another form at form close Pin
linqabc17-Apr-10 22:52
linqabc17-Apr-10 22:52 

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.