Announcement

Collapse
No announcement yet.

ActiveX Web Control

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ActiveX Web Control

    I have an OpenGL program that I would like to run "inside" a Web browser (similar to Macromedia Flash). How hard is it to encapsulate a Windows app into an ActiveX control? Is this something PowerBASIC can even do?

    Thanks,
    Flick
    www.globalheavyindustries.com

  • #2
    Bryan, I hope this thread gets some good answers, I'm interested too,

    here's some code to launch a client based exe from a web page, you should be able to launch it within a desired posistion in the page using the <object> tag, (I beleve, never done it)

    but the real problem is supporting the other browsers, ActiveX only works in IE

    Code:
    <html>
    
    <head><script language="javascript" type="text/javascript">
    function runApp() 
    { 
    var shell = new ActiveXObject("WScript.shell"); 
    shell.run("notepad.exe", 1, 1);  
    } 
    </script></head>
    <body>
    <input type="button" name="button1" value="Run plugin" onClick="runApp()" />
    
    </body>
    
    </html>

    Comment


    • #3
      but the real problem is supporting the other browsers, ActiveX only works in IE
      Thanks for the code snippet Brad.

      Does anyone have any idea how something like Flash works? I thought it was an ActiveX control, but I think it works in IE, Firefox, Opera, Safari, etc. Any idea how they do that?

      Thanks,
      Flick
      www.globalheavyindustries.com

      Comment


      • #4
        Flash is basically a VM that run some sort of Bytecode.
        Check this Wikipedia page about ActionScript, the language used to write Flash applications:

        http://en.wikipedia.org/wiki/ActionScript

        There are some samples, info, and useful links to open / free development tools.

        Bye!
        Last edited by Marco Pontello; 6 Feb 2008, 07:59 PM.
        -- The universe tends toward maximum irony. Don't push it.

        File Extension Seeker - Metasearch engine for file extensions / file types
        Online TrID file identifier | TrIDLib - Identify thousands of file formats

        Comment


        • #5
          Originally posted by Bryan Flick View Post
          Thanks for the code snippet Brad.

          Does anyone have any idea how something like Flash works? I thought it was an ActiveX control, but I think it works in IE, Firefox, Opera, Safari, etc. Any idea how they do that?

          Thanks,
          Flick
          www.globalheavyindustries.com
          I believe Flash player is written as a dll/exe (for windows). Each browser provides a plug-in capability. Flash wrapper is used to wrap the main flash player DLL. I am not positive about this, but is based on some research.

          Also consider Mac, and Linux. Adobe writes code for these OS as well. I also believe that the core flash player runs on all platforms. There are helper files to operate within the given OS platform parameters.

          This is only a guess. I have now inside knowledge.

          Comment


          • #6
            I believe Flash player is written as a dll/exe (for windows). Each browser provides a plug-in capability. Flash wrapper is used to wrap the main flash player DLL.
            That sounds like what I am looking for. I tried to Google for "IE plugin development" but it sounds like there is a lot of COM (which I know little about) and ATL (which I know nothing about) involved.

            If possible, I would like to write a "wrapper" plugin in C++, that in turn calls a PowerBASIC DLL which contains the actual code. I think that may be the easiest way (as I can't think of a 100% PowerBASIC solution at the moment).

            Anyone have any ideas if this is the right approach?

            Thanks,
            Flick
            www.globalheavyindustries.com

            Comment


            • #7
              I found the following link that shows an ActiveX OpenGL control...

              http://www.sulaco.co.za/opengl_proje...GL_ActiveX.htm

              Is something like this possible with PowerBASIC? Or would I have to use a different language (C++ or Delphi, for example) to use as a wrapper of a PowerBASIC DLL?

              Thanks,
              Flick
              www.globalheavyindustries.com

              Comment


              • #8
                This is a relatively lightweight OCX, therefore, writing something similar in PowerBASIC is doable. It requires quite a bit of knowledge of low level COM though. You will have to hand code the IDL file, but that is not difficult.
                Dominic Mitchell
                Phoenix Visual Designer
                http://www.phnxthunder.com

                Comment

                Working...
                X