468,101 Members | 1,399 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,101 developers. It's quick & easy.

Image editor toolbar problem

Hi, im quite new in C# and i have on problem.

Can someone explain me why can't i use Line Tool form the image
editor toolbar to draw a line on the Form. Somehow image editor
toolbar is not enabled (cant select nothing from there). Is there
some kind of property on form i forget to turn on, or is it totaly
impossible to use those tools for drawing on the form.

I need to draw quite alot lines on to my Form so it would be really
painful to do it on code vise for me at this point.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 16 '05 #1
3 3131
Hi,

There's no way to draw any shape on form at design time.

You've got to choose one way:
A) Draw shapes on Paint event (or override OnPaint method)
B) Create image with those shapes and set it as BackgroundImage

Cheers!

Marcin
Hi, im quite new in C# and i have on problem.

Can someone explain me why can't i use Line Tool form the image
editor toolbar to draw a line on the Form. Somehow image editor
toolbar is not enabled (cant select nothing from there). Is there
some kind of property on form i forget to turn on, or is it totaly
impossible to use those tools for drawing on the form.

I need to draw quite alot lines on to my Form so it would be really
painful to do it on code vise for me at this point.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Nov 16 '05 #2
SirRait,

..NET framework does not give a control to draw shapes like visual basic 6.0.

If you need just lines, i have a dirty way to draw that.

//define groupbox
private System.Windows.Forms.GroupBox groupBox1;
//initialize groupbox
this.groupBox1 = new System.Windows.Forms.GroupBox();
//set the text to empty
this.groupBox1.Text = "";
//set the hieght of groupbox anywhere from 2 to 6 to get the feeling of
line
this.groupBox1.Size = new System.Drawing.Size(160, 4);
this.groupBox1.TabStop = false;

Shak.
"SirRait" <Si*****@hotmail-dot-com.no-spam.invalid> wrote in message
news:40**********@Usenet.com...
Hi, im quite new in C# and i have on problem.

Can someone explain me why can't i use Line Tool form the image
editor toolbar to draw a line on the Form. Somehow image editor
toolbar is not enabled (cant select nothing from there). Is there
some kind of property on form i forget to turn on, or is it totaly
impossible to use those tools for drawing on the form.

I need to draw quite alot lines on to my Form so it would be really
painful to do it on code vise for me at this point.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Nov 16 '05 #3
Thanx for help.
That background trick will work best for my case. Thanx again for a
hint :idea:
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Simon Harvey | last post: by
9 posts views Thread by Hugh | last post: by
1 post views Thread by Friskusen | last post: by
4 posts views Thread by huntingseasonson | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.