Guidance
指路人
g.yi.org
software / rapidq / Examples / QObject / Object / QCursor.inc

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
'=======================================================
' Type Objet
' Classe QCursor version 1.0
'=======================================================
     $IFNDEF TRUE
      $DEFINE True 1
     $ENDIF

     $IFNDEF FALSE
      $DEFINE False 0
     $ENDIF

     $IFNDEF boolean
      $DEFINE boolean INTEGER
     $ENDIF

     DECLARE FUNCTION LoadCursorFromFile LIB "user32" ALIAS "LoadCursorFromFileA" (CursorFileName AS STRING) AS LONG
     DECLARE FUNCTION SetCursorPos LIB "user32" ALIAS "SetCursorPos" (x AS LONG,y AS LONG) AS LONG
     DECLARE FUNCTION ShowCursor LIB "user32" ALIAS "ShowCursor" (bShow AS LONG) AS LONG

     TYPE QCursor EXTENDS QOBJECT
Private:
      FileName AS STRING
Public:
      Count AS INTEGER PROPERTY SET SetCount
      Visible AS  boolean PROPERTY SET SetShow

  '==============================
  ' proprieté nombre de curseur
  '==============================
      PROPERTY SET SetCount(count AS INTEGER)
    'Read only
      END PROPERTY

  '==============================
  ' proprieté visibilité curseur
  '==============================
      PROPERTY SET SetShow(visible AS boolean)
       This.Visible=visible
       ShowCursor(visible)
      END PROPERTY

  '==============================
  ' méthode chargement curseur
  '==============================
      SUB LoadFromResource(Res AS LONG)
       IF Res<RESOURCECOUNT() AND Res>-1 THEN
        EXTRACTRESOURCE Resource(Res),This.FileName
        This.Count++
        Screen.Cursors(This.Count)=LoadCursorFromFile(This.FileName)
        IF FILEEXISTS(This.FileName) THEN KILL This.FileName
       END IF
      END SUB

  '==============================
  ' méthode chargement curseur
  '==============================
      SUB LoadFromFile(FileName AS STRING)
       IF FILEEXISTS(FileName) THEN
        This.Count++
        Screen.Cursors(This.Count)=LoadCursorFromFile(FileName)
       END IF
      END SUB

  '==============================
  ' méthode déplacement curseur
  '==============================
      SUB Move(x AS LONG,y AS LONG)
       SetCursorPos(x,y)
      END SUB

      CONSTRUCTOR
       Count=0
       Visible=true
       FileName=LEFT$(COMMAND$(0),rinstr(COMMAND$(0),"\"))+"temp.cur"
      END CONSTRUCTOR
     END TYPE
掌柜推荐
 
 
¥860.00 ·
 
 
¥900.00 ·
 
 
¥810.00 ·
 
 
¥317.00 ·
 
 
¥1,370.00 ·
 
 
¥660.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-06-19 07:49:59