home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
ku.zip
/
KU.VRM
< prev
next >
Wrap
Text File
|
1993-10-26
|
4KB
|
192 lines
/* Custom mainline for macro"s */
call RXFuncAdd "VRLoadFuncs", "VROBJ", "VRLoadFuncs"
call VRLoadFuncs
/*:VRX Main
*/
/* Main
*/
Main:
/* Process the arguments.
Get the parent window.
*/
parse source . calledAs .
parent = ""
argCount = arg()
argOff = 0
if( calledAs \= "COMMAND" )then do
if argCount >= 1 then do
parent = arg(1)
argCount = argCount - 1
argOff = 1
end
end
InitArgs.0 = argCount
if( argCount > 0 )then do i = 1 to argCount
InitArgs.i = arg( i + argOff )
end
drop calledAs argCount argOff
/* Load the windows
*/
call VRInit
parse source . . spec
_VREPrimaryWindowPath = ,
VRParseFileName( spec, "dpn" ) || ".VRW"
_VREPrimaryWindow = ,
VRLoad( parent, _VREPrimaryWindowPath )
drop parent spec
if( _VREPrimaryWindow == "" )then do
call VRMessage "", "Cannot load window:" VRError(), ,
"Error!"
_VREReturnValue = 32000
signal _VRELeaveMain
end
/* Process events
*/
call Init
signal on halt
do while( \ VRGet( _VREPrimaryWindow, "Shutdown" ) )
_VREEvent = VREvent()
interpret _VREEvent
end
_VREHalt:
_VREReturnValue = Fini()
call VRDestroy _VREPrimaryWindow
_VRELeaveMain:
call VRFini
exit _VREReturnValue
VRLoadSecondary: procedure
name = arg( 1 )
window = VRLoad( VRWindow(), VRWindowPath(), name )
call VRMethod window, "CenterWindow"
call VRSet window, "Visible", 1
call VRMethod window, "Activate"
return window
/*:VRX Fini
*/
Fini:
window = VRWindow()
call VRSet window, "Visible", 0
drop window
return 0
/*:VRX Halt
*/
Halt:
signal _VREHalt
return
/*:VRX Init
*/
Init:
window = VRWindow()
call VRMethod window, "CenterWindow"
call VRSet window, "Visible", 1
call VRMethod window, "Activate"
drop window
return
/*:VRX PB_10_Click
*/
PB_10_Click:
ok = VRMethod("Application", "StartThread", dinfo)
return
/*:VRX PB_11_Click
*/
PB_11_Click:
"dir a:/w"
return
/*:VRX PB_12_Click
*/
PB_12_Click:
"dir b:/w"
return
/*:VRX PB_1_Click
*/
PB_1_Click:
ok = VRMessage( ku, "Press (ALT-HOME) to shrink object into a window!", "Please", Warning)
"formata.bat"
return
/*:VRX PB_2_Click
*/
PB_2_Click:
ok = VRMessage( ku, "Press (ALT-HOME) to shrink object into a window!", "Please", Warning)
"formatb.bat"
return
/*:VRX PB_3_Click
*/
PB_3_Click:
ok = VRMessage( ku, "Press (ALT-HOME) to shrink object into a window!", "Please", Warning)
"atoa.bat"
return
/*:VRX PB_4_Click
*/
PB_4_Click:
ok = VRMessage( ku, "Press (ALT-HOME) to shrink object into a window!", "Please", Warning)
"atob.bat"
return
/*:VRX PB_5_Click
*/
PB_5_Click:
ok = VRMessage( ku, "Press (ALT-HOME) to shrink object into a window!", "Please", Warning)
"btob.bat"
return
/*:VRX PB_6_Click
*/
PB_6_Click:
ok = VRMessage( ku, "Press (ALT-HOME) to shrink object into a window!", "Please", Warning)
"btoa.bat"
return
/*:VRX PB_7_Click
*/
PB_7_Click:
ok = VRMethod("application", "StartThread", Ainfo)
return
/*:VRX PB_8_Click
*/
PB_8_Click:
Ok = VRMethod("application", "StartThread", binfo)
return
/*:VRX PB_9_Click
*/
PB_9_Click:
ok = VRMethod("Application", "StartThread", cinfo)
return
/*:VRX Pict_1_Click
*/
Pict_1_Click:
return/*:VRX Pict_2_Click
*/
Pict_2_Click:
exit/*:VRX Quit
*/
Quit:
window = VRWindow()
call VRSet window, "Shutdown", 1
drop window
return
/*:VRX Window1_Close
*/
Window1_Close:
call Quit
return