Blame | Last modification | View Log
PVB_BEGIN POWERVBversion 1domain "USER"file "mouse.pls"PVB_BEGIN OBJECTname "LIBRARY"PVB_BEGIN SOURCE:SUMMIT2.2 "0x308"drawing "mouse.pls"object "LIBRARY"PVB_BEGIN CODE'Library for mouse routines, the function PvbSetCursor is used'in the application to change the appearance of the mouse-'cursor.Private MouseInit as integerPrivate MouseCounter as integerDeclare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As LongDeclare Function pvb_init_cursor Lib "pvb_util" (ByVal title As Long) as IntegerDeclare Function pvb_set_cursor Lib "pvb_util" Alias "pvb_set_cursor" (ByVal Index as Integer) as IntegerConst AnimatedCursor as integer = 18Const DefaultCursor as integer = 0Sub PvbMouseInit()Dim b as longMouseCounter = 0'call loadlibrary functionif MouseInit = 0 thenb = LoadLibrary( "pvb_util.dll")end if'call mouse init function from pvb_util libraryb = pvb_init_cursor( 0)End subSub PvbLinkCursor(optional link as variant)Dim x as integerIf ismissing(link) then link = falseCritical'call cursor function within pvb_util libraryif link thenx = pvb_set_cursor( AnimatedCursor)MouseCounter = MouseCounter + 1elseif (MouseCounter > 0) then MouseCounter = MouseCounter - 1if (MouseCounter = 0) then x = pvb_set_cursor( DefaultCursor)end ifEndCriticalEnd subSub PvbSetCursor(cursor as integer)Dim x as integer'call cursor function within pvb_util libraryx = pvb_set_cursor( 0) 'cursor)End subSub PvbResetCursor()Dim x as integer'call cursor function within pvb_util libraryx = pvb_set_cursor( DefaultCursor)End subPVB_END CODEPVB_END SOURCEPVB_END OBJECTPVB_END POWERVB