home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 July & August
/
Pcwk7897.iso
/
mgxsuite
/
abc.z
/
LINEDRAW.FRM
< prev
next >
Wrap
Text File
|
1996-12-16
|
4KB
|
144 lines
VERSION 4.00
Begin VB.Form Form1
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "Line Draw DEMO"
ClientHeight = 3030
ClientLeft = 870
ClientTop = 1530
ClientWidth = 3690
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 = 3435
Icon = "LINEDRAW.frx":0000
Left = 810
LinkTopic = "Form1"
ScaleHeight = 3030
ScaleWidth = 3690
Top = 1185
Width = 3810
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 495
Left = 165
Picture = "LINEDRAW.frx":030A
ScaleHeight = 495
ScaleWidth = 495
TabIndex = 3
Top = 1455
Width = 495
End
Begin AbcflowLib.ABC ABC1
Height = 615
Left = 0
TabIndex = 4
Top = 2040
Width = 495
_version = 65536
_extentx = 873
_extenty = 1085
_stockprops = 1
End
Begin VB.Label Label3
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "(c) Micrografx Inc., 1996. All Rights Reserved."
ForeColor = &H80000008&
Height = 390
Left = 795
TabIndex = 0
Top = 1530
Width = 3000
End
Begin VB.Label Label2
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "<---- Double-click on this custom OCX in VB 4.0 edit mode to see the event handling code."
ForeColor = &H80000008&
Height = 615
Left = 600
TabIndex = 2
Top = 2160
Visible = 0 'False
Width = 3015
End
Begin VB.Label Label1
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = $"LINEDRAW.frx":0614
ForeColor = &H80000008&
Height = 1095
Left = 240
TabIndex = 1
Top = 120
Width = 3375
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Dim ABC As Object
Dim ShapeSource As Object
Dim ShapeDest As Object
Dim FirstDoubleClick As Integer
Private Sub ABC1_AppQuitNOTIFY()
End
End Sub
Private Sub ABC1_DoubleClickSUBCLASS(ByVal Object As Object, ByVal Chart As Object, Override As Boolean)
If FirstDoubleClick = False Then
FirstDoubleClick = True
Set ShapeSource = Object
ShapeSource.Shape.FillColor = ABC1.App.Blue
Else
Set ShapeDest = Object
ShapeDest.Shape.FillColor = ABC1.App.RED
success = DrawConnectLine(Chart, ShapeSource, ShapeDest)
FirstDoubleClick = False
End If
Override = True
End Sub
Private Function DrawConnectLine(Chart As Object, Source As Object, Dest As Object) As Integer
Dim Connectline As Object
Set Connectline = Chart.DrawLine(Dest, Source)
Connectline.Line_.StemWidth = 3
Connectline.Line_.DestArrowStyle = 0
Connectline.Line_.SourceArrowStyle = 2
Connectline.Line_.Color = ABC.Green
DrawConnectLine = 1
End Function
Private Sub Form_Load()
Set ABC = CreateObject("ABCFlow.application")
ABC.Visible = True
FirstDoubleClick = False
ABC.RegisterEvent ABC1, Form1.Caption, "DoubleClickSUBCLASS"
' Get the ABC Quit event so the Menu
' sample can unload when ABC Quits
ABC.RegisterEvent ABC1, Form1.Caption, "AppQuitNOTIFY"
End Sub