A hexeditor/viewer is another commonly needed component. Here is one I have been using for a number of years now.
![Name: screenshot.jpg
Views: 93
Size: 89.9 KB]()
The core of this one was taken from a standalone hexeditor written by Rang3r and released on psc in 2001
http://www.Planet-Source-Code.com/vb...34729&lngWId=1
It has been converted into an OCX and includes common functions such as load from string/bytearray/file,
ability to copy hexcodes, search, and extract strings. It also has good performance on large files.
The ocx also includes a public class so you can launch a hexeditor on its own form without having to host it
on a dedicated form of your own.
Any updates will be in the git repo here:
https://github.com/dzzie/hexed
public methods:
The core of this one was taken from a standalone hexeditor written by Rang3r and released on psc in 2001
http://www.Planet-Source-Code.com/vb...34729&lngWId=1
It has been converted into an OCX and includes common functions such as load from string/bytearray/file,
ability to copy hexcodes, search, and extract strings. It also has good performance on large files.
The ocx also includes a public class so you can launch a hexeditor on its own form without having to host it
on a dedicated form of your own.
Any updates will be in the git repo here:
https://github.com/dzzie/hexed
public methods:
Code:
Property BookMarks() As Collection
Public Property hWndAscii() As Long
Public Property hWndCanvas() As Long
Public Property hwnd() As Long
Public Property AsciiBGColor() As Long
Public Property HexBGColor() As Long
Public Property MarginBGColor() As Long
Public Property MarginColor() As Long
Public Property AsciiColor() As Long
Public Property EvenColor() As Long
Public Property OddColor() As Long
Public Property ModColor() As Long
Public Property Font() As StdFont
Public Property IsDirty() As Boolean
Public Property DataLength() As Long
Public Property SelLength() As Long
Public Property SelStart() As Long
Public Property SelTextAsHexCodes(Optional prefix As String = Empty) As String
Public Property SelText() As String
Public Property Columns() As Long
Property ReadChunkSize() As Long
Property LoadedFile() As String
Property VisibleLines() As Long
Property CurrentPosition() As Long
Public Sub GotoNextBookmark()
Public Sub ToggleBookmark(ByVal Pos As Long)
Public Sub ShowBookMarks()
Public Function FileSize() As Long
Public Function GetDataChunk(ByVal Pos As Long) As String
Public Function GetData(ByVal Pos As Long) As Byte
Public Sub Scroll(ByVal Amount As Long)
Public Sub Save()
Public Sub SaveAs(Optional fpath As String = Empty, Optional defaultfName As String)
Public Sub FullView()
Public Sub HexView()
Public Sub AsciiView()
Public Function LoadFile(fpath As String, Optional ViewOnly As Boolean = True) As Boolean
Function FileExists(path As String) As Boolean
Function FolderExists(path As String) As Boolean
Public Function LoadByteArray(bArray As Variant, Optional ViewOnly As Boolean = True) As Boolean
Public Function LoadString(data As String, Optional ViewOnly As Boolean = True) As Boolean
Public Sub DeleteData(ByVal Pos As Long, ByVal length As Long)
Public Sub OverWriteData(ByVal Pos As Long, data() As Byte)
Public Sub InsertData(ByVal Pos As Long, data() As Byte)
Public Sub ShowInsert()
Public Sub CopyData(ByVal Pos As Long, ByVal length As Long)
Public Sub DoUndo()
Public Sub Refresh()
Public Sub DoCut()
Public Function Strings(Optional minLen As Long = 7, Optional unicode As Boolean = False) As String()
Public Sub SelectAll()
Public Sub DoPaste()
Public Sub DoPasteOver()
Public Sub DoDelete()
Public Sub DoCopy()
Public Sub ShowGoto()
Public Sub scrollTo(ByVal Pos As Long)
Public Sub ShowFind()
Public Function Search(match As String, Optional isUnicode As Boolean = False, Optional caseSensitive As Boolean = False) As String()
Public Function ShowHelp()
Public Function ShowAbout()
Public Function ShowOpen(Optional initDir As String, Optional ViewOnly As Boolean = False) As Boolean