![]() |
|
[.NET] Binary to Text To Binary Converter - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Binary to Text To Binary Converter (/showthread.php?tid=3810223) |
Binary to Text To Binary Converter - chinmoy2013 - Oct 17, 2013 Hello, Brothers and Sisters Of Pakistan and India and all around!! Today I am Going to share you mah VB Project !! Binary To Text To Binary Converter!! Well, it took me 3 Days to code!! but still m giving it for free.. Here Is The ScreenShot : D4ng3r Is Mah Progamming code Name [img]http://oi43.[censored].com/syb9c6.jpg[/img] Here Is The Source Code : Code: Public Class Form1 Dim x, y As Integer Dim newpoint As New Point Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown x = Control.MousePosition.X - Me.Location.X y = Control.MousePosition.Y - Me.Location.Y End Sub Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove If e.Button = Windows.Forms.MouseButtons.Left Then newpoint = Control.MousePosition newpoint.X = x newpoint.Y = y Me.Location = newpoint Application.DoEvents() End If End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Val As String = Nothing Dim Result As New System.Text.StringBuilder For Each Character As Byte In System.Text.ASCIIEncoding.ASCII.GetBytes(TextBox1.Text) Result.Append(Convert.ToString(Character, 2).PadLeft(8, "0")) Result.Append(" ") Next Val = Result.ToString.Substring(0, Result.ToString.Length - 1) TextBox2.Text = Val End Sub Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click End End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim Val As String = Nothing Dim Characters As String = System.Text.RegularExpressions.Regex.Replace(TextBox1.Text, "[^01]", "") Dim ByteArray((Characters.Length / 8) - 1) As Byte For Index As Integer = 0 To ByteArray.Length - 1 ByteArray(Index) = Convert.ToByte(Characters.Substring(Index * 8, 8), 2) Next Val = System.Text.ASCIIEncoding.ASCII.GetString(ByteArray) TextBox2.Text = Val End Sub End Class This is mah first post.. so do comment me.. Here is the whole project : http://www.mediafire.com/?g5fqfbsufixjq0...bsufixjq02 Do add me @ fb : http://fb.com/cpb2013 Thanks !!!! * - LijpeMD - Oct 17, 2013 Well, it took me 3 Days to code!! but still m giving it for free.. Well, it took me 3 Days to code!! 3 Days to code!! 3 Days. * - Meerkat. - Oct 17, 2013 Quote:Well, it took me 3 Days to code! [img]http://i.qkme.me/3u0jqj.jpg[/img] By the way, it's always good practice to rename your controls and forms to meaningful names. Also, place code in code tags. * - chinmoy2013 - Oct 17, 2013 lOl.. :D :D :D m new to post this in forumm .. |