Click here to Skip to main content
15,888,016 members
Home / Discussions / C#
   

C#

 
Questionhow to make a service automatic Pin
prasadbuddhika13-May-08 2:59
prasadbuddhika13-May-08 2:59 
AnswerRe: how to make a service automatic Pin
dan!sh 13-May-08 3:02
professional dan!sh 13-May-08 3:02 
QuestionDisassmble GAC-installed assembly Pin
ctoma200513-May-08 2:45
ctoma200513-May-08 2:45 
QuestionFlicker Problem in GDI+ Pin
hdv21213-May-08 2:12
hdv21213-May-08 2:12 
AnswerRe: Flicker Problem in GDI+ Pin
Anthony Mushrow13-May-08 2:35
professionalAnthony Mushrow13-May-08 2:35 
GeneralRe: Flicker Problem in GDI+ Pin
hdv21213-May-08 5:58
hdv21213-May-08 5:58 
GeneralRe: Flicker Problem in GDI+ Pin
Anthony Mushrow13-May-08 6:07
professionalAnthony Mushrow13-May-08 6:07 
GeneralRe: Flicker Problem in GDI+ Pin
hdv21213-May-08 6:17
hdv21213-May-08 6:17 
Thanks again
but do u test your code ?
i run this code, but it's get very bad result :
public partial class Form1 : Form<br />
    {<br />
        int lastX; int lastY; <br />
        bool reverse = false; <br />
        Pen pen = new Pen(Brushes.Red, 2); <br />
        <br />
        public Form1() <br />
        { <br />
            InitializeComponent(); <br />
            this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer, true); this.timer1.Start();<br />
        } <br />
        <br />
        private void panel1_Paint(object sender, PaintEventArgs e) <br />
        { <br />
            this.Paint(e.Graphics, this.lastX, this.lastY);<br />
        }<br />
        <br />
        private void Paint(Graphics g, int x, int y) <br />
        { <br />
            g.Clear(Color.White); <br />
            g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighSpeed; <br />
            g.DrawEllipse(this.pen, new Rectangle(x, y, 100, 100)); <br />
            this.panel1.Invalidate(); <br />
        }<br />
        <br />
        private void timer1_Tick(object sender, EventArgs e) <br />
        { <br />
            if (!this.reverse)             <br />
            { <br />
                if ((this.lastX + 102) <= this.panel1.Width) <br />
                { <br />
                    this.lastX += 2;<br />
                } <br />
                else <br />
                { <br />
                    this.reverse = true;<br />
                } <br />
            } <br />
            else <br />
            { <br />
                if (this.lastX >= 0) <br />
                { <br />
                    this.lastX -= 2; <br />
                } <br />
                else <br />
                { <br />
                    this.reverse = false;<br />
                } <br />
            } this.panel1.Invalidate();<br />
        }<br />
    }

GeneralRe: Flicker Problem in GDI+ Pin
Anthony Mushrow13-May-08 6:18
professionalAnthony Mushrow13-May-08 6:18 
GeneralRe: Flicker Problem in GDI+ Pin
hdv21213-May-08 6:19
hdv21213-May-08 6:19 
GeneralRe: Flicker Problem in GDI+ Pin
Anthony Mushrow13-May-08 6:34
professionalAnthony Mushrow13-May-08 6:34 
GeneralRe: Flicker Problem in GDI+ Pin
hdv21213-May-08 6:42
hdv21213-May-08 6:42 
GeneralRe: Flicker Problem in GDI+ Pin
Anthony Mushrow13-May-08 6:50
professionalAnthony Mushrow13-May-08 6:50 
GeneralRe: Flicker Problem in GDI+ Pin
hdv21213-May-08 6:58
hdv21213-May-08 6:58 
AnswerRe: Flicker Problem in GDI+ Pin
Horacio N. Hdez.13-May-08 3:13
Horacio N. Hdez.13-May-08 3:13 
Questionmouse recognizer Pin
mehrnoosh13-May-08 1:50
mehrnoosh13-May-08 1:50 
AnswerRe: mouse recognizer Pin
Ashfield13-May-08 2:00
Ashfield13-May-08 2:00 
QuestionHow I know that a property is related to a xml file Pin
Guru Call13-May-08 1:29
Guru Call13-May-08 1:29 
QuestionTo Unzip the Files using C# Pin
senthilsstil13-May-08 0:57
senthilsstil13-May-08 0:57 
AnswerRe: To Unzip the Files using C# Pin
Spunky Coder13-May-08 1:06
Spunky Coder13-May-08 1:06 
GeneralRe: To Unzip the Files using C# Pin
dan!sh 13-May-08 1:18
professional dan!sh 13-May-08 1:18 
GeneralThis works fine for me Pin
dan!sh 13-May-08 1:24
professional dan!sh 13-May-08 1:24 
GeneralRe: This works fine for me Pin
Spunky Coder13-May-08 1:28
Spunky Coder13-May-08 1:28 
AnswerRe: To Unzip the Files using C# Pin
carbon_golem13-May-08 1:51
carbon_golem13-May-08 1:51 
Questiondownload from database Pin
Amitava Dutta13-May-08 0:52
Amitava Dutta13-May-08 0: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.