Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Jigsy1 authored Sep 1, 2022
1 parent 81b2b33 commit 92fe551
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 32 deletions.
Binary file modified VB6/UUID2.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions VB6/UUID2.vbp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Type=Exe
Form=frmUUID2.frm
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\WINXP\system32\stdole2.tlb#OLE Automation
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\WINXP\system32\stdole2.tlb#OLE Automation
IconForm="frmUUID2"
Startup="frmUUID2"
HelpFile=""
Expand All @@ -12,7 +12,7 @@ HelpContextID="0"
CompatibleMode="0"
MajorVer=1
MinorVer=0
RevisionVer=3
RevisionVer=4
AutoIncrementVer=0
ServerSupportFiles=0
VersionCompanyName="Jigsy"
Expand Down
2 changes: 1 addition & 1 deletion VB6/UUID2.vbw
Original file line number Diff line number Diff line change
@@ -1 +1 @@
frmUUID2 = 66, 66, 967, 458, Z, 22, 22, 923, 414, C
frmUUID2 = 66, 66, 967, 458, C, 22, 22, 923, 414, C
66 changes: 37 additions & 29 deletions VB6/frmUUID2.frm
Original file line number Diff line number Diff line change
Expand Up @@ -5,68 +5,69 @@ Begin VB.Form frmUUID2
ClientHeight = 1560
ClientLeft = 45
ClientTop = 330
ClientWidth = 8160
ClientWidth = 8385
KeyPreview = -1 'True
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 1560
ScaleWidth = 8160
ScaleWidth = 8385
StartUpPosition = 2 'CenterScreen
Begin VB.Timer tmrAutomatic
Enabled = 0 'False
Interval = 10000
Left = 6000
Left = 6480
Top = 1080
End
Begin VB.Timer tmrNoteClear
Interval = 2000
Left = 5520
Left = 6000
Top = 1080
End
Begin VB.CommandButton cmdClose
Caption = "&Close"
Height = 375
Left = 6840
Left = 6960
TabIndex = 7
Top = 1080
Width = 1215
Width = 1335
End
Begin VB.CommandButton cmdCopy
Caption = "C&opy"
Height = 375
Left = 4200
Left = 4560
TabIndex = 5
Top = 1080
Width = 1215
Width = 1335
End
Begin VB.CommandButton cmdGenerate
Caption = "&Generate"
Height = 375
Left = 2880
Left = 3120
TabIndex = 4
Top = 1080
Width = 1215
Width = 1335
End
Begin VB.Frame fmeSettings
Height = 1335
Left = 120
TabIndex = 8
Top = 120
Width = 2655
Width = 2895
Begin VB.CheckBox chkRandomness
Caption = "Increase randomness"
Caption = "Increased randomness"
Height = 195
Left = 120
TabIndex = 3
Top = 960
Width = 2295
Width = 2655
End
Begin VB.CheckBox chkAutomatic
Caption = "Automatically generate (10s)"
Height = 195
Left = 120
TabIndex = 2
Top = 720
Width = 2415
Width = 2655
End
Begin VB.CheckBox chkBrackets
Caption = "Use {Braces}"
Expand All @@ -75,21 +76,21 @@ Begin VB.Form frmUUID2
TabIndex = 1
Top = 480
Value = 1 'Checked
Width = 2295
Width = 2655
End
Begin VB.CheckBox chkUpper
Caption = "Use Uppercase"
Caption = "Use Uppercase characters (A-Z)"
Height = 195
Left = 120
TabIndex = 0
Top = 240
Value = 1 'Checked
Width = 2295
Width = 2655
End
End
Begin VB.Frame fmeStyle
Height = 735
Left = 2880
Left = 3120
TabIndex = 9
Top = 120
Width = 5175
Expand Down Expand Up @@ -122,10 +123,15 @@ Private Sub cmdClose_Click()
End Sub

Private Sub cmdCopy_Click()
On Error GoTo endCopy
Clipboard.Clear
Clipboard.SetText txtUUID2.Text
Me.Caption = Me.Caption & " - Copied to clipboard"
tmrNoteClear.Enabled = True
Exit Sub

endCopy:
MsgBox "Failed to copy to clipboard.", vbExclamation, "Error"
End Sub

Private Sub cmdGenerate_Click()
Expand All @@ -134,11 +140,8 @@ End Sub

Private Function makeUUID2() As String
Dim baseString As String
If chkUpper.Value = 1 Then
baseString = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Else
baseString = "abcdefghijklmnopqrstuvwxyz"
End If
baseString = "abcdefghijklmnopqrstuvwxyz"
If chkUpper.Value = 1 Then baseString = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
baseString = baseString & "0123456789"
Randomize
Dim loopNumber As Integer, outString As String, randNumber As Integer
Expand Down Expand Up @@ -166,18 +169,23 @@ Private Function makeUUID2() As String
Else
outString = outString & Mid(baseString, Int(Val(1 + Val(Rnd * Len(baseString)))), 1)
End If
If loopNumber = 7 Or loopNumber = 11 Or loopNumber = 15 Or loopNumber = 19 Then
outString = outString & "-"
End If
If loopNumber = 7 Or loopNumber = 11 Or loopNumber = 15 Or loopNumber = 19 Then outString = outString & "-"
Next
If chkBrackets.Value = 1 Then
outString = "{" & outString & "}"
End If
If chkBrackets.Value = 1 Then outString = "{" & outString & "}"
txtUUID2.Text = outString
outString = ""
End Function

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyF5 Then Call makeUUID2
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyEscape Then End
End Sub

Private Sub Form_Load()
Me.Caption = Me.Caption & " v" & App.Major & "." & App.Minor & "." & App.Revision
Me.Tag = Me.Caption
Call makeUUID2
End Sub
Expand Down

0 comments on commit 92fe551

Please sign in to comment.