473,322 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Updating and Drawing Shapes on a Form

I am just beginning to get into designing (hand-coding) forms with .Net using C++. I am trying to write a very simple application that has buttons on it and draws a black ball every 10 milliseconds that bounces around the screen which I plan to use to learn more about programming in .Net and as a reference for future programs. I placed every function and variable in a single class (except the main() function) that extends the Form class. I placed a call to Invalidate(), Update(), and Sleep(10) (in that order) in an idle function which I then used as the function to handle the Application Class's Idle event. The program does draw the black ball properly and does call the idle function but it only calls it after another event occures (such as when the mouse is moved over the form). I was wondering whether anyone could either tell me a way to fix this problem so that the black ball is drawn and moved every 10 milliseconds or provide me with a better way to do this. Any help on this would be greatly appriciated.
Jul 21 '05 #1
0 1338

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: BG | last post by:
We're having trouble writing the code to update a UI control (label.Text) from a secondary thread. We're using C# with Windows Forms. We have a main form named MainForm, a splash screen form...
3
by: steve bull | last post by:
I have a program in which I draw various shapes to a form but I would like to move it off the form into a user control. The painting on the form takes a significant amount of time. I was thinking of...
1
by: Andreas Schubert | last post by:
Hello newsgroup, I am pretty new to .NET and need some advise on how to approach to the following: I have to create an application with a drawing surface, where some predefined shapes...
2
by: Dursun | last post by:
Collegues, is it possible to do the foloowing: Let end user draw specific shapes (a circle that has a number within it and a connector that points to a specific area on the background image)...
0
by: Jack | last post by:
I am just beginning to get into designing (hand-coding) forms with .Net using C++. I am trying to write a very simple application that has buttons on it and draws a black ball every 10 milliseconds...
9
by: davetelling | last post by:
I am not a programmer, I'm an engineer trying to make an interface to a product I'm designing. I have used C# to make a form that interrogates the unit via the serial port and receives the data. I...
10
by: Tina | last post by:
I need to find drawing software for my websites. I'm guessing that Adobe Photoshop is an overkill. What's best for creating bitmaps usable for websites? Thanks, T
6
by: dr3amxstar | last post by:
Hi Im using VB express 2005 I encountered some problems while drawing shapes in visual basic. Whenever i print shape on the picturebox it appears, but when i minimize it or go to another form and...
4
debasisdas
by: debasisdas | last post by:
This article contains the basic syntax to draw graphics of various shapes and sizes in Visual Basic 6.0. Different types of geometrical shapes (rectangle, square, circle, arc, ellipse etc.) can be...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.