Windows Functions

Post Reply
dpaterso
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa
Contact:

Windows Functions

Post by dpaterso »

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.
User avatar
AlexSchaft
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Calling stuff

Post by AlexSchaft »

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
dpaterso
Posts: 142
Joined: Tue Jan 24, 2006 9:45 am
Location: South Africa
Contact:

Post by dpaterso »

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.
User avatar
AlexSchaft
Posts: 172
Joined: Fri Oct 07, 2005 1:29 pm
Location: Edenvale, Gauteng, South Africa

Connecting to web

Post by AlexSchaft »

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
Post Reply