Hi Fitim,
Thanks for your feedback.
Based on my understanding, you want to draw on the design surface.
Regarding this, we can first get the DesignSurface.View control, then draw
on its child control. Sample code like this:
private void Form1_Load(object sender, EventArgs e)
{
DesignSurface surface = new DesignSurface();
surface.BeginLoad(typeof(Form));
Control view = (Control)surface.View;
view.Controls[0].Paint += new PaintEventHandler(view_Paint);
view.Dock = DockStyle.Fill;
view.Controls[0].BackgroundImage = Image.FromFile("c:\\test.jpg");
this.Controls.Add(view);
}
void view_Paint(object sender, PaintEventArgs e)
{
//throw new Exception("The method or operation is not implemented.");
e.Graphics.DrawLine(new Pen(new SolidBrush(Color.Red)), 0, 0,
this.Width, this.Height);
}
Hope this helps!
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Fitim Skenderi - 22 Feb 2006 09:51 GMT
Hi Jeffrey,
THANK YOU VERYYYY MUCH !!!!
It is working as a treat.
THANKS, THANKS, THANKS :)
I have spent at least a week to try and make it work.
Fitim
> Hi Fitim,
>
[quoted text clipped - 30 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
"Jeffrey Tan[MSFT]" - 23 Feb 2006 01:18 GMT
You are welcome :-). If you need any further help, please feel free to
post. Thanks
Best regards,
Jeffrey Tan
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.