I'm trying to make a program that can open multiple sessions of a TCppWebBrowser component. The problem I have is that I can't seem to create it dynamicly (at runtime). I'm doing something (don't have the actual code here) like this, when opening a new session:
noSessions++;
browsers[noSessions] = new TCppWebBrowser(MainForm);
browsers->Left = 0;
browsers->Top = 0;
browsers->Width = 100;
browsers->Height = 300;
// browsers->Parent = MainForm; <- can't do this
browsers->Show();
Well this won't show a new internet explorer on my MainForm. I've tried it with a button and it worked fine, but I have to fill the Parent property (TComponent) so the object knows where the button has to be drawn. The Parent property for TCppWebBrowser for the TComponent can't be filled because the TCppWebBrowser itself has a Parent property too.
Does anybody know how to solve this problem? I'm really stuck here so any response would be appreciated.
noSessions++;
browsers[noSessions] = new TCppWebBrowser(MainForm);
browsers->Left = 0;
browsers->Top = 0;
browsers->Width = 100;
browsers->Height = 300;
// browsers->Parent = MainForm; <- can't do this
browsers->Show();
Well this won't show a new internet explorer on my MainForm. I've tried it with a button and it worked fine, but I have to fill the Parent property (TComponent) so the object knows where the button has to be drawn. The Parent property for TCppWebBrowser for the TComponent can't be filled because the TCppWebBrowser itself has a Parent property too.
Does anybody know how to solve this problem? I'm really stuck here so any response would be appreciated.