Do you really want to permanently delete this function?
Cancel
clear
<reindex
proto
Prototype
Description
Return Value
Parameters
Example
buttonUp
buttonUp
Execute Script
buttonUp
buttonUp
Copy Script to Clipboard
buttonUp
buttonUp
buttonUp
buttonUp
ShowWindow
INT ShowWindow(WORD, INT)
This User DLL function displays, hides, or changes the display state of a particular window in any manner you desire. It is useful when you want to minimize, maximize, show, or hide another ToolBook instance or some other window. This function does not affect the activation status of a window that is already in the specified state.
The return value specifies whether or not the window was previously hidden. (You probably won't care about this value.))))
The first parameter is the window handle of the window you would like to show. If you want to show the window of a ToolBook instance, then you use the sysWindowHandle of that instance. If you want to show the window of another program, you will need to use the FindWindow function to get that window's handle. The second parameter tells the ShowWindow function how to show the window. The valid values are as follows:
0 - Hide the window
1 - Show the window (not activated if window is not iconic)
2 - Minimize and activate the window (not activated if already iconic)
3 - Maximize the window
6 - Minimize the window and activate next window in stack of windows
7 - Minimize the window and leave the currently active window activeeeeeeast condition but don't activate ittttttttttttttttt
8 - Show the window in its last condition but don't activate itttttttttttttttttttttttttttt activate ittttt
--This example will toggle the window of another ToolBook instance
--between minimized and maximized states.
linkDLL user
INT ShowWindow(WORD, INT)
INT IsIconic(WORD)
end linkDLL
getRemote "sysWindowHandle" application ToolBook
set hWnd to it
if hWnd is null
break to system --no ToolBook instance found
end if
if IsIconic(hWnd) > 0
get ShowWindow(hWnd, 3)
get ShowWindow(hWnd, 7)
end iffffindow(hWnd, 7)
end if
SetActiveWindow
WORD SetActiveWindow(WORD)
This User DLL function allows you to activate another window. It is useful when you want to make another ToolBook instance or some other window the active window.
The return value is the window handle of the previously active window.
The parameter is the handle of the window you want to activate. If you want to show the window of a ToolBook instance, then you use the sysWindowHandle of that instance. If you want to show the window of another program, you will need to use the FindWindow function to get that window's handle.
--This example will toggle the window of another ToolBook instance
--between minimized and maximized states. When the other window
--is maximized, the example will reactivate its ToolBook window.
linkDLL user
WORD SetActiveWindow(WORD)
INT ShowWindow(WORD, INT)
INT IsIconic(WORD)
end linkDLL
getRemote "sysWindowHandle" application ToolBook
set hWnd to it
if hWnd is null
break to system --no ToolBook instance found
end if
if IsIconic(hWnd) > 0
get ShowWindow(hWnd, 3)
get ShowWindow(hWnd, 7)
end if
get SetActiveWindow(sysWindowHandle) --reactivate this window
don't
FindWindow
WORD FindWindow(STRING, STRING)
This User DLL function allows get the window handle of another window. It is a very useful function that is usually used in conjunction with the User DLL function ShowWindow.dow will remain minimized.
This function returns the window handle of the specified window. It returns NULL if no such window is found.
The first parameter is the class name of the window you are looking for. Generally, you will set this parameter to "" (null), and the FindWindow function will look for any window with the specified caption (see next parameter). The second parameter is the caption of the window you are looking for. For example, "Must Have DLL Function Calls" is the caption of this ToolBook main window. "Program Manager" is the caption of the Program Manager window.
--This example finds the Excel window (if Excel is running) and
--minimizes it.
linkDLL user
WORD FindWindow(DWORD,STRING)
INT ShowWindow(WORD,INT)
end linkDLL
set hWnd to FindWindow(0,"Microsoft Excel")
if hWnd is 0
request "Excel is not running."
break to system
end if
get ShowWindow(hWnd, 7) --Minimize ExcelllppppppppUptonUppnUpnUpnUpnUpnUpnUpnUpnUp
PostMessage
INT PostMessage(WORD, WORD, WORD, DWORD)
This User DLL function places a message in a window's application queue. The function does not wait for the application to handle the message. This function is most useful to Windows programmers who understand what meaningful and useful messages to post.
The function returns a non-zero value if the message was successfully posted. Otherwise, it is zero.the
The first parameter is the window handle of the window to receive the message (see FindWindow). The second parameter is the type of message posted (wMsg), the third parameter is wParam, and the fourth parameter is lParam. The specific value of each parameter is dependent on the message being posted. For more information see the Microsoft Windows SDK, Microsoft Press's Windows 3.0 Programmers Reference Manual, or Petzold's Programming Windows.
--This example will look for a copy of Paintbrush. If a copy is found,
--it will be shut down.
linkDLL user
WORD findWindow(DWORD, STRING)
INT PostMessage(WORD, WORD, WORD, DWORD)
end linkDLL
get FindWindow(0, "Paintbrush - (Untitled)")
if it is not 0
get PostMessage (it, 16, 0, 0) --16 instructs the app to exit
end if
IsIconic
INT IsIconic(WORD)
This User DLL function is used to determine if a window is minimized.
The function returns a non-zero value if the window is minimized. Otherwise the return value is zero.
The single parameter is the handle of the window whose iconic status you are checking.
--This example will toggle the window of another ToolBook instance
--between minimized and maximized states.
linkDLL user
INT ShowWindow(WORD, INT)
INT IsIconic(WORD)
end linkDLL
getRemote "sysWindowHandle" application ToolBook
set hWnd to it
if hWnd is null
break to system --no ToolBook instance found
end if
if IsIconic(hWnd) > 0
get ShowWindow(hWnd, 3)
get ShowWindow(hWnd, 7)
end if
IsIconic
FindWindow
PostMessage
SetActiveWindow
ShowWindow
`D|D|%
Must Have DLL Function Calls
System
enterBook
enterBook
reader
sizeToPage
destination
sortlist.dll
sortList
System
--Copyright Asymetrix Corporation, 1990.
All Rights Reserved.
--Jeff Day,
;Technical Support.
initmenus
reindex
c"Functions"
e"Index"
e"Add New"
e"Reindex"
e"Delete..."
c"Text"
e"Import..."
original
"Page" &&
AddNew
("Please
"desc,ret,par,ex"
" &&
rf > 0
delete
"Do you really want
permanently
function?" \
f"OK"
"Cancel"
reindex
initmenus
Index
AddNew
enterBook
newpage
leaveBook
enterPage
delete
enterBook
reader
initmenus
sizeToPage
<reindex
initmenus
Functions
Index
Functions
Functions
Add New
Functions
Reindex
Functions
Delete...
Functions
Import...
leaveBook
reindex
original
index
Index
Yhistory
AddNew
y5newpage
newpage
Please name this page.
<reindex
clear
enterPage
desc,ret,par,ex
recordfield
rectangle
scrolling
delete
Do you really want to permanently delete this function?