Jump to content
Fitty

[RST] Hex Converter on-air

Recommended Posts

Dedicatie speciala pentru unu_1234567, SQL Master Kabron, pentru daemien, Mihaita 007m si Benjamin Loppa. Sper sa va fie utila.

Link download : http://www.sharemobile.ro/download.php?id=364382

Sursa [c0ded in VB6, no need for .net]


'variabile...
Dim i, lenghtu As Integer
Dim letter, textu As String
'setam un 0x in textboxul in care va aparea hexul
Private Sub Form_Load()
hexbox.Text = "0x"
End Sub

'blocam anumite caractere pe baza de cod ascii
Private Sub textbox_KeyPress(KeyAscii As Integer)
If (KeyAscii > 0 And KeyAscii < 8) Or (KeyAscii > 8 And KeyAscii < 32) Then
KeyAscii = 0
End If
End Sub

'impartim stringul char by char, daca acesta s-a modificat, se reia toata treaba
Private Sub textbox_Change()
hexbox.Text = "0x"
textu = textbox.Text
lenghtu = Len(textu)
i = 1
For i = 1 To lenghtu
letter = Mid$(textu, i, 1)
hexbox.Text = LCase(hexbox.Text + Hex(Asc(letter)))
Next
End Sub

'asta e pt butonul clear, reseteaza text box-urile
Private Sub cleatbut_Click()
textbox.SetFocus
textbox.Text = ""
hexbox.Text = "0x"
End Sub
##### c0ded by Fitty ##########

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...