home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Houseplan Collection
/
HRCD2005.ISO
/
data1.cab
/
Zusatz
/
3DS
/
DATA2.Z
/
Selektionsdemo.frm
< prev
next >
Wrap
Text File
|
1999-08-19
|
4KB
|
153 lines
VERSION 5.00
Begin VB.Form Selektionsdemo
Caption = "Objekte selektieren"
ClientHeight = 2760
ClientLeft = 60
ClientTop = 345
ClientWidth = 6630
LinkTopic = "Form1"
ScaleHeight = 2760
ScaleWidth = 6630
StartUpPosition = 3 'Windows Default
Begin VB.Frame Frame1
Caption = "Zuletzt selektiertes Objekt:"
Height = 2535
Left = 2280
TabIndex = 4
Top = 120
Width = 4215
Begin VB.TextBox RoomName
Height = 375
Left = 120
TabIndex = 8
Top = 1680
Width = 3975
End
Begin VB.TextBox ObjName
Height = 375
Left = 120
TabIndex = 6
Top = 600
Width = 3975
End
Begin VB.Label Label2
Caption = "Befindet sich in Raum:"
Height = 255
Left = 120
TabIndex = 7
Top = 1320
Width = 1815
End
Begin VB.Label Label1
Caption = "Name:"
Height = 255
Left = 120
TabIndex = 5
Top = 360
Width = 855
End
End
Begin VB.CommandButton Quit
Caption = "Ende"
Height = 375
Left = 240
TabIndex = 3
Top = 2280
Width = 1695
End
Begin VB.CommandButton Delete
Caption = "Selektierte l÷schen"
Height = 375
Left = 240
TabIndex = 2
Top = 1440
Width = 1695
End
Begin VB.CommandButton ClearSel
Caption = "Alle deselektieren"
Height = 375
Left = 240
TabIndex = 1
Top = 840
Width = 1695
End
Begin VB.CommandButton SelAll
Caption = "Alle selektieren"
Height = 375
Left = 240
TabIndex = 0
Top = 240
Width = 1695
End
End
Attribute VB_Name = "Selektionsdemo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim WithEvents exe As ArCon.ArCon
Attribute exe.VB_VarHelpID = -1
Private Sub ClearSel_Click()
exe.Clear3DObjectSelection
End Sub
Private Sub Delete_Click()
Dim a, lb As Long, ub As Long, i As Long
Dim o As ArCon.Object3D
a = exe.Selected3DObjects
lb = LBound(a)
ub = UBound(a)
If MsgBox("M÷chten Sie wirklich " & ub - lb + 1 & " Objekte l÷schen?", vbYesNo) = vbYes Then
exe.MultiUserMode = 0
For i = lb To ub
Set o = a(i)
o.Delete True
Next
exe.MultiUserMode = ACMU_DEFAULT
End If
End Sub
Private Sub exe_ChangeNotify(ByVal obj As Object, ByVal events As Long)
If events And AC_CHANGE_Selection Then
Dim o As ArCon.Object3D
Set o = obj
If o.IsSelected Then
ObjName.Text = o.Name
RoomName.Text = o.Room(1).Name
End If
End If
End Sub
Private Sub exe_ProgramExit()
Set exe = Nothing
Unload Me
End Sub
Private Sub Form_Load()
Set exe = New ArCon.ArCon
exe.StartMe hWnd, ""
Dim obj As ArCon.Object3D
For Each obj In exe.DesignObjects
exe.NotifyOnChange obj, AC_CHANGE_Selection
Next
End Sub
Private Sub Form_Unload(Cancel As Integer)
If Not exe Is Nothing Then
exe.EndMe
Set exe = Nothing
End If
End Sub
Private Sub Quit_Click()
Unload Me
End Sub
Private Sub SelAll_Click()
exe.SelectAll3DObjects
End Sub