Image editor toolbar problem

  • Thread starter Thread starter SirRait
  • Start date Start date
S

SirRait

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.
 
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.
 
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 said:
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.
 
Thanx for help.
That background trick will work best for my case. Thanx again for a
hint :idea:
 
Back
Top