1

enter image description here

I want to display transparent form having same height and width like parent form in winforms c# application.

I am removing control box and border style properties of child form and want to display that form inside parent form in full height/width. I represented child form area in red border in uploaded image.

I tried by setting height and width of child form on resize event of parent form but it couldn't work.

Form2 f2 = new Form2();
f2.Height = this.Height;
f2.Width = this.Width;
f2.Show();

It is displaying child form but not in proper way as i want to fit it on parent form.

Why i need this?

I am using third party control on parent form and want to add lines on it, but that control is not supporting graphics property. So i am taking transparent form on top of that parent form and want to add graphics object like line, rectangle etc...

I am putting image for reference.

Please share your valuable thoughts to solve my problem.

Thanks in advance.

Chirag
  • 317
  • 7
  • 19
  • Have a look at [Stack Overflow question checklist](http://meta.stackexchange.com/questions/156810/stack-overflow-question-checklist). Because I can only see the requirement here !! – huMpty duMpty Dec 31 '13 at 10:34
  • These [2](http://stackoverflow.com/a/7290369) [answers](http://stackoverflow.com/a/9359642) may be of help – chridam Dec 31 '13 at 10:46
  • Thanks for your reply. As we are using child control as separate form, even we can set opacity of whole form using opacity property. The main problem is,how can we set the height and width of child window? It should be same[without control box and border] as represented in the attached image with red box. – Chirag Dec 31 '13 at 11:00

0 Answers0