home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 July & August
/
Pcwk7897.iso
/
mgxsuite
/
abc.z
/
T_ONLINE.FRM
< prev
next >
Wrap
Text File
|
1996-12-16
|
5KB
|
167 lines
VERSION 4.00
Begin VB.Form Form1
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "Text on Lines DEMO"
ClientHeight = 3195
ClientLeft = 1095
ClientTop = 1485
ClientWidth = 4560
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 3600
Icon = "T_ONLINE.frx":0000
Left = 1035
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4560
Top = 1140
Width = 4680
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 495
Left = 240
Picture = "T_ONLINE.frx":030A
ScaleHeight = 495
ScaleWidth = 495
TabIndex = 3
Top = 2505
Width = 495
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
Height = 315
Left = 2010
TabIndex = 1
Text = "Text1"
Top = 2025
Width = 630
End
Begin VB.CommandButton Command1
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "Color it BLUE"
Height = 405
Left = 2790
TabIndex = 0
Top = 1980
Width = 1515
End
Begin VB.Label Label4
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = $"T_ONLINE.frx":0614
ForeColor = &H80000008&
Height = 855
Left = 240
TabIndex = 6
Top = 870
Width = 4005
End
Begin VB.Label Label2
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "This sample first loads a file in ABC FlowCharter called ""T_ONLINE.AF3"" which contains a line with 3 attached text objects. "
ForeColor = &H80000008&
Height = 675
Left = 270
TabIndex = 5
Top = 150
Width = 4005
End
Begin VB.Label Label3
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "(c) Micrografx Inc., 1996. All Rights Reserved."
ForeColor = &H80000008&
Height = 375
Left = 870
TabIndex = 4
Top = 2580
Width = 3210
End
Begin VB.Label Label1
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "Which Text Object?"
ForeColor = &H80000008&
Height = 255
Left = 225
TabIndex = 2
Top = 2070
Width = 1815
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Dim ABC As Object
Dim Chart As Object
Private Sub Command1_Click()
Dim Objects As Object
Dim TheLine As Object
Dim TheTextObject As Object
Dim ChosenTextObject As Object
' Since there is only one line in the
' test chart uses ItemFromLines
Set TheLine = Chart.Objects.ItemFromLines
' Get an Objects collection to work with
Set Objects = Chart.Objects
Counter = 1
Found = False
Do
' Look at all objects attached to the line
Set TheTextObject = Objects.ItemFromAttachments(TheLine)
' If the attached object is a TextBlock (Type = 2)
If TheTextObject.Type = 2 Then
' Reset all text objects on the line
' to black
TheTextObject.Color = ABC.BLACK
' If this is the requested Object
' from the Text1 EditControl, store
' the object in a variable called
' ChosenTextObject
If Counter = Val(Text1) Then
Set ChosenTextObject = TheTextObject
Found = True
End If
Counter = Counter + 1
End If
Loop While TheTextObject.Valid
' Set ChosenTextObject to Blue
If Found Then
ChosenTextObject.Color = ABC.BLUE
Else
MsgBox "The line only has " + Str$(Counter - 1) + " attached text objects. Cannot color text object " + Text1 + " blue.", 48, Form1.Caption
End If
End Sub
Private Sub Form_Load()
Text1 = 1
Set ABC = CreateObject("ABCFlow.application")
ABC.Visible = True
Set Chart = ABC.Open(App.Path + "\T_ONLINE.ABC")
End Sub