Thread View: borland.public.vdbase.forms
4 messages
4 total messages
Started by Peter van Mierlo
Tue, 13 Apr 1999 00:00
Internet link
Author: Peter van Mierlo
Date: Tue, 13 Apr 1999 00:00
Date: Tue, 13 Apr 1999 00:00
14 lines
925 bytes
925 bytes
Hi, I'm looking for a way a user can click a button and going to the internet site which is stored into a database. The database contains a fieldname NetHTTP (character) which represent a company internet-adres/site. The user wants to double-click-left-button when he's on the field NetHTTP, so Netscape or IE will start and connect to the internet page. I'm looking for a solution for Vdb5 and Vdb7... Thanks.... Peter
Re: Internet link
Author: Geoff S. Wass ( dBVIPS )
Date: Fri, 16 Apr 1999 00:00
Date: Fri, 16 Apr 1999 00:00
36 lines
1694 bytes
1694 bytes
Peter,
You can modify this to handle either. This is by Romain Streiff.
/* ----------------------------------------------------------------
OpenURL -- opens a browser with the URL you pass to it.
Posted by Romain Strieff on the VdBASE Newsgroups
----------------------------------------------------------------
*/
function OpenURL( cURL )
if type( "ShellExecute" ) # "FP"
extern cHandle ShellExecute( cHandle, cString, cString, ;
cString, cString, cINT ) shell32 ;
from "ShellExecuteA"
endif
ShellExecute( 0, "open", cURL, null, null, 1 )
(This is the VdBASE 7 version -- if you are using VdBASE 5.x, remove
the "32" from "shell" and the "A" from "ShellExecuteA").
By the way, this news group is dead. You should post all questions in
the NEW news groups hosted by dBASE Inc. Below my signature is a link to
their news server.
--
Geoff Wass ( dBVIPS )
Kuala Lumpur, Malaysia
=>=> More dBASE info at http://members.theglobe.com/Geoff_Wass <=<=
*>*> Visit the NEW! dBASE Inc. news groups on the news server
news://news.dbase2000.com <*<*
Re: Internet link
Author: Peter van Mierlo
Date: Fri, 16 Apr 1999 00:00
Date: Fri, 16 Apr 1999 00:00
53 lines
2275 bytes
2275 bytes
Geoff S. Wass ( dBVIPS ) wrote:
> Peter,
>
> You can modify this to handle either. This is by Romain Streiff.
>
> /* ----------------------------------------------------------------
> OpenURL -- opens a browser with the URL you pass to it.
> Posted by Romain Strieff on the VdBASE Newsgroups
>
> ----------------------------------------------------------------
> */
> function OpenURL( cURL )
> if type( "ShellExecute" ) # "FP"
> extern cHandle ShellExecute( cHandle, cString, cString, ;
> cString, cString, cINT ) shell32 ;
> from "ShellExecuteA"
> endif
>
> ShellExecute( 0, "open", cURL, null, null, 1 )
>
> (This is the VdBASE 7 version -- if you are using VdBASE 5.x, remove
> the "32" from "shell" and the "A" from "ShellExecuteA").
>
> By the way, this news group is dead. You should post all questions in
> the NEW news groups hosted by dBASE Inc. Below my signature is a link
> to
> their news server.
>
Geoff,
I used this procedure and it works, but I only got it working on the
command prompt when
I'm using this syntax : OpenUrl("http://www.novell.com")
I'm looking for a way I could use a value from a field which is on the
form to connect to
the internet. I have used the following syntax but I don't get it
working:
* The form contains the entryfield NetHTTP where the internet page is
stored, so :
* I declare the value form Form.Entryfield_NetHTTP to the var. cURL
cURL=Form.Entryfield_NetHTTP.Value
OpenUrl(cURL)
VDB will now display the message 'Datatype mismatch: Expecting
character"
Where am I going wrong....can't you use the cURL variable ?
Greetings Peter
Re: Internet link
Author: Gary White [dBVIPS]
Date: Sat, 17 Apr 1999 00:00
Date: Sat, 17 Apr 1999 00:00
36 lines
1864 bytes
1864 bytes
On Fri, 16 Apr 1999 22:30:58 +0200, Peter van Mierlo wrote:
> * The form contains the entryfield NetHTTP where the internet page is
> stored, so :
> * I declare the value form Form.Entryfield_NetHTTP to the var. cURL
> cURL=Form.Entryfield_NetHTTP.Value
> OpenUrl(cURL)
>
> VDB will now display the message 'Datatype mismatch: Expecting
> character"
>
> Where am I going wrong....can't you use the cURL variable ?
Your code looks like it should work, assuming the two lines above are
inside the same function/procedure, and that that function/procedure
is between the CLASS/ENDCLASS statements of the form. You might want
to double check for typo's. If that all looks right, try:
cURL=Form.Entryfield_NetHTTP.Value
msgbox( "cURL = " + cURL + chr(13) + ;
"Data type is: "+type( cURL) )
OpenUrl(cURL)
Note that for the TYPE() function to work, cURL must be PRIVATE, or
PUBLIC. This should NOT be required for the function to work, so you
may want to change it to a PRIVATE for debugging purposes and then
change it back to LOCAL once it's working.
Please move to the dBASE2000 News Groups at
news://news.dbase2000.com
as soon as possible The groups here will close very soon.
Gary White [dBVIPS]
Some dBASE Stuff at
http://www.AppTools.com/dbase
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads