-
Notifications
You must be signed in to change notification settings - Fork 2
/
cldisplay.frm
155 lines (143 loc) · 5.25 KB
/
cldisplay.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
VERSION 5.00
Object = "{6E5043E8-C452-4A6A-B011-9B5687112610}#1.0#0"; "Pesgo32f.ocx"
Begin VB.Form FormCLDISPLAY
AutoRedraw = -1 'True
Caption = "CL Spectrum Display"
ClientHeight = 5520
ClientLeft = 120
ClientTop = 405
ClientWidth = 13575
ControlBox = 0 'False
LinkTopic = "Form1"
MinButton = 0 'False
ScaleHeight = 5520
ScaleWidth = 13575
StartUpPosition = 3 'Windows Default
Begin Pesgo32fLib.Pesgo Pesgo1
Height = 3855
Left = 120
TabIndex = 5
Top = 120
Width = 9255
_Version = 65536
_ExtentX = 16325
_ExtentY = 6800
_StockProps = 96
_AllProps = "CLDisplay.frx":0000
End
Begin VB.CommandButton CommandClose
BackColor = &H00C0FFC0&
Caption = "Close"
Default = -1 'True
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 12360
Style = 1 'Graphical
TabIndex = 0
Top = 4920
Width = 1095
End
Begin VB.CommandButton CommandCopyToClipboard
Caption = "Copy To Clipboard"
Height = 495
Left = 6240
TabIndex = 4
Top = 4920
Width = 1575
End
Begin VB.CommandButton CommandZoom
Caption = "Zoom Full"
Height = 495
Left = 4920
TabIndex = 2
Top = 4920
Width = 1095
End
Begin VB.Label LabelTrack
BorderStyle = 1 'Fixed Single
Height = 255
Left = 120
TabIndex = 3
Top = 5160
Width = 4695
End
Begin VB.Label LabelSpectrumName
BorderStyle = 1 'Fixed Single
Height = 255
Left = 120
TabIndex = 1
Top = 4920
Width = 4695
End
End
Attribute VB_Name = "FormCLDISPLAY"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' (c) Copyright 1995-2024 by John J. Donovan
Option Explicit
Private Sub CommandClose_Click()
If Not DebugMode Then On Error Resume Next
Unload FormCLDISPLAY
End Sub
Private Sub CommandCopyToClipboard_Click()
If Not DebugMode Then On Error Resume Next
FormCLDISPLAY.Pesgo1.AllowExporting = True
FormCLDISPLAY.Pesgo1.ExportImageLargeFont = False ' = True for large font
FormCLDISPLAY.Pesgo1.ExportImageDpi = 600
Call FormCLDISPLAY.Pesgo1.PEcopybitmaptoclipboard(FormCLDISPLAY.Pesgo1.Width / 10, FormCLDISPLAY.Pesgo1.Height / 10)
End Sub
Private Sub CommandZoom_Click()
If Not DebugMode Then On Error Resume Next
FormCLDISPLAY.Pesgo1.PEactions = UNDO_ZOOM&
End Sub
Private Sub Form_Load()
If Not DebugMode Then On Error Resume Next
icancelload = False
Call InitWindow(Int(2), MDBUserName$, Me)
' Load form and application icon
Call MiscLoadIcon(Me)
End Sub
Private Sub Form_Resize()
If Not DebugMode Then On Error Resume Next
Dim temp As Single, TopOfButtons As Single
TopOfButtons! = 600
FormCLDISPLAY.LabelSpectrumName.Top = FormCLDISPLAY.ScaleHeight - TopOfButtons!
FormCLDISPLAY.LabelTrack.Top = FormCLDISPLAY.ScaleHeight - (TopOfButtons! - 300)
FormCLDISPLAY.CommandZoom.Top = FormCLDISPLAY.ScaleHeight - TopOfButtons!
FormCLDISPLAY.CommandCopyToClipboard.Top = FormCLDISPLAY.ScaleHeight - TopOfButtons!
FormCLDISPLAY.CommandClose.Top = FormCLDISPLAY.ScaleHeight - TopOfButtons!
FormCLDISPLAY.CommandClose.Left = FormCLDISPLAY.ScaleWidth - (FormCLDISPLAY.CommandClose.Width + 200)
' Make CL display full size of window (PE)
FormCLDISPLAY.Pesgo1.Width = FormCLDISPLAY.ScaleWidth - FormCLDISPLAY.Pesgo1.Left * 2#
temp! = FormCLDISPLAY.ScaleHeight - (TopOfButtons! + WINDOWBORDERWIDTH%)
If temp! > 0# Then FormCLDISPLAY.Pesgo1.Height = temp!
End Sub
Private Sub Form_Unload(Cancel As Integer)
If Not DebugMode Then On Error Resume Next
Call InitWindow(Int(1), MDBUserName$, Me)
End Sub
Private Sub Pesgo1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
If Not DebugMode Then On Error Resume Next
Dim astring As String
Dim fX As Double, fY As Double ' last mouse position
' Get mouse position in data units
Call MiscPlotTrack(Int(1), x!, y!, fX#, fY#, FormCLDISPLAY.Pesgo1)
If ierror Then Exit Sub
' Format graph mouse position
If fX# <> 0# And fY# <> 0# Then
astring$ = FormCLDISPLAY.Pesgo1.XAxisLabel & " " & (CSng(fX#)) & ", " & FormCLDISPLAY.Pesgo1.YAxisLabel & " " & MiscAutoFormat$(CSng(fY#))
FormCLDISPLAY.LabelTrack.Caption = astring$
Else
FormCLDISPLAY.LabelTrack.Caption = vbNullString
End If
End Sub