Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a DLL that creates an Shockwave Flash in the current Window

Status
Not open for further replies.

megiddus

Programmer
Aug 1, 2000
2
AT
hi!<br>i have a problem including a dll in a new program.<br>the dll has a procedure called &quot;CreateFullScreen&quot; which is supposed to create a shockwaveplayer in fullscreen-mode.<br><br>when i call this procedure i get an error: &quot;TFont cannot be assigned to TFont&quot;<br><br>if i copy the procedure into the unit, everything works correct.<br><br>the procedure code:<br><br>&nbsp;procedure CreateFullScreen(comp:TComponent; form:TForm; sURL:pChar); overload; stdcall;<br><br>&nbsp;&nbsp;var url:string;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;swf:TShockwaveFlash;<br>&nbsp;&nbsp;begin<br>&nbsp;&nbsp;&nbsp;&nbsp;URL:=String(sURL);<br>&nbsp;&nbsp;&nbsp;&nbsp;swf:=TShockwaveFlash.Create(comp);<br>&nbsp;&nbsp;&nbsp;&nbsp;swf.align:=AlClient;<br>&nbsp;&nbsp;&nbsp;&nbsp;swf.width:=form.width;<br>&nbsp;&nbsp;&nbsp;&nbsp;swf.height:=form.height;<br>&nbsp;&nbsp;&nbsp;&nbsp;swf.top:=form.top;<br>&nbsp;&nbsp;&nbsp;&nbsp;swf.left:=form.left;<br>&nbsp;&nbsp;&nbsp;&nbsp;swf.parent:=form;<br>&nbsp;&nbsp;&nbsp;&nbsp;swf.enabled:=true;<br>&nbsp;&nbsp;&nbsp;&nbsp;swf.visible:=true;<br>&nbsp;&nbsp;&nbsp;&nbsp;swf.invalidate;<br>&nbsp;&nbsp;end;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><br>i register the procedure of the dll by writing <br>&nbsp;procedure CreateFullScreen(comp:TComponent; form:TForm; sURL:pChar);overload;stdcall;external 'SsgPlayer'; <br><br>(the dll is called &quot;SsgPlayer.dll&quot;)<br><br><A HREF="mailto:megiddus@gmx.net">megiddus@gmx.net</A><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top