Question Hexeditor control

haseena

Member
Joined
Feb 3, 2016
Messages
9
Programming Experience
Beginner
Ma'm/ Sir,
Any one have idea about the control used in the hexeditor window for showing hex value corresponding to each byte and corresponding ASCII value.
Kindly help me by giving suggestions/code for that
 
Um, a TextBox maybe. You can use Convert.ToByte to convert a hexadecimal String to a Byte and the ToString method of a Byte to convert it to a hexadecimal String.

Sir
I have converted Binary data into hexadecimal value and displayed it in a text box. Now i need to display corresponding ascii values.
 
hexeditor window for showing hex value
Are you look for a hex editor or hex viewer control? Have you tried to search for existing ones? For example:
.net hex editor control - Google-search
.net hex viewer control - Google-search

Some recommendations here both for editor and viewer: c# - Recommendations for a Hex Viewer Control for Windows.Forms? - Stack Overflow
For viewer I liked the fact that it exist in .Net framework in form of ByteViewer control in System.Design assembly, didn't know that before.
 
Sir

I tried with this code below , error showing Byte Viewer not found.Kindly help me
ByteViewer bv = new ByteViewer();
bv.SetFile(@"c:\windows\notepad.exe"); // or SetBytes
Controls.Add(bv);
 
Page I linked to explain you have to add reference to System.Design assembly and import the namespace for that control. You have to compile your project for full framework (not client profile) to be able to reference the Design assembly.
 
Wpf Hexeditor is a powerful and fully customisable user control for editing file or stream as hexadecimal, decimal and binary.

You can use it very easily in Wpf or WinForm application. Download the code and test the Wpf (C#, VB.NET) and WinForm (C#) samples.

abbaye/WpfHexEditorControl

<!-- XAML -->
<Control:HexaEditor/>
<Control:HexaEditor Width="NaN" Height="NaN"/>
<Control:HexaEditor Width="Auto" Height="Auto"/>
<Control:HexaEditor FileName={Binding FileNamePath} Width="Auto" Height="Auto"/>

Sample11-NOTBL.png
 
Back
Top Bottom