Painting on a Form

S

Stefan Richter

I am just trying to paint on a Form.
I tried it with Bitmap.SetPixel, but that didnt work,
now I tried a method from the MS API.

Public Sub DrawRectangleFloat(ByVal e As PaintEventArgs) ' Create pen.
Dim blackPen As New Pen(Color.Black, 3)
' Create location and size of rectangle.
Dim x As Single = 0.0F
Dim y As Single = 0.0F
Dim width As Single = 200.0F
Dim height As Single = 200.0F
' Draw rectangle to screen.
e.Graphics.DrawRectangle(blackPen, x, y, width, height)
End Sub

This method seems to be called by the event "PaintEventArgs".
Unfortunately I haven't yet really that much expierence with those Events.
How do I call that event to get this rectangle drawn, and could I also do it
without an event???
I tried to write Handles behind the method, but whatever I select, it tells
me the signature wasn't fitting.

What I wanted to do in first place:

Drawing a few bars, that represent procentual values.
I had a look on Crystal, but for some strange reasons it didn't work with
the connection to
my db, I guess (MySQL)

Then I downloaded and installed this VBRKit,
but I have no idea how I should use it.

(http://msdn.microsoft.com/vbasic/vbrkit/default.aspx )
 
G

Guest

Assalam O Alaikum,
i have no idea about painting of form.But i used vbrkit. It is simple to use just extract and run setup.It automatically create a virtual directory and it can run from start->programs->vbresourcekit.From here u can run this.You must have IIS installed on your system.

Allah Hafiz.
 
C

Cor Ligthert

Hi Stefan,

After downloading the resource kit you can install it, it should normaly
install everything.

There comes than an item in your start menu.

Start and your browswer will be opened. Maximise the window, otherwise it
does not show all.

Then you choose for the windows applicaties and in that for the samples.

The GDI clock (it is at the bottom of the samples) is real great to start
with, even when it was only to look at. However the other GDI samples give
also a lot of information.

If there are still questions, feel free to ask.

Cor
 
C

Cor Ligthert

Hi Junaid,

Sorry I was answering messages and overlooked that you did already anwered
this question.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top