home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hot Shareware 35
/
hot35.iso
/
ficheros
/
LVB
/
T2W32534.ZIP
/
_OBJECT.FRM
< prev
next >
Wrap
Text File
|
1998-05-02
|
20KB
|
518 lines
VERSION 5.00
Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
Begin VB.Form frmObject
BorderStyle = 4 'Fixed ToolWindow
Caption = "Object"
ClientHeight = 4845
ClientLeft = 1890
ClientTop = 3270
ClientWidth = 7485
MaxButton = 0 'False
MDIChild = -1 'True
PaletteMode = 1 'UseZOrder
ScaleHeight = 4845
ScaleWidth = 7485
ShowInTaskbar = 0 'False
Begin VB.TextBox txt_Result
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
Height = 3270
Left = 105
Locked = -1 'True
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 630
Width = 7260
End
Begin Threed.SSFrame SSFrame1
Height = 750
Index = 1
Left = 105
TabIndex = 1
Tag = "Tag for SSFrame1"
Top = 3990
Width = 7260
_Version = 65536
_ExtentX = 12806
_ExtentY = 1323
_StockProps = 14
Caption = "Test Frame"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
MousePointer = 13
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "Test Label"
DataField = "DataField for Label1"
ForeColor = &H00FF0000&
Height = 330
Left = 105
MousePointer = 14 'Arrow and Question
TabIndex = 2
Tag = "Tag for Label1"
Top = 315
Width = 7050
End
End
Begin Threed.SSPanel SSPanel1
Align = 1 'Align Top
Height = 480
Left = 0
TabIndex = 3
Top = 0
Width = 7485
_Version = 65536
_ExtentX = 13203
_ExtentY = 847
_StockProps = 15
ForeColor = -2147483640
BackColor = 12632256
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Begin VB.ComboBox cmb_Function
Height = 315
Left = 1365
TabIndex = 4
Top = 90
Width = 4785
End
Begin Threed.SSCommand cmdNP
Height = 300
Index = 1
Left = 7140
TabIndex = 8
Top = 90
Width = 255
_Version = 65536
_ExtentX = 450
_ExtentY = 529
_StockProps = 78
Caption = ">"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BevelWidth = 1
Font3D = 3
RoundedCorners = 0 'False
Outline = 0 'False
End
Begin Threed.SSCommand cmdNP
Height = 300
Index = 0
Left = 6300
TabIndex = 7
Top = 90
Width = 255
_Version = 65536
_ExtentX = 450
_ExtentY = 529
_StockProps = 78
Caption = "<"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BevelWidth = 1
Font3D = 3
RoundedCorners = 0 'False
Outline = 0 'False
End
Begin Threed.SSCommand SSCommand1
Default = -1 'True
Height = 300
Left = 6615
TabIndex = 5
Top = 90
Width = 465
_Version = 65536
_ExtentX = 820
_ExtentY = 529
_StockProps = 78
Caption = "&Go"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BevelWidth = 1
RoundedCorners = 0 'False
Outline = 0 'False
End
Begin VB.Label Label2
Caption = "&Select a function"
Height = 255
Left = 90
TabIndex = 6
Top = 120
Width = 1275
End
End
End
Attribute VB_Name = "frmObject"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Option Base 1
Private Const Iteration = 250
Dim IsLoaded As Integer
Dim TimerStartOk As Integer
Dim TimerCloseOk As Integer
Dim TimerHandle As Integer
Dim TimerValue As Long
Private Sub cmdNP_Click(Index As Integer)
Call sub_NextPrev(cmb_Function, Index)
End Sub
Private Sub cmb_Function_Click()
If (IsLoaded = False) Then Exit Sub
Call cDisableFI(mdiT2W.Picture1)
txt_Result = ""
DoEvents
Select Case cmb_Function.ListIndex
Case 0
Call TestObjectGetX
Case 1
Call TestGetObjX
Case 2
Call TestObjectPutX
Case 3
Call TestPutObjX
Case 4
Call TestEnumObjects
End Select
DoEvents
Call cEnableFI(mdiT2W.Picture1)
End Sub
Private Sub Form_Activate()
mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
End Sub
Private Sub Form_Load()
IsLoaded = False
Show
Call sub_Load_Combo(cmb_Function, T2WDirInst + "_object.t2w")
IsLoaded = True
End Sub
Private Sub SSCommand1_Click()
Call cmb_Function_Click
End Sub
Private Sub TestObjectGetX()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
strResult = ""
strDisplay = ""
strDisplay = strDisplay & "ObjectGetX for SSFrame1(1)" & vbCrLf & vbCrLf
strDisplay = strDisplay & "Boolean (property 'enabled') is '" & cObjectGetBoolean(SSFrame1(1), "enabled") & "'" & vbCrLf
strDisplay = strDisplay & "Byte (property 'alignment') is '" & cObjectGetByte(SSFrame1(1), "alignment") & "'" & vbCrLf
strDisplay = strDisplay & "Integer (property 'mousepointer') is '" & cObjectGetInteger(SSFrame1(1), "mousepointer") & "'" & vbCrLf
strDisplay = strDisplay & "Long (property 'forecolor') is '" & cObjectGetLong(SSFrame1(1), "forecolor") & "'" & vbCrLf
strDisplay = strDisplay & "String (property 'caption') is '" & cObjectGetString(SSFrame1(1), "caption") & "'" & vbCrLf
strDisplay = strDisplay & "Variant (property 'tabindex') is '" & cObjectGetVariant(SSFrame1(1), "tabindex") & "'" & vbCrLf
strDisplay = strDisplay & "Variant (property 'caption') is '" & cObjectGetVariant(SSFrame1(1), "caption") & "'" & vbCrLf
strDisplay = strDisplay & "Variant (property 'visible') is '" & cObjectGetVariant(SSFrame1(1), "visible") & "'" & vbCrLf
strDisplay = strDisplay & "Index (property 'index') is '" & cObjectGetIndex(SSFrame1(1)) & "'" & vbCrLf
strDisplay = strDisplay & vbCrLf
strDisplay = strDisplay & "ObjectGetX for Label1" & vbCrLf & vbCrLf
strDisplay = strDisplay & "Boolean (property 'enabled') is '" & cObjectGetBoolean(Label1, "enabled") & "'" & vbCrLf
strDisplay = strDisplay & "Byte (property 'alignment') is '" & cObjectGetByte(Label1, "alignment") & "'" & vbCrLf
strDisplay = strDisplay & "Integer (property 'mousepointer') is '" & cObjectGetInteger(Label1, "mousepointer") & "'" & vbCrLf
strDisplay = strDisplay & "Long (property 'forecolor') is '" & cObjectGetLong(Label1, "forecolor") & "'" & vbCrLf
strDisplay = strDisplay & "String (property 'caption') is '" & cObjectGetString(Label1, "caption") & "'" & vbCrLf
strDisplay = strDisplay & "Variant (property 'tabindex') is '" & cObjectGetVariant(Label1, "tabindex") & "'" & vbCrLf
strDisplay = strDisplay & "Variant (property 'caption') is '" & cObjectGetVariant(Label1, "caption") & "'" & vbCrLf
strDisplay = strDisplay & "Variant (property 'visible') is '" & cObjectGetVariant(Label1, "visible") & "'" & vbCrLf
strDisplay = strDisplay & "Index (property 'index') is '" & cObjectGetIndex(Label1) & "'"
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cObjectGetString(cmb_Function, "text")
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestGetObjX()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
strResult = ""
strDisplay = ""
strDisplay = strDisplay & "GetObjX for SSFrame1(1)" & vbCrLf & vbCrLf
strDisplay = strDisplay & "Caption is '" & cGetObjCaption(SSFrame1(1)) & "'" & vbCrLf
strDisplay = strDisplay & "Container is '" & cGetObjContainer(SSFrame1(1)) & "'" & vbCrLf
strDisplay = strDisplay & "Parent is '" & cGetObjParent(SSFrame1(1)) & "'" & vbCrLf
strDisplay = strDisplay & "Tag is '" & cGetObjTag(SSFrame1(1)) & "'" & vbCrLf
strDisplay = strDisplay & "Text is '" & cGetObjText(SSFrame1(1)) & "'" & vbCrLf
strDisplay = strDisplay & "DataField is '" & cGetObjDataField(SSFrame1(1)) & "'" & vbCrLf
strDisplay = strDisplay & "DataSource is '" & cGetObjDataSource(SSFrame1(1)) & "'" & vbCrLf
strDisplay = strDisplay & "Name is '" & cGetObjName(SSFrame1(1)) & "'" & vbCrLf
strDisplay = strDisplay & "Index is '" & cGetObjIndex(SSFrame1(1)) & "'" & vbCrLf
strDisplay = strDisplay & "NameIndex is '" & cGetObjNameIndex(SSFrame1(1)) & "'" & vbCrLf
strDisplay = strDisplay & "ClassName is '" & cGetObjClassName(SSFrame1(1)) & "'" & vbCrLf
strDisplay = strDisplay & vbCrLf
strDisplay = strDisplay & "GetObjX for Label1" & vbCrLf & vbCrLf
strDisplay = strDisplay & "Caption is '" & cGetObjCaption(Label1) & "'" & vbCrLf
strDisplay = strDisplay & "Container is '" & cGetObjContainer(Label1) & "'" & vbCrLf
strDisplay = strDisplay & "Parent is '" & cGetObjParent(Label1) & "'" & vbCrLf
strDisplay = strDisplay & "Tag is '" & cGetObjTag(Label1) & "'" & vbCrLf
strDisplay = strDisplay & "Text is '" & cGetObjText(Label1) & "'" & vbCrLf
strDisplay = strDisplay & "DataField is '" & cGetObjDataField(Label1) & "'" & vbCrLf
strDisplay = strDisplay & "DataSource is '" & cGetObjDataSource(Label1) & "'" & vbCrLf
strDisplay = strDisplay & "Name is '" & cGetObjName(Label1) & "'" & vbCrLf
strDisplay = strDisplay & "Index is '" & cGetObjIndex(Label1) & "'" & vbCrLf
strDisplay = strDisplay & "NameIndex is '" & cGetObjNameIndex(Label1) & "'" & vbCrLf
strDisplay = strDisplay & "ClassName is '" & cGetObjClassName(Label1) & "'" & vbCrLf
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
strResult = cGetObjContainer(cmb_Function)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestObjectPutX()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
strResult = ""
strDisplay = ""
strDisplay = strDisplay & "ObjectPutX for SSFrame1(1)" & vbCrLf & vbCrLf
Call cObjectPutBoolean(SSFrame1(1), "enabled", False)
strDisplay = strDisplay & "Boolean (property 'enabled') is '" & cObjectGetBoolean(SSFrame1(1), "enabled") & "'" & vbCrLf
Call cObjectPutByte(SSFrame1(1), "alignment", 1)
strDisplay = strDisplay & "Byte (property 'alignment') is '" & cObjectGetByte(SSFrame1(1), "alignment") & "'" & vbCrLf
Call cObjectPutInteger(SSFrame1(1), "mousepointer", 7)
strDisplay = strDisplay & "Integer (property 'mousepointer') is '" & cObjectGetInteger(SSFrame1(1), "mousepointer") & "'" & vbCrLf
Call cObjectPutLong(SSFrame1(1), "forecolor", &HC0C0C0)
strDisplay = strDisplay & "Long (property 'forecolor') is '" & cObjectGetLong(SSFrame1(1), "forecolor") & "'" & vbCrLf
Call cObjectPutString(SSFrame1(1), "caption", "SSFrame1(1).Caption is now this")
strDisplay = strDisplay & "String (property 'caption') is '" & cObjectGetString(SSFrame1(1), "caption") & "'" & vbCrLf
strDisplay = strDisplay & vbCrLf
strDisplay = strDisplay & "ObjectPutX for Label1" & vbCrLf & vbCrLf
Call cObjectPutBoolean(Label1, "enabled", False)
strDisplay = strDisplay & "Boolean (property 'enabled') is '" & cObjectGetBoolean(Label1, "enabled") & "'" & vbCrLf
Call cObjectPutByte(Label1, "alignment", 1)
strDisplay = strDisplay & "Byte (property 'alignment') is '" & cObjectGetByte(Label1, "alignment") & "'" & vbCrLf
Call cObjectPutInteger(Label1, "mousepointer", 7)
strDisplay = strDisplay & "Integer (property 'mousepointer') is '" & cObjectGetInteger(Label1, "mousepointer") & "'" & vbCrLf
Call cObjectPutLong(Label1, "forecolor", &HC0C0C0)
strDisplay = strDisplay & "Long (property 'forecolor') is '" & cObjectGetLong(Label1, "forecolor") & "'" & vbCrLf
Call cObjectPutString(Label1, "caption", "Label1.Caption is now this")
strDisplay = strDisplay & "String (property 'caption') is '" & cObjectGetString(Label1, "caption") & "'" & vbCrLf
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
If ((i Mod 2) = 0) Then
Call cObjectPutByte(Label1, "borderstyle", 0)
Else
Call cObjectPutByte(Label1, "borderstyle", 1)
End If
DoEvents
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestPutObjX()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
strResult = ""
strDisplay = ""
strDisplay = strDisplay & "PutObjX for SSFrame1(1)" & vbCrLf & vbCrLf
Call cPutObjCaption(SSFrame1(1), "SSFrame1(1).Caption set by PutObjCaption")
strDisplay = strDisplay & "Caption is '" & cGetObjCaption(SSFrame1(1)) & "'" & vbCrLf
Call cPutObjDataField(SSFrame1(1), "DataField set by PutObjDataField")
strDisplay = strDisplay & "DataField is '" & cGetObjDataField(SSFrame1(1)) & "'" & vbCrLf
Call cPutObjDataSource(SSFrame1(1), "DataSource set by PutObjSource")
strDisplay = strDisplay & "DataSource is '" & cGetObjDataSource(SSFrame1(1)) & "'" & vbCrLf
Call cPutObjTag(SSFrame1(1), "Tag set by PutObjTag")
strDisplay = strDisplay & "Tag is '" & cGetObjTag(SSFrame1(1)) & "'" & vbCrLf
Call cPutObjText(SSFrame1(1), "Text set by PutObjText")
strDisplay = strDisplay & "Text is '" & cGetObjText(SSFrame1(1)) & "'" & vbCrLf
strDisplay = strDisplay & vbCrLf
strDisplay = strDisplay & "PutObjX for Label1" & vbCrLf & vbCrLf
Call cPutObjCaption(Label1, "Label1.Caption set by PutObjCaption")
strDisplay = strDisplay & "Caption is '" & cGetObjCaption(Label1) & "'" & vbCrLf
Call cPutObjDataField(Label1, "DataField set by PutObjDataField")
strDisplay = strDisplay & "DataField is '" & cGetObjDataField(Label1) & "'" & vbCrLf
Call cPutObjDataSource(Label1, "DataSource set by PutObjSource")
strDisplay = strDisplay & "DataSource is '" & cGetObjDataSource(Label1) & "'" & vbCrLf
Call cPutObjTag(Label1, "Tag set by PutObjTag")
strDisplay = strDisplay & "Tag is '" & cGetObjTag(Label1) & "'" & vbCrLf
Call cPutObjText(Label1, "Text set by PutObjText")
strDisplay = strDisplay & "Text is '" & cGetObjText(Label1) & "'" & vbCrLf
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
Call cPutObjTag(cmb_Function, "Tag set by PutObjTag")
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub
Private Sub TestEnumObjects()
Dim intResult As Integer
Dim strResult As String
Dim strDisplay As String
Dim i As Integer
Dim ObjectNameIndex As String
Dim Obj As Object
strResult = ""
strDisplay = ""
strDisplay = strDisplay + "Current objects (format 1) on this form " & vbCrLf & vbCrLf
intResult = cEnumObjects(Me, ENUMOBJECTS_FORMAT1, True, ObjectNameIndex, Obj)
While (intResult = True)
strDisplay = strDisplay & ObjectNameIndex & vbCrLf
intResult = cEnumObjects(Me, ENUMOBJECTS_FORMAT1, False, ObjectNameIndex, Obj)
Wend
strDisplay = strDisplay & vbCrLf
strDisplay = strDisplay + "Current objects (format 2) on this form " & vbCrLf & vbCrLf
intResult = cEnumObjects(Me, ENUMOBJECTS_FORMAT2, True, ObjectNameIndex, Obj)
While (intResult = True)
strDisplay = strDisplay & ObjectNameIndex & vbCrLf
intResult = cEnumObjects(Me, ENUMOBJECTS_FORMAT2, False, ObjectNameIndex, Obj)
Wend
txt_Result = strDisplay
'time the function
TimerHandle = cTimerOpen()
TimerStartOk = cTimerStart(TimerHandle)
For i = 1 To Iteration
'intResult = cEnumObjects(Me, False, ObjectNameIndex, Obj)
Next i
mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
TimerCloseOk = cTimerClose(TimerHandle)
End Sub