Retrieve HTML from Clipboard



lcHtml = HtmlFromClipboard()
	lnStartHTML = VAL(STREXTRACT(lcHtml, "StartHTML:", ""))
	lnEndHTML = VAL(STREXTRACT(lcHtml, "EndHTML:", ""))
	* If StartFragment is present, retrieve HTML fragment
	IF ("StartFragment" $ lcHtml)

Retrieving Windows TaskBar Size and Location

A location and size of the Windows Taskbar can be retrieved with SHAppBarMessage Function.

How to change file attributes programmatically

There're many ways to change file attributes. It can be done through Windows Explorer, DOS ATTRIB comand, third party utilites, e.t.c. Also it can be done programmatically using Windows Scripting Host (WSH) or/and Windows API.

Who has files open on the network

The WhoHasFileOpen utility displays the list of users who have specific file(s) open on network. Works on Windows NT Platform (Windows NT 4.0, Windows 2000, etc). This code detects only the files opened using a net shared path. It does not return the files opened by a user on the local computer using a local path.

Position Shortcut menu over Toolbar

The code below shows how to position a shortcut menu over a toolbar buttons using GetCursorPos function and ScreenToClient function. The idea was provided by Andrey Davidoff on UT in the message #913121.

Enumerating Environment variables

One of the way to enumerate the Environment Variables is by accessing _environ global variable. The GetEnvironmentStrings function provides another way by returning a pointer to the environment block of the calling process. It can also be done using WMI Win32_Environment Class.

Check for active Internet connection

The InternetCheckConnection function can be used to check for an active connection to the internet. It requires an URL to a fast and reliable web site as the first parameter.


DECLARE Long InternetCheckConnection IN Wininet.dll String Url, Long dwFlags, Long Reserved
* Fast and reliable web site
lcUrl = ""
IF InternetCheckConnection(lcUrl, FLAG_ICC_FORCE_CONNECTION, 0) <> 0

Flash Application window or/and Taskbar button

Sometimes it's necessary to attract a user attention to an application that is currently not active. Such application can utilize FlashWindowEx Function. The Windows API support class is used to handle Windows API structures.


Subscribe to RSS - winapi