Jump to content

ActiveX Control


acesar

Recommended Posts

Hi, Farshad. Magnific work.

I was testing: Intraweb, Morfik, Raudus and Unigui.

 

Intraweb: Very poor interface, it works only in Internet Explorer (visual interface), any other browser will not render correctly;

Morfik: Most controls only works in Internet Explorer;

Raudus: Poor components, D7 and D2007 IDE crash constantly (I need restart for each new project), horrible rendering of controls at runtime;

Unigui: The best component suite that I have seen. Works in all browsers (including Android browser)...

 

I have a problem, I need to insert an OCX control (VLC media player) on my project and this code:

 

<OBJECT id=vlc4

codeBase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab#Version=0,8,6,0"

classid=clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921

VIEWASTEXT events="True"><PARAM NAME="MRL" VALUE="http://192.168.1.33:8118/altoredir:149988"><PARAM NAME="ShowDisplay" VALUE="True">

<PARAM NAME="AutoLoop" VALUE="False"><PARAM NAME="AutoPlay" VALUE="True">

<PARAM NAME="Volume" VALUE="50"><PARAM NAME="StartTime" VALUE="0">

<param name="autoStart" value="true" />

</OBJECT>

 

does not works inside TUniHTMLFrame (passed as property HTML).

 

I was able to view OCX in IE 9 saving the above code in an html file called "Object.html", and I open it with TUniURLFrame in runtime with no problems! OCX control has been shown correctly. Why?

 

Raudus have a similiar component to TUniHTMLFrame (TRaEstTextPanel), that have a property called "Lines". I Was pass the code above and to TRaEstTextPanel.Lines in runtime and OCX control was displayed correctly.

 

Can you help me?

 

Thanks a lot for your excellent work!!!

  • Upvote 1
Link to comment
Share on other sites

Hi, Farshad.

 

Excellent work. I was test this code with new version and it works! I set the property StaticHTML to true in TUniHTMLFrame.

 

But only works when TUniServerModule property "MainPageDisplayMode" is mfWindow. Does not works when MainPageDisplayMode = mfPage.

 

Can you help me again?

 

Thanks a lot, my company will certainly buy UniGui when you make a commercial version.

Link to comment
Share on other sites

  • Administrators

But only works when TUniServerModule property "MainPageDisplayMode" is mfWindow. Does not works when MainPageDisplayMode = mfPage.

 

It is related to the way Ext JS embeds HTML. Also IE has a non-standard way of handling Active-X objects. I'm not sure if it can be resolved.

 

Why don't you use embedded objects instead of OCX? ActiveX only works on Windows and IE and is not a cross browser solution.

Link to comment
Share on other sites

Thanks!

 

I'll try the one suggested by you.

 

Another problem, WebForm property "JSCode" was moved? If yes, can you give me a sample how I can use it?

 

UniHTMLFrame1:

 

<div id="example"></div>

 

<script type="text/javascript">

document.getElementById("example").innerHTML=navigator.appName;

</script>

 

I want to get innerHTML from "example" div and this code does not work with new version:

 

WebForm.ExtWindow.HtmlObject.JSCode('document.getElementById("example").value');

 

(TUniClientInfos does not work with Opera), "ciOpera" is not in TUniClientInfos when I run the sample "ClientInfo".

 

How can I proceed?

 

Thanks in advance

Link to comment
Share on other sites

  • Administrators

Thanks!

 

I'll try the one suggested by you.

 

Another problem, WebForm property "JSCode" was moved? If yes, can you give me a sample how I can use it?

 

 

 

JSCode is a protected method. You need to use a hack to access it:

 

type
 TUniControlHack = class(TUniControl);

procedure TMainForm.UniFormCreate(Sender: TObject);
begin
 if WebMode then
   TUniControlHack(WebForm).JSCode('alert("blalalala");');
end;

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...