Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28591 Discussions

Windows Program with call to explorer

hkausl
Beginner
451 Views

Hello,

I created a windows application with a from with several input fields. Depending on this fields, the program creates a system-call (systemqq) with the comand explorer.exe http//.... The call is startet by a button in the form (open)

This works, the correct url is displayed, the application keeps open. I reswitch to the application and change one of my input-fields and repress open (systemqq). Then a new explorer window is opened. How can I handle it, that my url is done in the already opened explorer. Can I get the process-id of this explorer and reconnect to the process? Now, if I change 5 times my input fields (change the url) I have 5 explorer-windows.

2. question: How can I avoid to see the command-window appear when calling systemqqq (or is there another interface possible.

Thanks.

 

0 Kudos
4 Replies
NsK
Novice
451 Views

You can use ShellExecute (it doesn't bring up a console window): Visual Fortran Newsletter.

0 Kudos
andrew_4619
Honored Contributor III
451 Views

if you issue the command 'start url' where url is an actuial valid url, windows will start the default aplication for url's (your web bropwser) and open that url. If is is a new brower or a tab on an already open browers depends upon the settings of the brower. You can test the behaviour by just typeing a url on the start menu input window.

I issue such commands using the IFPORT system cammand.

0 Kudos
hkausl
Beginner
451 Views

ShellExecute works fine, thanks. But what about the first question. I call a url and IE opens. Correct. Then  I change the url in my program and call it again. I want it to be displayed in the same window without any new tab. I can't change the settings of the browser, because in our company the settings are centalized.

Cann I get the process id of the first url and reconnect agin to this process with another url?

 

 

0 Kudos
Steven_L_Intel1
Employee
451 Views

You might want to look at the FXPLORER sample that can open a web page inside your application.

0 Kudos
Reply