I just discovered this piece of code posted by Cliff Nicholls in 2014
It does just what I want to do. Namely open a web page when I may not know the default browser.
However, it operates asynchronously ie hands control back to the program immediately.
Is there any easy way that I can change this to acting synchronously? ie not handing control back to the program until the browser program terminates?
I use PBCC, Windows 10
Thanks
Kerry
Code:
#COMPILE EXE #DIM ALL #INCLUDE ONCE "Win32Api.inc" SUB OpenWebPage(PageToOpen AS STRING) ShellExecute(BYVAL %NULL, "open", PageToOpen + CHR$(0), BYVAL %NULL, BYVAL %NULL,%SW_SHOWNORMAL) END SUB FUNCTION PBMAIN () AS LONG OpenWebPage "http://www.powerbasic.com/support/pbforums/" END FUNCTION
However, it operates asynchronously ie hands control back to the program immediately.
Is there any easy way that I can change this to acting synchronously? ie not handing control back to the program until the browser program terminates?
I use PBCC, Windows 10
Thanks
Kerry
Comment