FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Windows Functions
Posts: 142
Joined: Tue Jan 24, 2006 09:45 AM
Windows Functions
Posted: Thu Feb 23, 2006 07: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.

Posts: 172
Joined: Fri Oct 07, 2005 01:29 PM
Calling stuff
Posted: Thu Feb 23, 2006 08: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

Posts: 142
Joined: Tue Jan 24, 2006 09:45 AM
Windows Functions
Posted: Thu Feb 23, 2006 09: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.

Posts: 172
Joined: Fri Oct 07, 2005 01:29 PM
Connecting to web
Posted: 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

Continue the discussion