home *** CD-ROM | disk | FTP | other *** search
/ The Houseplan Collection / HRCD2005.ISO / data1.cab / Zusatz / 3DS / DATA2.Z / Klicker.frm < prev    next >
Text File  |  1999-07-28  |  4KB  |  151 lines

  1. VERSION 5.00
  2. Begin VB.Form Klicker 
  3.    Caption         =   "WΣnde selektieren"
  4.    ClientHeight    =   1860
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   5085
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   1860
  10.    ScaleWidth      =   5085
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.Timer DerTicker 
  13.       Left            =   0
  14.       Top             =   1080
  15.    End
  16.    Begin VB.CommandButton Start 
  17.       Caption         =   "Selektieren"
  18.       Height          =   375
  19.       Left            =   120
  20.       TabIndex        =   6
  21.       Top             =   1320
  22.       Width           =   1575
  23.    End
  24.    Begin VB.CommandButton Quit 
  25.       Caption         =   "Ende"
  26.       Height          =   375
  27.       Left            =   3360
  28.       TabIndex        =   5
  29.       Top             =   1320
  30.       Width           =   1575
  31.    End
  32.    Begin VB.CommandButton Clear 
  33.       Caption         =   "Selektion &l÷schen"
  34.       Height          =   375
  35.       Left            =   1740
  36.       TabIndex        =   4
  37.       Top             =   1320
  38.       Width           =   1575
  39.    End
  40.    Begin VB.TextBox WandID 
  41.       Height          =   375
  42.       Left            =   2760
  43.       TabIndex        =   3
  44.       Top             =   720
  45.       Width           =   2175
  46.    End
  47.    Begin VB.TextBox Anzahl 
  48.       Height          =   375
  49.       Left            =   2760
  50.       TabIndex        =   1
  51.       Text            =   "0"
  52.       Top             =   240
  53.       Width           =   2175
  54.    End
  55.    Begin VB.Label Label2 
  56.       Caption         =   "Letzte Wand-ID:"
  57.       Height          =   255
  58.       Left            =   240
  59.       TabIndex        =   2
  60.       Top             =   720
  61.       Width           =   2295
  62.    End
  63.    Begin VB.Label Label1 
  64.       Caption         =   "Anzahl der selektierten WΣnde:"
  65.       Height          =   255
  66.       Left            =   240
  67.       TabIndex        =   0
  68.       Top             =   240
  69.       Width           =   2295
  70.    End
  71. End
  72. Attribute VB_Name = "Klicker"
  73. Attribute VB_GlobalNameSpace = False
  74. Attribute VB_Creatable = False
  75. Attribute VB_PredeclaredId = True
  76. Attribute VB_Exposed = False
  77. Option Explicit
  78.  
  79. Dim WithEvents exe As ArCon.ArCon
  80. Attribute exe.VB_VarHelpID = -1
  81.     
  82. Private Sub Clear_Click()
  83.     Anzahl.Text = "0"
  84.     WandID.Text = ""
  85.     
  86.     Dim w As ArCon.Wall
  87.     For Each w In exe.CurrentStory.Walls
  88.         MarkWall w, False
  89.     Next
  90. End Sub
  91.  
  92. Private Sub DerTicker_Timer()
  93.     DerTicker.Interval = 0
  94.     Start_Click
  95. End Sub
  96.  
  97. Private Sub exe_GotOneClick(ByVal valid As Boolean, ByVal x As Single, ByVal y As Single, ByVal id As Long)
  98.     Dim w As ArCon.Wall
  99.     If Not valid Then
  100.         WandID.Text = ""
  101.         Exit Sub
  102.     End If
  103.     Set w = exe.CurrentStory.FindWall(x, y)
  104.     If w Is Nothing Then
  105.         WandID.Text = ""
  106.         Exit Sub
  107.     End If
  108.     WandID.Text = w.id
  109.     MarkWall w, True
  110.     Anzahl.Text = Anzahl.Text + 1
  111.     DerTicker.Interval = 50
  112. End Sub
  113.  
  114. Private Sub MarkWall(dieWand As ArCon.Wall, ByVal mark As Boolean)
  115.     Dim col As Long
  116.     If mark Then
  117.         col = RGB(255, 0, 0)
  118.     Else
  119.         col = RGB(0, 0, 0)
  120.     End If
  121.     
  122.     Dim s As ArCon.WallSegment
  123.     For Each s In dieWand.WallSegments
  124.         s.SetLineColor col
  125.     Next
  126. End Sub
  127.  
  128. Private Sub exe_ProgramExit()
  129.     Quit_Click
  130. End Sub
  131.  
  132. Private Sub Form_Load()
  133.     Set exe = New ArCon.ArCon
  134.     exe.StartMe hWnd, ""
  135.     Clear_Click
  136. End Sub
  137.  
  138. Private Sub Form_Unload(Cancel As Integer)
  139.     exe.EndMe
  140.     Set exe = Nothing
  141. End Sub
  142.  
  143. Private Sub Quit_Click()
  144.     Unload Me
  145. End Sub
  146.  
  147. Private Sub Start_Click()
  148.     Dim v As Variant
  149.     exe.GetOneClick "Bitte wΣhlen Sie eine Wand aus", v, 0
  150. End Sub
  151.