Guidance
指路人
g.yi.org
software / rapidq / examples / gui / Button / QArrow / qarrowDemo.bas

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

  
'  Test program for QArrow Ver. 0.01 by Peter Scheutz 1999.09.28
'  Shows the diffent properties of Qarrow.
'  See "Qarrow.bas for the implementation"
'
'  For different *default* colors change "qarrow.bas" else
'  change in code below

     $TYPECHECK ON
     $INCLUDE "RAPIDQ.INC" 'QArrow uses this' so it' must be before "$INCLUDE "QARROW.BAS""
     $INCLUDE "QARROW.BAS"



     DIM Arrow1 AS QArrow
     DIM Arrow2 AS QArrow
     DIM Arrow3 AS QArrow
     DIM Arrow4 AS QArrow
     DIM Arrow5 AS QArrow
     DIM Form AS QFORM
     DIM Font AS QFONT
     DIM StateLbl AS QLABEL
     DIM Checkbox AS QCHECKBOX



     SUB Check
      IF Checkbox.Checked THEN
       Arrow2.Enabled = True
       Arrow2.Refresh
      ELSE
       Arrow2.Enabled = False
       Arrow2.Refresh
      END IF
     END SUB



     SUB ShowArrowState
      SELECT CASE Arrow1.State
      CASE asNormal
       StateLbl.CAPTION = "I am Normal"
      CASE asHot
       StateLbl.CAPTION = "I am Hot"
      CASE asDown
       StateLbl.CAPTION = "I am Down"
      END SELECT
     END SUB

     SUB NewArrowOnMouseDown

      Arrow1.InheritOnMouseDown
      ShowArrowState
     END SUB

     SUB NewArrowOnMouseUp
      Arrow1.InheritOnMouseUp
      ShowArrowState
      SHOWMESSAGE "You Clicked the arrow"
     END SUB

     SUB NewArrowOnMouseMove
      ShowArrowState
      Arrow1.InheritOnMouseMove

     END SUB



     SUB FormMouseMove
      ShowArrowState
     END SUB

     WITH Arrow1
      .OnMouseDown = NewArrowOnMouseDown
      .OnMouseUp = NewArrowOnMouseUp
      .OnMouseMove = NewArrowOnMouseMove
      .Left = 60
      .Top = 60
      .Orientation = aoPointW
      .PARENT = Form
      .Bevel=True
     END WITH

     WITH Arrow2
      .Left = 130
      .Top = 78
      .Width = 15
      .Height = 30
    '.ArrowColorNormal = &HFF0000
    '.ArrowColorHot = &HFFA0A0
      .Orientation = aoPointE
      .PARENT = Form
      .ArrowColorDisabled=&H6666
      .Enabled=False
     END WITH

     WITH Arrow3
      .Left = 300
      .Top = 75
      .Width = 30
      .Height = 15
      .Orientation= aoPointS
      .PARENT = Form
     END WITH


     WITH Arrow4
      .Left = 250
      .Top = 75
      .Width = 30
      .Height = 15
      .Orientation = aoPointN
      .PARENT = Form
     END WITH


     WITH Arrow5
      .Left = 180
      .Top = 25
      .Width = 16
      .Height = 32
      .ArrowColorNormal=&HFF00AA
      .ArrowColorHot=&HFFAAFF
      .ArrowColorDown=&HA000A0
      .PARENT = Form
      .Bevel=False
     END WITH




     Font.Name = "Arial"
     Font.AddStyles (fsBold)
     Font.COLOR = &HF0F0F0
     Font.Size = 10

     StateLbl.Font = Font
     StateLbl.AutoSize = True
     StateLbl.Left = 10
     StateLbl.Top = 10
     StateLbl.PARENT = Form

     Checkbox.Left=130
     Checkbox.Top=140
     Checkbox.PARENT = Form
     Checkbox.OnClick = Check
     Checkbox.CAPTION="Enable/Disable above arrow"
     Checkbox.Width=220
     Checkbox.Font=Font

     Form.Width = 400
     Form.Height = 200
     Form.Center
     Form.COLOR = &H6666
     Form.OnMouseMove = FormMouseMove

     Form.SHOWMODAL
掌柜推荐
 
 
¥950.00 ·
 
 
¥760.00 ·
 
 
¥470.00 ·
 
 
¥387.00 ·
 
 
¥1,370.00 ·
 
 
¥490.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2002-08-04 10:18:10