Drawing Board (White Board)

C

Champika Nirosh

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?

Right now I have used a panel as the drawing board and each of the drawing
object (line, circle etc) as user controls overriding the OnPaintBackGround.
the user control draw on the board upon variuos mouse events as appropriate.
But I fail to acheive the transparency. What is the best way to do this?? I
mean if I drew a rectangle I draw rectagle (not a filled one) in the user
control and add it to the main drawing board but then it just make a white
rectangle hiding all the other drwing comes under the new rectangle.

Get me a direction if I am doing some thing wrong and If I am doing it
correct what I have missing??

Thanks,
Regards,
Nirosh.
 
G

Guest

Hi there...

Sorry i'm not here to answer you question, but instead...I need to get some help from you!! =
Are you developing a WindowsForm or a WebForm?? I need to create this drawing board on a
ASP.NET form (using vb.net or c#). May I ask you what control you use to draw the circles, retangles and lines?
And are you just using a Panel as your drawing board??? I have no idea how I should start this project...Please Help!!

Thanks in advance!!!
Jasmin

----- Champika Nirosh wrote: ----

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 t
front and send to back feature etc

How can I do this .. where should I start

Right now I have used a panel as the drawing board and each of the drawin
object (line, circle etc) as user controls overriding the OnPaintBackGround
the user control draw on the board upon variuos mouse events as appropriate
But I fail to acheive the transparency. What is the best way to do this??
mean if I drew a rectangle I draw rectagle (not a filled one) in the use
control and add it to the main drawing board but then it just make a whit
rectangle hiding all the other drwing comes under the new rectangle

Get me a direction if I am doing some thing wrong and If I am doing i
correct what I have missing?

Thanks
Regards
Nirosh
 
C

Champika Nirosh

Hi,

Sorry for the late reply

I am developing a User Control that display on a ASPX page. there I
developed a class object (typically called as c# applet) and add it to the
html manullly using the object tag.

I use c# and won't heart if you are using vb, I guess.

I have a one Object class that extends a UserControl and there I have
override the OnPaintBackGround to get the object transperency. and All the
lines Circle and Rect are extended objects of the Object class. For the main
drawing board (drawing area) I use a panel. There I am using a dynamic
bitmap image as well, that is as a background image of the main drawing
baord for avoiding periodic refreshing.. so since you have already started
this I think this note will help you to get some idea..

jasmineC said:
Hi there....

Sorry i'm not here to answer you question, but instead...I need to get some help from you!! =P
Are you developing a WindowsForm or a WebForm?? I need to create this drawing board on an
ASP.NET form (using vb.net or c#). May I ask you what control you use to
draw the circles, retangles and lines??
And are you just using a Panel as your drawing board??? I have no idea how
I should start this project...Please Help!!!
 
P

Peter Duniho

chandrahas said:
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?

Right now I have used a panel as the drawing board and each of the drawing
object (line, circle etc) as user controls overriding the OnPaintBackGround.
the user control draw on the board upon variuos mouse events as appropriate.
But I fail to acheive the transparency. What is the best way to do this?? I
mean if I drew a rectangle I draw rectagle (not a filled one) in the user
control and add it to the main drawing board but then it just make a white
rectangle hiding all the other drwing comes under the new rectangle.

Get me a direction if I am doing some thing wrong and If I am doing it
correct what I have missing??

If you're going to go the custom control route, overriding OnPaint() is
more appropriate than overriding OnPaintBackground().

However, for your purposes, you probably do not want to use any control
at all for each shape. Instead, have a single custom control
(inheriting just the Control class, not UserControl), in which you
override OnPaint() and handle drawing each drawn object in there.
Instead of letting .NET handle keeping track of the objects, you'll have
to create your own data structure to do so (e.g. a list of objects,
ordered back-to-front, and drawn in that order).

Pete
 
C

Chris Dunaway

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?

Right now I have used a panel as the drawing board and each of the drawing
object (line, circle etc) as user controls overriding the OnPaintBackGround.
the user control draw on the board upon variuos mouse events as appropriate.
But I fail to acheive the transparency. What is the best way to do this??I
mean if I drew a rectangle I draw rectagle (not a filled one) in the user
control and add it to the main drawing board but then it just make a white
rectangle hiding all the other drwing comes under the new rectangle.

Get me a direction if I am doing some thing wrong and If I am doing it
correct what I have missing??

Thanks,
Regards,
Chandrahas

Fromhttp://webcache.googleusercontent.com/search?q=cache:6AfTt546VjQJ:www...

Posted via DevelopmentNow.com Groupshttp://www.developmentnow.com/g/

See this page:

http://www.bobpowell.net/manipulate_graphics.htm

Also, download the code for Paint.Net. That could also help you.

Chris
 

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