473,402 Members | 2,055 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,402 software developers and data experts.

Unable to draw over a drawing.

Something is going wrong, I have no idea what it is. I just simply want to draw over pacman so he can open and close his mouth, so there would be 5 pacman's, with different mouth positions.

(Note: The change of color was just to make sure I was seeing the results.)

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
  3.         Dim fs As Graphics = Me.CreateGraphics
  4.         Dim text As Integer = 1
  5.  
  6.         Dim redBrush As New SolidBrush(Color.Red)
  7.         Dim back As New SolidBrush(Color.Black)
  8.         Dim rect As New Rectangle(308, 526, 30, 30)
  9.         Dim pacmen As New SolidBrush(Color.Yellow)
  10.  
  11.         Select Case text Mod 5
  12.             Case 1
  13.                 fs.FillPie(redBrush, rect, 200, 320)
  14.             Case 2
  15.                 fs.FillPie(redBrush, rect, 260, 380)
  16.             Case 3
  17.                 fs.FillPie(pacmen, rect, 230, 310)
  18.             Case 4
  19.                 fs.FillPie(redBrush, rect, 0, 360)
  20.             Case 5
  21.                 fs.FillPie(pacmen, rect, 200, 320)
  22.         End Select
  23.         text += 1
  24.     End Sub
  25.  
Any help would be greatly appreciated.

timer2.start is done in a button and it plays the first case, but that's all.
Jan 26 '11 #1
1 1272
Gah! I'm such an idiot!

It was just a simple matter of changing it into a static variable, I always forget that.

Sorry for wasting your time D:.
Jan 26 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Rene | last post by:
I tried searching the newsgroups to see how do you draw a dotted line but I was unable to find an answer, drawing a straight line is very easy but not a dotted one. So the question is, how do I...
2
by: Champika Nirosh | last post by:
Hi, I want to create drawing board application that can draw Line, rectagle, circle and free hand drawing. Each drawing need to be transparent, moveable (draggable), have bring to front and...
4
by: Stuart Norris | last post by:
Dear Readers, I am attempting to draw box around some text using unicode on multiline label. The label is forty characters wide and 12 lines deep. I have been trying to draw a box around text...
13
by: Metallicraft | last post by:
I have a vb6 application. On the main form is a picture box with one or two images and several pieces of text displayed in it. These are created on the fly using gdi32 routines that are all in a...
2
by: dan heskett | last post by:
I am owner-drawing a listbox, in an attempt to create a nice list with some custom "fields" and text layout. Essentially it works, but I must be missing something big, conceptually, because I...
2
by: Anagnos | last post by:
I am a relatively inexperienced VB programmer and I need to draw images to the screen at a lighting fast rate as to avoid flicker. However, I have been unable to figure out how to use Direct X,...
1
by: zxo102 | last post by:
Hi everyone, I have tried two days to figure out how to draw the image in wx.BufferedDC on the page created by AddPage of wx.Notebook but still got no clue. The attached example works fine. If...
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...
2
by: Carl | last post by:
I'm new to C#, and I have only limited programming experience. I've been doing the video tutorials at MS's website, and they're very helpful, but I decided to experiment with GDI+ and have gotten...
2
by: Nathan Sokalski | last post by:
I am attempting to create icons for controls I have created using VB.NET by using the System.Drawing.ToolboxBitmap attribute. I have managed to do this in C# by specifying the path to the *.ico...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.