Hallo,
ich möchte gerne in meinem Programm Bilder über den Internet Explorer anzeigen. Dazu habe ich erstmal eine grobe Action geschrieben.
Bin ich damit auf dem richtigen Weg? Wie bekomme ich es hin, dass auch die Menü - und Werkzeugleiste vom IE zu sehen sind?
Schumi
ich möchte gerne in meinem Programm Bilder über den Internet Explorer anzeigen. Dazu habe ich erstmal eine grobe Action geschrieben.
public class BrowserOleAction extends Action {
public BrowserOleAction(){
super();
setId("ole");
setActionDefinitionId("ole");
setText("Ole");
}
public void run(){
Shell shell = new Shell();
shell.setLayout(new FillLayout());
OleControlSite controlSite;
try {
OleFrame frame = new OleFrame(shell, SWT.NONE);
controlSite = new OleControlSite(frame, SWT.NONE, "Shell.Explorer");
controlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
} catch (SWTError e) {
System.out.println("Unable to open activeX control");
return;
}
final OleAutomation webBrowser = new OleAutomation(controlSite);
int[] browserIDs = webBrowser.getIDsOfNames(new String[] { "Navigate", "URL" });
Variant[] address = new Variant[] { new Variant( "http://www.google.de") };
webBrowser.invoke(browserIDs[0], address, new int[] { browserIDs[1] });
shell.open();
}
}
Bin ich damit auf dem richtigen Weg? Wie bekomme ich es hin, dass auch die Menü - und Werkzeugleiste vom IE zu sehen sind?

Schumi