I have a Delphi 6 app where I have added Flash's OCX to it. There is a property that askes for a Moive URL - pointing to the file. If I pre-qualify the path, like e:\demo\intro.sfw, the file loads just fine when my app runs. But since the Delphi app will end up on on a CD-ROM, there is no way to hard code the path in, since I won't know the drive letter of the cd-rom for each system.
What's the best method to handle this? Here's the code I have now, but shellexecute opens it in a separte window instead of within the app:
procedure TForm1.Button2Click(Sender: TObject);
temppath := 'E:\demo\intro.swf';
if(ShellExecute(HInstance, 'Open', temppath , '', '', SW_SHOWNORMAL)= ERROR_FILE_NOT_FOUND)
MessageDlg('Unable to file: SWF.' + chr(13) +
'Please launch it from the Disk Location.', mtWarning,[mbOk],0);