My first thought is to set the parent of the form to the control. Another aproach might be to use another control inside the main one, and just make it *look* like a form.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
Sorry for asking too many questions but the problem is:
I want to make it an ocx so that I can use the same in another application but it doesn't allow to do so. Could U plz let me know how can I make the project given by U as ActiveX Control?
OK. Start with your control only, and make the project an activex control type (in project properties). Then set the startup object to none. Now make your control public in the control's properties. Then add a regular form to the project (not an mdi).
Now when you compile it, the form will be part of the ocx!
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
I'm really very sorry for asking lots of questions but it think it would be my last question. Actually now when I'm trying to show MDIChild form on the MDI form it gives me problem. I'm attaching a sample code which is causing problem.
OK. I think I see what you are trying to do. Are you trying to put an MDI form inside the control, then have an MDIchild form inside of that? If so, I would say it is not likely to be possible, and at best would cause all sorts of problems. My suggestion is to make the control act as the parent form for the MDI child forms. If you want it to look like an MDI interface, I would simulate it, and not try to get the real thing. This is because the control is sited on a regular form, so I don't think it can be an MDI parent.
Originally posted by WizBang
You don't add an MDI form to the project, because the API turns a regular form into an MDI form.
Here is a sample project, and it works like I said.
Very interresting subject.
I tried your project and it works fine. But if :
- I build the project1.ocx
- Register the test1.ocx using regsvr32
- Edit an html page to loag the ocx
When load the page in IE 6.0, I have an 406 error message concerning non-modale forms....
Well, I don't understand what you mean with 'not using correct version of ocx ' coz if I see in the html page the pink rectangle with the button...
OK, can you try on your computer this example : it is the same as the original one exept concerning the DEBUG proporties of the project. Instead of 'start with the component UserControl1', I 'start a browser with the URL...'
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.