Find all our projects in development below.
All source code is GNU General Public License (GPL)
Browsing EditAAForm.frm (3.65 KB)
VERSION 5.00
Begin VB.Form EditAAForm
BorderStyle = 3 'Fixed Dialog
Caption = "(Caption)"
ClientHeight = 1455
ClientLeft = 45
ClientTop = 330
ClientWidth = 4095
ClipControls = 0 'False
Icon = "EditAAForm.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1455
ScaleWidth = 4095
ShowInTaskbar = 0 'False
StartUpPosition = 1 'CenterOwner
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "Cancel"
Height = 375
Left = 2880
TabIndex = 5
Top = 960
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "OK"
Default = -1 'True
Enabled = 0 'False
Height = 375
Left = 1680
TabIndex = 4
Top = 960
Width = 1095
End
Begin VB.TextBox Text2
Height = 315
Left = 1320
MaxLength = 50
TabIndex = 3
Top = 480
Width = 2655
End
Begin VB.TextBox Text1
Height = 315
Left = 1320
MaxLength = 50
TabIndex = 1
Top = 120
Width = 2655
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
Caption = "Recipient &Alias:"
Height = 255
Left = 120
TabIndex = 2
Top = 540
Width = 1095
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "&Recipient:"
Height = 255
Left = 120
TabIndex = 0
Top = 180
Width = 1095
End
End
Attribute VB_Name = "EditAAForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim UpdateType As Integer
Sub Settings(ByVal nUpdateType As Integer)
UpdateType = nUpdateType
Select Case UpdateType
Case 0
Caption = "Add AutoAlias"
Case 1
Caption = "Edit AutoAlias"
End Select
End Sub
Private Sub Command1_Click()
Dim LI As Object
Select Case UpdateType
Case 0
Set LI = AutoAliasForm.ListView1.ListItems.Add()
LI.Text = UCase(Text1.Text)
LI.SubItems(1) = UCase(Text2.Text)
Set LI = Nothing
AutoAliasForm.EnableControls True
Case 1
With AutoAliasForm.ListView1.SelectedItem
.Text = UCase(Text1.Text)
.SubItems(1) = UCase(Text2.Text)
End With
End Select
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Text1_Change()
If Text1.Text <> "" And Text2.Text <> "" Then
Command1.Enabled = True
Else
Command1.Enabled = False
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
Private Sub Text2_Change()
If Text1.Text <> "" And Text2.Text <> "" Then
Command1.Enabled = True
Else
Command1.Enabled = False
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub