Windows Functions

Windows Functions

Postby dpaterso » Thu Feb 23, 2006 7:40 am

How can you call, for example, the Windows Date and Time dialog, and is there a list of all of the possible things that can be called by us from withing FWH?

Regards,

Dale.
dpaterso
 
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa

Calling stuff

Postby AlexSchaft » Thu Feb 23, 2006 8:16 am

Hi,

Date and time is easy:

winexec('rundll32.exe shell32.dll,Control_RunDLL "timedate.cpl"')

the cpl files are sitting in windows\system32

as for function calls, you can have dll constructs as follows:

DLL32 FUNCTION NetCancel(cBuffer AS LPSTR, Force AS LONG) AS DWORD PASCAL ;
FROM "WNetCancelConnection" LIB "Mpr.dll"

DLL32 FUNCTION GetConnName(cLocal AS LPSTR, cRemote AS LPSTR, nLength AS DWORD) AS DWORD PASCAL ;
FROM "WNetGetConnection" LIB "Mpr.dll"

DLL32 FUNCTION AddConnection(pcString1 AS LPSTR, pcString2 AS LPSTR, pcString3 AS LPSTR) AS DWORD PASCAL ;
FROM "WNetAddConnection" LIB "Mpr.dll"

But you don't need most of these if you're running xharbour commercial
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Postby dpaterso » Thu Feb 23, 2006 9:54 am

Thanks Alex,

I also remember from some time ago that there was a simple way of connecting to the Internet with the ShellExecute( ) function or something like that. What are those functions?

I did have this working in a very old test that I did but do not have that code anymore.

Basically I am trying to create a button with a sort of 'Company Name' On The Web type of thing i.e. click on that button and it will take you to our website sort of thing.

Regards,

Dale.
dpaterso
 
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa

Connecting to web

Postby AlexSchaft » Thu Feb 23, 2006 10:00 am

Easiest way to do this, for text is to use a turllink control

Which basically does

ShellExecute(::Hwnd, "open", ::cUrl), which you could assign to a button
User avatar
AlexSchaft
 
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 75 guests