-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathfrmChangeValue.frm
149 lines (135 loc) · 4.16 KB
/
frmChangeValue.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
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "Richtx32.ocx"
Begin VB.Form frmChangeValue
BorderStyle = 3 'Fixed Dialog
Caption = "Change Value"
ClientHeight = 1980
ClientLeft = 45
ClientTop = 330
ClientWidth = 4545
ControlBox = 0 'False
Icon = "frmChangeValue.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1980
ScaleWidth = 4545
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Tag = "8200"
Begin RichTextLib.RichTextBox rtfValue
Height = 495
Left = 120
TabIndex = 1
Top = 1440
Width = 3015
_ExtentX = 5318
_ExtentY = 873
_Version = 393217
MultiLine = 0 'False
TextRTF = $"frmChangeValue.frx":08CA
End
Begin VB.TextBox txtValue
Height = 375
Left = 120
TabIndex = 5
Text = "Text1"
Top = 1440
Width = 3015
End
Begin VB.CommandButton cmdReset
Caption = "&Reset to Default"
Height = 495
Left = 3360
TabIndex = 4
Tag = "8210"
Top = 1080
Width = 1095
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "&Cancel"
Height = 375
Left = 3360
TabIndex = 3
Tag = "4020"
Top = 600
Width = 1095
End
Begin VB.CommandButton cmdOK
Caption = "&OK"
Default = -1 'True
Height = 375
Left = 3360
TabIndex = 2
Tag = "4010"
Top = 120
Width = 1095
End
Begin VB.Label lblHiddenButtonClickStatus
Caption = "-1"
Height = 255
Left = 3480
TabIndex = 6
Top = 1680
Visible = 0 'False
Width = 855
End
Begin VB.Label lblInstructions
Caption = "Directions."
Height = 1215
Left = 120
TabIndex = 0
Top = 120
Width = 3015
End
End
Attribute VB_Name = "frmChangeValue"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdCancel_Click()
lblHiddenButtonClickStatus = BUTTON_CANCEL
frmChangeValue.Hide
End Sub
Private Sub cmdOK_Click()
lblHiddenButtonClickStatus = BUTTON_OK
frmChangeValue.Hide
End Sub
Private Sub cmdReset_Click()
lblHiddenButtonClickStatus = BUTTON_RESET
frmChangeValue.Hide
End Sub
Private Sub Form_Activate()
' Put window in center of screen
SizeAndCenterWindow Me, cWindowExactCenter, 4600, 2400
If txtValue.Visible = True Then
With txtValue
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
Else
With rtfValue
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End With
End If
End Sub
Private Sub Form_Load()
Me.Caption = LookupLanguageCaption(8200, "Change Value")
CmdOK.Caption = LookupLanguageCaption(4010, "&Ok")
cmdCancel.Caption = LookupLanguageCaption(4020, "&Cancel")
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
QueryUnloadFormHandler Me, Cancel, UnloadMode
End Sub
Private Sub rtfValue_Change()
Dim saveloc As Integer
saveloc = rtfValue.SelStart
rtfValue.TextRTF = objMwtWin.TextToRTF(rtfValue.Text)
rtfValue.SelStart = saveloc
End Sub