home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Houseplan Collection
/
HRCD2005.ISO
/
data1.cab
/
Zusatz
/
3DS
/
DATA2.Z
/
MainForm.frm
< prev
next >
Wrap
Text File
|
1999-09-22
|
5KB
|
163 lines
VERSION 5.00
Begin VB.Form MainForm
Caption = "Texture Watcher"
ClientHeight = 4470
ClientLeft = 60
ClientTop = 345
ClientWidth = 6255
LinkTopic = "Form1"
ScaleHeight = 4470
ScaleWidth = 6255
StartUpPosition = 3 'Windows Default
Begin VB.TextBox ColRGB
Height = 285
Left = 4680
Locked = -1 'True
TabIndex = 9
Top = 3000
Width = 1455
End
Begin VB.TextBox vSize
Height = 285
Left = 4680
Locked = -1 'True
TabIndex = 7
Top = 1920
Width = 1455
End
Begin VB.TextBox hSize
Height = 285
Left = 4680
Locked = -1 'True
TabIndex = 5
Top = 840
Width = 1455
End
Begin VB.TextBox TextureName
Enabled = 0 'False
Height = 285
Left = 840
Locked = -1 'True
TabIndex = 3
Top = 4080
Width = 5295
End
Begin VB.PictureBox Display
BackColor = &H000000C0&
Height = 3495
Left = 120
ScaleHeight = 3435
ScaleWidth = 4275
TabIndex = 0
Top = 480
Width = 4335
End
Begin VB.Label Label5
Caption = "Farbe:"
Height = 255
Left = 4680
TabIndex = 8
Top = 2760
Width = 1335
End
Begin VB.Label Label4
Caption = "H÷he [m]:"
Height = 255
Left = 4680
TabIndex = 6
Top = 1680
Width = 1335
End
Begin VB.Label Label3
Caption = "Breite [m]:"
Height = 255
Left = 4680
TabIndex = 4
Top = 600
Width = 1335
End
Begin VB.Label Label2
Caption = "Name:"
Height = 255
Left = 120
TabIndex = 2
Top = 4080
Width = 615
End
Begin VB.Label Label1
Caption = "Zuletzt gedroppte Textur:"
Height = 255
Left = 120
TabIndex = 1
Top = 120
Width = 4335
End
End
Attribute VB_Name = "MainForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function PictureFromArConPicture Lib "MakroUtil" _
(ByRef picture As Variant) As StdPicture
Dim WithEvents exe As ArCon.ArCon
Attribute exe.VB_VarHelpID = -1
Private Sub exe_ChangeNotify(ByVal obj As Object, ByVal events As Long)
If events And AC_CHANGE_TextureChanged = 0 Then Exit Sub
If Not TypeOf obj Is ArCon.WallSegment Then Exit Sub
Dim w As ArCon.WallSegment
Set w = obj
ShowNewTexture w.Texture.Name
End Sub
Private Sub exe_ProgramExit()
If Not exe Is Nothing Then
exe.EndMe
Set exe = Nothing
End If
Unload Me
End Sub
Private Sub ShowNewTexture(ByVal newTexName As String)
Dim pic As Variant
Dim col As Long
Dim h As Single, w As Single
Dim isBmp As Boolean
Display.picture = Nothing
Display.BackColor = RGB(0, 0, 0)
hSize.Text = ""
vSize.Text = ""
ColRGB.Text = ""
TextureName.Text = newTexName
If Not exe.TextureToPicture(newTexName, isBmp, col, pic, w, h) Then Exit Sub
hSize.Text = CStr(w)
vSize.Text = CStr(h)
If isBmp Then
Display.picture = PictureFromArConPicture(pic)
Else
ColRGB.Text = "0x00" & Hex(col)
Display.BackColor = col
End If
End Sub
Private Sub Form_Load()
Dim oldMask As Long
Set exe = New ArCon.ArCon
exe.StartMe hWnd, ""
exe.ChangeTypeNotifyMask AC_OBJTYPE_WallSegment, AC_CHANGE_TextureChanged, 0, oldMask
ShowNewTexture ""
End Sub
Private Sub Form_Unload(Cancel As Integer)
If Not exe Is Nothing Then
exe.EndMe
Set exe = Nothing
End If
End Sub