Я только новичок в vb 10, и я создаю программу шифрования vigenere, но я не знаю, как вызвать функцию кнопкой. вот мой код:Как вызвать функцию в кнопке в VB 10
Public Shared Function Encrypt(ByVal cipherTxt As String, ByVal key As String)
Dim encryptedText As String = ""
For i As Integer = 1 To cipherTxt.Length
Dim temp As Integer = AscW(GetChar(cipherTxt, i)) + AscW(GetChar(key, i Mod key.Length + 1))
encryptedText += ChrW(temp)
Next
Return encryptedText
End Function
Public Shared Function Decrypt(ByVal cipherTxt As String, ByVal key As String)
Dim decryptedText As String = ""
For i As Integer = 1 To cipherTxt.Length
Dim temp As Integer = AscW(GetChar(cipherTxt, i)) - AscW(GetChar(key, i Mod key.Length + 1))
decryptedText += ChrW(temp)
Next
Return decryptedText
End Function
Любая помощь? Спасибо.