Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 06 DEC 2004 07:18:34AM Colin Rule wrote:

I would like to put a button or link from my About screen to our web site.

Does anyone know of a easy solution to launch the appropriate HMTL brower on the users workstation when they click this.

I suppose I could put a HTML file in my application and call this to go to my web site with a redirection, but I was sort of looking for something a bit slicker.

Any suggestions?

Colin


At 06 DEC 2004 07:48AM Mike Ruane wrote:

Colin-

ShellExecute will do it for you.

From the Examples_Updates program in the examples application, and Captain C:

  • We now use the Windows API ShellExecute function to execute the user's * default browser to take us to the Revelation Site:
  • * ShellExecute() is exported from Shell32.DLL - this is not part of the
  • standard OI32 release and as such you may need to prototype it * yourself. If this is the case follow the steps below:
  • * 1) Create a new record in the System Editor
  • * 2) On the first line enter the text 'SHELL32' without the quotes
  • * 3) On the second line enter the following text:
  • * HANDLE STDCALL ShellExecuteA( HANDLE, LPCHAR, LPCHAR, LPCHAR, LPCHAR, INT ) As ShellExecute
  • * 4) Save this record to the SYSPROCS table as DLL_SHELL32
  • * 5) In the System Editor Exec line enter and execute the following:
  • * RUN DECLARE_FCNS "DLL_SHELL32"
  • * You should now be able to call the ShellExecute function directly from
  • Basic+. Note that we recommend you perform this procedure from within * your SYSPROG account rather than you application account to help avoid
  • any future version problems. *
  • For more information on DLL prototyping please consult the OpenInsight * on-line help.
  • * For more information on the Windows API please visit the Microsoft
  • Developers Network site on teh web at http://msdn.microsoft.com hwnd =get_Property( @window, "HANDLE" ) lpOperation =open" : \00\ lpFile =WWW_URL$ : \00\ ; * website address lpParameters=\00\ lpDirectory =\00\ nShowCmd =1 retVal=shellExecute( hwnd, lpOperation, lpFile, lpParameters, lpDirectory, nShowCmd ) </QUOTE> —- === At 06 DEC 2004 12:08PM Colin Rule wrote: === <QUOTE>Thanks Mike, works a charm. </QUOTE> —- === At 06 DEC 2004 01:09PM Donald Bakke wrote: === <QUOTE>Colin, If you want to utilize a hyperlink GUI you can simulate this pretty well with a static text label and the BUTTONDOWN event. If you want to get a little fancier you can also trap the WM_SETCURSOR API to track when you are hovering over the text label and force it to switch colors appropriately. One issue that will be tricky is getting the cursor to change shape the way a true hyperlink would do. Alternatively, I believe there are free OLE hyperlink controls available. We came across a couple of them early on. However, since they didn't include source we ended up writing our own to include in our toolset. [email protected] SRP Computer Solutions, Inc. </QUOTE> —- === At 09 DEC 2004 11:30AM Oystein Reigem wrote: === <QUOTE>Don, ]If you want to utilize a hyperlink GUI you can simulate this pretty well with a static text label… …One issue that will be tricky is getting the cursor to change shape the way a true hyperlink would do Instead of the static use an html control - not to show the linked page, just the link itself. Change the cursor with the help of a CSS style for the link (or for a surrounding span or div element). - Oystein - </QUOTE> View this thread on the Works forum...
  • third_party_content/community/commentary/forums_works/59472a58982b3b4c85256f6200439e8a.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1