FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

running a program from within a DFL app

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
jicman



Joined: 22 Dec 2004
Posts: 298
Location: Rochester, NY

PostPosted: Thu Jan 25, 2007 12:19 am    Post subject: running a program from within a DFL app Reply with quote

Greetings!

I have created an HTML report and I would like to display it, how can I do this from within a DFL application?

For example, When I go to Start/Run, in windows, and I type an existing html page the default browser comes up showing the html page. Let's say that I have an html page called test.htm which resides, say in c:\temp\. If I go to Start/Run and I type,

c:\temp\test.htm

the default browser comes up and display that page. How can I apply the same behaviour from within DFL? I know that by calling IE it may work, but I want to use the default web browser. Or even better, can I display html on any of the DFL objects?

Also, when I use the phobos function system, a black screen appears. Any idea how do get rid of it?

Thanks,

josé
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Thu Jan 25, 2007 2:53 am    Post subject: Re: running a program from within a DFL app Reply with quote

I use ShellExecute; you can see in dfl.exe's source, located at packages\dfl\dflexe.d
Back to top
View user's profile Send private message
jicman



Joined: 22 Dec 2004
Posts: 298
Location: Rochester, NY

PostPosted: Thu Jan 25, 2007 8:46 am    Post subject: Re: running a program from within a DFL app Reply with quote

Chris Miller wrote:
I use ShellExecute; you can see in dfl.exe's source, located at packages\dfl\dflexe.d


Perfect. Thanks. I used ShellExecuteA, which is close to ShellExecute. Smile

thanks.

josé
Back to top
View user's profile Send private message
jicman



Joined: 22 Dec 2004
Posts: 298
Location: Rochester, NY

PostPosted: Mon Feb 12, 2007 5:39 pm    Post subject: Reply with quote

Chris,

related to this subject, I would like to do the same as above, but for something like,
Code:
c:\temp\
which should act like if you go to Start\Run and then type

c:\temp

and then hit enter, a file browser will popup, but it is not working from within DFL with with this command,


Code:
ShellExecuteA(null, null, std.string.toStringz("file://c:\\temp"), null, null, 0);


Any ideas how to get it to work? Sorry to ask all of these easy questions, but newbies will be newbies... Smile

thanks,

jic
Back to top
View user's profile Send private message
jicman



Joined: 22 Dec 2004
Posts: 298
Location: Rochester, NY

PostPosted: Mon Feb 12, 2007 6:28 pm    Post subject: Reply with quote

Sorry, I should have done a little homework... After doing a little google search, I found a bunch of options for the last entry. I still haven't figured out the rest, but the 8 in the last entry works.

Here it is for future reference:

Code:
ShellExecuteA(null, null, std.string.toStringz("c:\\temp"), null, null, 8);


thanks.
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Tue Feb 13, 2007 3:25 am    Post subject: Reply with quote

jicman wrote:

Code:
ShellExecuteA(null, null, std.string.toStringz("file://c:\\temp"), null, null, 0);


Any ideas how to get it to work?
Coincidentally, I just fixed this issue in dfl.exe in the latest DFL snapshot (before you asked) and what I did was change the last arg from 0 to SW_SHOWNORMAL. 0 is only for opening documents. You also need to drop the file:// as you've done. Note that 8 is SW_SHOWNA, NA meaning no-activate, as in the new window probably won't come to the front.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group