dzHW
Previous  Next

The dzHW object provides the following methods and a single property - InputPanel.

BringWindowToFront("WindowName"): If the window with the title WindowName is present it becomes the front window.

BringWindowToFrontC("ClassName"): If the window with the class name ClassName is present it becomes the front window.

GetACLineStatus: Returns 1 if on AC power, 0 if not.

GetActiveWindowHandle: Returns the Handle of the active window. That is the top-level window (if there is one)  that is associated with the input focus

GetBatteryLifePercent: Returns the percentage of Battery Life remaining.

GetClassName(hWnd, StrLen): Returns in a string the class name of the given hWnd. StrLen the maximum length of class name to return.

GetModuleHandle("Modulename"): Return the Handle for a loaded module. ModuleName = "null" returns the handle of myapp

GetParent(hWnd): Returns the parent window handle of window with handle hWnd

GetProcesses: Returns in a table of string the names of active processes.

GetProcessHandle("ProcessName"): Returns the handle of process with the name ProcessName.

GetTickCount: A high resolution timing method. Returns time elapsed in miliseconds since  the computer/device was booted.

GetWindowChild(hWnd): Returns the first child window of the window with the handle hWnd

GetWindowFirst(hWnd): Returns the handle of the first in order window of the window with handle hWnd

GetWindowHandle("ClassName", "WindowName"): Returns the handle of the window with the class name ClassName and the window name WindowName. ClassName and or WindowName can be null.

GetWindowNext(hWnd): Returns the handle of the next in order window of the window with handle hWnd

GetWindowRect(hWnd): Return an array(4) of int32 with left, top, right, bottom of the window with the handle hWnd

GetWindowtext(hWnd, StrLen): Returns in a string the window text of the of the window with handle hWnd. StrLen the maximum length of window name to return.

InputPanel: Property. Returns or Sets the Soft Input Panel (SIP) state. 1 if it's active, 0 if not. Setting InputPanel = true, activates it and InputPanel = false deactivates it.

IsWindow(hWnd): Returns true if the window with the handle hWnd is a window (!!!)

IsWindowVisible(hWnd): Returns true if the window with the handle hWnd is visible.

KillProcess("ProcessName"): Kills the process.

MessageBeep(wType): Beep! wType determines the type of sound and should be one of MsgBox icons (see B4PPC help, topic "MsgBox Constants").

New1(): Create a new instance of a dzHW object.

PostMessage(hWnd, wMsg, wParam, lParam): Posts a message to the window with the handle hWnd.

PostMessageToWindow("WindowName", wMsg, wParam, lParam): Sends the message wMsg with parameters wParam and lParam to the window with the title WindowName. Does not wait for the the window to process the message.

PostMessageToWindowC("ClassName", wMsg, wParam, lParam): Sends the message wMsg with parameters wParam and lParam to the window with the class name ClassName. Does not wait for the Window to process the message.

SetWindowText(hWnd, WindowText): Sets the Window Title or Caption of the window with the Handle hWnd.

ShowWindow(hWnd, nCmdShow): Send the mCmdShow command to the window with the handle hWnd. If mCmdShow = 0 it hides the window. If mCmdShow = 5 it shows the window.

SoftReset: Soft resets the device