Creating Graphical Objects is VB.NET

G

Guest

Hello everyone:
I'm trying to teach myself Visual Basic 2005 .NET and the best way I have
found is to create a project in Visual Basic 2005 .NET.

The project concept is: I want to create a 'canvas' upon a form. On the
'Canvas' object I want to place smaller rectangular objects. The 'Canvas'
area is the area I'm limited too. In other words, I can only have objects
placed on the canvas.

How can I create a graphical object(The canvas) and then place seperate
graphical objects onto it? I want the objects that are placed on the canvas
to be moveable if possible.

Thanks,
 
A

Armin Zingler

Mark said:
Hello everyone:
I'm trying to teach myself Visual Basic 2005 .NET and the best way I
have found is to create a project in Visual Basic 2005 .NET.

The project concept is: I want to create a 'canvas' upon a form. On
the 'Canvas' object I want to place smaller rectangular objects. The
'Canvas' area is the area I'm limited too. In other words, I can
only have objects placed on the canvas.

How can I create a graphical object(The canvas) and then place
seperate graphical objects onto it? I want the objects that are
placed on the canvas to be moveable if possible.

- A drawing target is the Graphics object.
- A persistent drawing is a Bitmap object.
- You can create a Graphics object in order to draw on a Bitmap (see
Graphics.FromImage)
- Visible images on the screen are not persistent. You have to draw
everything again in the control's paint event. This is either drawing all
objects or the prepared Bitmap. Outside the Paint event, you can call
TheControl.CreateGraphics.
- To create movable objects, you must maintain a list of them (in any kind
of list) and handle the mouse events in order to move their internal
position. Then repaint everything to get the current image.


Armin
 
Joined
Jul 17, 2011
Messages
4
Reaction score
0
"Mark" <[email protected]> schrieb
> Hello everyone:
> I'm trying to teach myself Visual Basic 2005 .NET and the best way I
> have found is to create a project in Visual Basic 2005 .NET.
>
> The project concept is: I want to create a 'canvas' upon a form. On
> the 'Canvas' object I want to place smaller rectangular objects. The
> 'Canvas' area is the area I'm limited too. In other words, I can
> only have objects placed on the canvas.
>
> How can I create a graphical object(The canvas) and then place
> seperate graphical objects onto it? I want the objects that are
> placed on the canvas to be moveable if possible.


- A drawing target is the Graphics object.
- A persistent drawing is a Bitmap object.
- You can create a Graphics object in order to draw on a Bitmap (see
Graphics.FromImage)
- Visible images on the screen are not persistent. You have to draw
everything again in the control's paint event. This is either drawing all
objects or the prepared Bitmap. Outside the Paint event, you can call
TheControl.CreateGraphics.
- To create movable objects, you must maintain a list of them (in any kind
of list) and handle the mouse events in order to move their internal
position. Then repaint everything to get the current image.


Armin


hello! i'm actually having the same project and i quiet understand the concept of how to do this but i'm having difficulty how to start , what to study and what to code because i'm just new to vb.net

i hope you could give me an idea on how will start coding those drawing target, etc.

your help would be greatly and deeply appreciated ::bow: :D
 

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