IE activex in MATLAB GUI

조회 수: 3 (최근 30일)
Wan Nawi
Wan Nawi 2011년 6월 25일
댓글: morningStar 2017년 4월 18일
Hello,
I am trying to embed internet explorer activex control in MATLAB GUI. But, I received the following error message after I run the GUI: "Serialization of COM Object failed. 'Microsoft Web Browser' could not be restored to its previous state. Make sure file actvxWebBrowser_activex1 is in the same directory as your GUI"
The file actvxWebBrowser_activex1 is already in the same directory as the GUI.
Strangely, when I run the command h=actxcontrolselect; in Matlab command window, I can select the object Web Browser and the object is embedded in a Matlab Figure, not a Matlab GUI. With this, I can invoke the methods and get properties of the activex object without error.
What I really want to do is to have text boxes, buttons (UI control). I know that buttons and text can be positioned in matlab figure. But I still can't figure out how to put a text box in Matlab figure.
Someone knows how to fix that error in Matlab GUI?
Best regards, Wan Nawi

채택된 답변

Titus Edelhofer
Titus Edelhofer 2011년 6월 27일
Hi,
the following works for me: in the GUI_OpeningFcn I added:
handles.ie = actxcontrol('Shell.Explorer.2', [100 100 500 500]);
GoHome(handles.ie);
This opens the internet explorer within the GUI (at the given position) and loads our internal home page ...
Titus
  댓글 수: 3
Titus Edelhofer
Titus Edelhofer 2011년 6월 27일
Hi Nawi,
not exactly. You tried to run actxcontrolselect from within your GUI? I never tried this ...
Titus
morningStar
morningStar 2017년 4월 18일
I have a similar problem. I want to open internet explorer in a panel in my GUI, can you help me with that plz? It seems it can open it only inside figure.Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Jan
Jan 2011년 6월 25일
You want a simple text box and try to implement it using a IE ActiveX control??
What about:
figure;
uicontrol('Style', 'text', ...
'Position', [10, 10, 200, 200], ...
'String', {'Line1', 'Line2'});
EDITED: A Matlab GUI is a Matlab figure. I assume the problem could be solved, if you create the IE-ActiveX dynamically in the CreateFcn instead of creating it once in GUIDE.
  댓글 수: 1
Wan Nawi
Wan Nawi 2011년 6월 26일
sorry, maybe my question is not descriptive enough. I want to make a Matlab GUI using Guide, in which containing Internet Explorer activex control (to host Google Earth Plugin), and some others UI controls.
The problem is the inconsistency of error. When I am working with GUIDE, I get the error message. But not when I am using Matlab commands.
And for the text box, I did found the command. Thanks anyway

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 ActiveX에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by