Click here to Skip to main content
16,018,916 members
Home / Discussions / C#
   

C#

 
GeneralRe: static property Pin
George_George11-Jun-08 18:54
George_George11-Jun-08 18:54 
Questionout variable Pin
George_George11-Jun-08 16:12
George_George11-Jun-08 16:12 
AnswerRe: out variable Pin
N a v a n e e t h11-Jun-08 16:42
N a v a n e e t h11-Jun-08 16:42 
GeneralRe: out variable Pin
George_George11-Jun-08 16:55
George_George11-Jun-08 16:55 
GeneralRe: out variable Pin
N a v a n e e t h11-Jun-08 16:59
N a v a n e e t h11-Jun-08 16:59 
GeneralRe: out variable Pin
George_George11-Jun-08 17:58
George_George11-Jun-08 17:58 
QuestionPaint problem... Pin
abrar from uet lahore11-Jun-08 14:16
abrar from uet lahore11-Jun-08 14:16 
AnswerRe: Paint problem... Pin
Anthony Mushrow11-Jun-08 14:39
professionalAnthony Mushrow11-Jun-08 14:39 
Rather than shifting a bunch of panels, i recomend you just draw the images yourself. To get rid of flickering use double buffering. I forget exactly how you do that, but it should be an option in the designer (for your form) and its pretty easy to google.

You'll want to be drawing the images in your forms OnPaint event, and this is quite simple. You will also need a way to track the location of your pics though and you should use a timer to change these variables so that you get smooth motion, something like this perhaps:

Time myTimer = ...;
myTimer.Interval = 100;
Bitmap imageOne = ...;
int xOne,yOne;
Bitmap imageTwo = ...;
int xTwo,yTwo;
...
void OnPaint(PaintEventArgs e)
{
  e.Graphics.DrawImageUnscaled(imageOne, xOne, yOne);
  e.Graphics.DrawImageUnscaled(imageTwo, xTwo, yTwo);
}

void TimerTick(object sender, EventArgs e)
{
  if(xOne < XX)
    xOne += 20;
  if(xTwo < XX)
    xTwo += 20;

  this.Invalidate();
}


EDIT: If you use a timer like this and it's still too jumpy, then you're gonna need to use a better timer that the one .Net supplies. Your gonna need to go back in time to timeSetEvent and timeKillEvent from winmm.dll

My current favourite word is: I'm starting to run out of fav. words!
-SK Genius

Game Programming articles start -here[^]-

QuestionUnable to play audio from client Pin
vayanan11-Jun-08 12:27
vayanan11-Jun-08 12:27 
AnswerRe: Unable to play audio from client Pin
Christian Graus11-Jun-08 12:28
protectorChristian Graus11-Jun-08 12:28 
QuestionDoes Anyone has a Codegenerator for Oracle DAL Pin
Het210911-Jun-08 10:01
Het210911-Jun-08 10:01 
AnswerRe: Does Anyone has a Codegenerator for Oracle DAL Pin
DaveyM6911-Jun-08 10:58
professionalDaveyM6911-Jun-08 10:58 
GeneralRe: Does Anyone has a Codegenerator for Oracle DAL Pin
Het210911-Jun-08 11:12
Het210911-Jun-08 11:12 
GeneralRe: Does Anyone has a Codegenerator for Oracle DAL Pin
Christian Graus11-Jun-08 11:35
protectorChristian Graus11-Jun-08 11:35 
GeneralRe: Does Anyone has a Codegenerator for Oracle DAL Pin
Het210911-Jun-08 11:40
Het210911-Jun-08 11:40 
GeneralRe: Does Anyone has a Codegenerator for Oracle DAL Pin
Christian Graus11-Jun-08 12:15
protectorChristian Graus11-Jun-08 12:15 
AnswerRe: Does Anyone has a Codegenerator for Oracle DAL Pin
darkelv11-Jun-08 19:45
darkelv11-Jun-08 19:45 
QuestionOpenFileDialog with Windows Impersonation using C# Pin
B3RN4RD1N011-Jun-08 8:29
B3RN4RD1N011-Jun-08 8:29 
AnswerRe: OpenFileDialog with Windows Impersonation using C# Pin
DaveyM6911-Jun-08 9:54
professionalDaveyM6911-Jun-08 9:54 
QuestionHow can I handle any keys press in my C# form? Pin
Mohammad Dayyan11-Jun-08 7:27
Mohammad Dayyan11-Jun-08 7:27 
AnswerRe: How can I handle any keys press in my C# form? Pin
dimaj11-Jun-08 7:29
dimaj11-Jun-08 7:29 
GeneralRe: How can I handle any keys press in my C# form? Pin
Mohammad Dayyan11-Jun-08 7:32
Mohammad Dayyan11-Jun-08 7:32 
GeneralRe: How can I handle any keys press in my C# form? Pin
dimaj11-Jun-08 7:43
dimaj11-Jun-08 7:43 
AnswerRe: How can I handle any keys press in my C# form? Pin
Christian Graus11-Jun-08 7:35
protectorChristian Graus11-Jun-08 7:35 
AnswerRe: How can I handle any keys press in my C# form? Pin
Giorgi Dalakishvili11-Jun-08 7:36
mentorGiorgi Dalakishvili11-Jun-08 7:36 

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.