I need to be able to change the text within the labels to a desired character. I can not use the password character, because the character is not consistant. It must also be able to ignore the spaces withing the label.
Dim rex As New System.Text.RegularExpressions.Regex("[^ ]")
lblMylabel.Text = rex.Replace(lblMylabel.Text, "x")
The expression "[^ ]" matches any non-blank character. Rex.Replace scans the given string and replaces any matching string with the second string so basically it says replace any non-blank character with an x.
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Dim OrigStr As String = "Test1 Test2 Test3"
Dim MaskStr As String = "xdfeotjdwps"
Dim OrigSplit() As String = OrigStr.Split()
For I = 0 To OrigSplit.Length - 1
OrigSplit(I) = Space(OrigSplit(I).Length).Replace(" ", MaskStr(I))
Label2.Text = Join(OrigSplit)
'Using Caesar Cipher
Label1.Text = CaesarCipher(OrigStr, "Test123")
Private Function CaesarCipher(Input As String, KeyStr As String) As String
Dim Key As Integer = 0
For Each c As Char In KeyStr
Key += Asc(c)
Dim Result As String = ""
If Key > 93 Then Math.DivRem(Key, 93, Key)
For Each c As Char In Input
If c <> " " Then
Dim offset As Integer = Key + Asc(c)
If offset > 125 Then offset = (offset - 125) + 32
Result += Chr(offset)
Result += c
I Developed application in C# with crystal reports and created setup file in third party (Advance) Installer.When i installed my application on client system application is working but ...