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.) -
-
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
-
Dim fs As Graphics = Me.CreateGraphics
-
Dim text As Integer = 1
-
-
Dim redBrush As New SolidBrush(Color.Red)
-
Dim back As New SolidBrush(Color.Black)
-
Dim rect As New Rectangle(308, 526, 30, 30)
-
Dim pacmen As New SolidBrush(Color.Yellow)
-
-
Select Case text Mod 5
-
Case 1
-
fs.FillPie(redBrush, rect, 200, 320)
-
Case 2
-
fs.FillPie(redBrush, rect, 260, 380)
-
Case 3
-
fs.FillPie(pacmen, rect, 230, 310)
-
Case 4
-
fs.FillPie(redBrush, rect, 0, 360)
-
Case 5
-
fs.FillPie(pacmen, rect, 200, 320)
-
End Select
-
text += 1
-
End Sub
-
Any help would be greatly appreciated.
timer2.start is done in a button and it plays the first case, but that's all.
1 1285
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:.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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 draw a dotted line?
Thank you.
|
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 send to back feature etc.
How can I do this .. where should I start?
|
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 (centered in the label)
on this label.
My font on this label is Courier new - hence fixed width character
cells.
|
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 referenced, custom dll. I call
a PrintImage routine in the dll and pass it only the the
Picturebox.hdc from the main form. The dll's print routine
draws to the hdc and it shows up in the picturebox
perfectly.
I would like to do a similar thing...
|
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 get all kinds of screen artifacts and weirdness.
My general goal is: list item with a few areas for text, every other item
shaded a light color for readability, font color changes with selection. The
listbox is populated with custom structurs...
| |
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, especially since tutuorials in
directX often come bundled with other things that I do not need that
complicate the matter. All I need is some simple code to draw an image from a
given path to the screen (and preferably be able to use a Rectangle to...
|
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 I click the menu "Draw" --"New
Drawing". The image with wx.BufferedDC/wx.BufferedPaintDC can move
around on the frame. But If I uncomment those three commented lines in
"class TestFrame" to add a new page (from wx.Notebook) with a tag and
modify...
|
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 want to be able to draw
lines in a picturebox based upon certain data points I have received. I
dragged a picturebox from the toolbar onto my form, but after having gone
through the help files, looking online and trying a variety of things, I...
|
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 stuck.
I'm trying to draw a bitmap on my main form and then to draw a second
bitmap, as if it were a sprite (e.g., a "unit" in a wargame), on top of
the first. The main form renders fine; I handle the Paint event by
creating a temporary Graphics...
|
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 file, but I have been unable to
get any of the overloads to work in VB.NET. I would like to store the *.ico
files in a *.resx file so that users do not need anything other than the
*.dll, but at the moment I am just trying to get any of the overloads...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |