Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

had to add saveAs, AdjustBaseOffset for display of memory loads, bina…

…ry compatiability reset...
  • Loading branch information...
commit 971e2853787338b39cfeddfa65dbcf5ae88ff8af 1 parent 611b881
unknown authored
6 CBasicEditor.cls
View
@@ -6,15 +6,15 @@ BEGIN
DataSourceBehavior = 0 'vbNone
MTSTransactionMode = 0 'NotAnMTSObject
END
-Attribute VB_Name = "CBasicEditor"
+Attribute VB_Name = "CHexEditor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Private myForm As frmEditor
-Function GetEditor() As HexEd
- Set GetEditor = myForm.HexEditor
+Function Editor() As HexEd
+ Set Editor = myForm.HexEditor
End Function
'Public Function LoadFile(fpath As String, Optional ViewOnly As Boolean = True) As Boolean
88 File.cls
View
@@ -22,10 +22,12 @@ Private Chunk1 As Chunk
Private Chunk2 As Chunk
Private ReSized As Boolean
Public size As Long
-Private isMemLoad As Boolean
+Public isMemLoad As Boolean
-Public Property Get Filename() As String
- Filename = mFilename
+Public owner As HexEd
+
+Public Property Get filename() As String
+ filename = mFilename
End Property
Private Sub Class_Initialize()
@@ -78,13 +80,13 @@ Public Sub LoadFromMemory(bArray As Variant)
End Sub
-Public Sub Load(Filename As String)
+Public Sub Load(filename As String)
Dim FileSize As Long
Dim NumChunks As Long
Dim Chunk As Chunk
Dim i As Long
- FileSize = FileLen(Filename)
+ FileSize = FileLen(filename)
If FileSize < 1 Then
MsgBox "File is zero length"
Exit Sub
@@ -93,7 +95,7 @@ Public Sub Load(Filename As String)
Exit Sub
End If
- mFilename = Filename
+ mFilename = filename
isMemLoad = False
size = FileSize - 1
@@ -101,7 +103,7 @@ Public Sub Load(Filename As String)
ReDim Chunks(1 To NumChunks)
For i = 0 To NumChunks - 1
Set Chunk = New Chunk
- Chunk.Filename = mFilename
+ Chunk.filename = mFilename
Chunk.offset = i * ChunkSize
Chunk.size = ChunkSize
Chunk.Index = i + 1
@@ -113,7 +115,7 @@ Public Sub Load(Filename As String)
ReSized = False
End Sub
-Public Sub ActivateChunk(pos As Long)
+Public Sub ActivateChunk(Pos As Long)
Dim Chunk As Chunk
Dim i As Long
'bailout if not loaded
@@ -121,7 +123,7 @@ Public Sub ActivateChunk(pos As Long)
If Not Chunk1 Is Nothing Then
- If pos >= Chunk1.offset And pos <= Chunk1.size + Chunk1.offset - 1 Then
+ If Pos >= Chunk1.offset And Pos <= Chunk1.size + Chunk1.offset - 1 Then
'chunk already loaded
Exit Sub
End If
@@ -130,7 +132,7 @@ Public Sub ActivateChunk(pos As Long)
Dim Current As Long
- Current = GetChunkFromPos(pos)
+ Current = GetChunkFromPos(Pos)
Set Chunk1 = Chunks(Current)
Chunk1.Load
If Current < UBound(Chunks) Then
@@ -141,7 +143,7 @@ Public Sub ActivateChunk(pos As Long)
End If
End Sub
-Private Function GetChunkFromPos(ByVal pos As Long) As Long
+Private Function GetChunkFromPos(ByVal Pos As Long) As Long
Dim Upper As Long
Dim Lower As Long
Dim Current As Long
@@ -155,11 +157,11 @@ Private Function GetChunkFromPos(ByVal pos As Long) As Long
Do While Not hit And Upper >= Lower
Current = Int((Upper + Lower) / 2)
Set Chunk = Chunks(Current)
- If pos >= Chunk.offset And pos <= Chunk.offset + Chunk.size Then
+ If Pos >= Chunk.offset And Pos <= Chunk.offset + Chunk.size Then
hit = True
GetChunkFromPos = Current 'return pos
Exit Function
- ElseIf pos > Chunk.offset + Chunk.size Then
+ ElseIf Pos > Chunk.offset + Chunk.size Then
Lower = Current + 1
Else
Upper = Current - 1
@@ -367,12 +369,62 @@ Private Sub FixOffsets()
Next
End Sub
+Public Sub SaveAs(Optional fpath As String, Optional defaultfName As String)
+
+ On Error GoTo hell
+
+ Dim f As Long
+ Dim dlg As clsCmnDlg2
+ Dim b() As Byte
+ Dim i As Long
+
+ If Len(fpath) = 0 Then
+ 'If Len(fName) = 0 Then fName = "data.bin"
+ Set dlg = New clsCmnDlg2
+ fpath = dlg.SaveDialog(AllFiles, , "Save As...", , , defaultfName)
+ Set dlg = Nothing
+ End If
+
+ If Len(fpath) = 0 Then Exit Sub
+
+ If isMemLoad Then
+ If Chunk1 Is Nothing Then Exit Sub
+ f = FreeFile
+ b() = Chunk1.GetDataBytes()
+ Open fpath For Binary As f
+ Put f, , b()
+ Close f
+ mFilename = fpath
+ Chunk1.filename = fpath
+ owner.LoadedFile = fpath
+ Else
+ If FileExists(fpath) Then Kill fpath
+ FileSystem.FileCopy Me.filename, fpath
+ mFilename = fpath
+ owner.LoadedFile = fpath
+ For i = 1 To UBound(Chunks)
+ Chunks(i).filename = fpath
+ Next
+ Save
+ End If
+
+Exit Sub
+hell:
+ MsgBox "Error in SaveAs: " & Err.Description
+
+End Sub
+
+
Public Sub Save()
- If ReSized Then
+
+ If isMemLoad Then
+ SaveAs Empty
+ ElseIf ReSized Then
Call SaveReSized
Else
Call SaveNormal
End If
+
End Sub
Private Sub SaveNormal()
@@ -388,7 +440,7 @@ Private Sub SaveNormal()
Erase Chunks
Set Chunk1 = Nothing
Set Chunk2 = Nothing
- Me.Load Me.Filename
+ Me.Load Me.filename
'save the file
End Sub
@@ -421,13 +473,13 @@ Private Sub SaveReSized()
Set Chunk1 = Nothing
Set Chunk2 = Nothing
- Kill Me.Filename
+ Kill Me.filename
Err.Clear
- FileSystem.FileCopy NewFilename, Me.Filename
+ FileSystem.FileCopy NewFilename, Me.filename
Kill NewFilename
- Me.Load Me.Filename
+ Me.Load Me.filename
Screen.MousePointer = vbDefault
'save the file
115 UserControl1.ctl
View
@@ -131,6 +131,9 @@ Begin VB.UserControl HexEd
Begin VB.Menu mnuPopup
Caption = "mnuPopup"
Visible = 0 'False
+ Begin VB.Menu mnuSaveAs
+ Caption = "Save As"
+ End
Begin VB.Menu mnuCopy2
Caption = "Copy (Ctrl+C)"
End
@@ -219,15 +222,20 @@ Private KeyCount As Long
Public ReadOnly As Boolean
Public ForceMemOnlyLoading As Boolean
Public UseDefaultRightClickMenu As Boolean
+Public AdjustBaseOffset As Long
'-------------------
Public Event Dirty()
Public Event RightClick()
Public Event Loaded()
-
+Public Event Saved()
Private mLoadedFile As String
+Friend Property Let LoadedFile(v As String)
+ mLoadedFile = v
+End Property
+
Property Get LoadedFile() As String
LoadedFile = mLoadedFile
End Property
@@ -313,7 +321,7 @@ End Sub
-Private Sub Ascii_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
+Private Sub Ascii_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim Pos As Long
Dim xx As Long
Dim yy As Long
@@ -324,7 +332,7 @@ Private Sub Ascii_MouseDown(Button As Integer, Shift As Integer, x As Single, Y
x = x + mAsciiOffset * mAsciiWidth
xx = (x - mAsciiWidth - 3) / mAsciiWidth
- yy = (Y - mLineHeight / 3) / mLineHeight
+ yy = (y - mLineHeight / 3) / mLineHeight
If xx < 0 Then xx = 0
If yy < 0 Then yy = 0
@@ -346,17 +354,17 @@ Private Sub Ascii_MouseDown(Button As Integer, Shift As Integer, x As Single, Y
draw
End Sub
-Private Sub Ascii_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)
+Private Sub Ascii_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim Pos As Long
Dim xx As Long
Dim yy As Long
If Not mAutoScroll Then Exit Sub
- If Y < 0 Then
+ If y < 0 Then
mDirection = -1 'up
If Not mScrolling Then Call DoAutoscroll: Exit Sub
- ElseIf Y > Ascii.ScaleHeight Then
+ ElseIf y > Ascii.ScaleHeight Then
mDirection = 1 'down
If Not mScrolling Then Call DoAutoscroll: Exit Sub
Else
@@ -366,7 +374,7 @@ Private Sub Ascii_MouseMove(Button As Integer, Shift As Integer, x As Single, Y
x = x + mAsciiOffset * mAsciiWidth
xx = (x - mAsciiWidth - 3) / mAsciiWidth
- yy = (Y - mLineHeight / 3) / mLineHeight
+ yy = (y - mLineHeight / 3) / mLineHeight
If xx < 0 Then xx = 0
If yy < 0 Then yy = 0
@@ -406,7 +414,7 @@ Private Sub ScrollUp()
End Sub
-Private Sub Ascii_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
+Private Sub Ascii_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
mAutoScroll = False
mScrolling = False
@@ -528,7 +536,7 @@ Private Sub Ascii_KeyPress(KeyAscii As Integer)
End Sub
-Private Sub Canvas_MouseDown(Button As Integer, Shift As Integer, x As Single, Y As Single)
+Private Sub Canvas_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim Pos As Long
Dim xx As Long
@@ -541,7 +549,7 @@ Private Sub Canvas_MouseDown(Button As Integer, Shift As Integer, x As Single, Y
xx = (x - mHexWidth / 2) / mHexWidth
'xx = (x - mHexWidth / 2) / mHexWidth
- yy = (Y - mLineHeight / 3) / mLineHeight
+ yy = (y - mLineHeight / 3) / mLineHeight
If xx < 0 Then xx = 0
If yy < 0 Then yy = 0
@@ -564,7 +572,7 @@ Private Sub Canvas_MouseDown(Button As Integer, Shift As Integer, x As Single, Y
draw
End Sub
-Private Sub Canvas_MouseMove(Button As Integer, Shift As Integer, x As Single, Y As Single)
+Private Sub Canvas_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Dim Pos As Long
Dim xx As Long
@@ -573,10 +581,10 @@ Private Sub Canvas_MouseMove(Button As Integer, Shift As Integer, x As Single, Y
If Not mAutoScroll Then Exit Sub
- If Y < 0 Then
+ If y < 0 Then
mDirection = -1 'up
If Not mScrolling Then Call DoAutoscroll: Exit Sub
- ElseIf Y > Canvas.ScaleHeight Then
+ ElseIf y > Canvas.ScaleHeight Then
mDirection = 1 'down
If Not mScrolling Then Call DoAutoscroll: Exit Sub
Else
@@ -587,7 +595,7 @@ Private Sub Canvas_MouseMove(Button As Integer, Shift As Integer, x As Single, Y
'xx = x / mHexWidth
xx = (x - mHexWidth / 4) / mHexWidth
- yy = (Y - mLineHeight / 3) / mLineHeight
+ yy = (y - mLineHeight / 3) / mLineHeight
If xx < 0 Then xx = 0
If yy < 0 Then yy = 0
@@ -606,7 +614,7 @@ Private Sub Canvas_MouseMove(Button As Integer, Shift As Integer, x As Single, Y
End Sub
-Private Sub Canvas_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
+Private Sub Canvas_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
mScrolling = False
mAutoScroll = False
@@ -692,6 +700,10 @@ Private Sub mnuHelp2_Click()
Me.ShowHelp
End Sub
+Private Sub mnuSaveAs_Click()
+ Me.SaveAs
+End Sub
+
Private Sub mnuSearch2_Click()
Me.ShowFind
End Sub
@@ -766,7 +778,8 @@ Private Sub UserControl_Initialize()
Set dcAscii = New VirtualDC
Set mFileHandler = New File
-
+ Set mFileHandler.owner = Me
+
dcCanvas.CreateFromPBOX Canvas
dcAscii.CreateFromPBOX Ascii
dcMargin.CreateFromPBOX Margin
@@ -880,7 +893,7 @@ Private Sub DrawNormal()
yPos = i * mLineHeight
- HexLine = Hex(Pos)
+ HexLine = Hex(Pos + AdjustBaseOffset) 'AdjustedBaseOffset is for loading of memory images..
HexLine = String(mLinenumberSize - Len(HexLine), "0") & HexLine
dcMargin.PrintText HexLine, 5, i * mLineHeight, Margin.ScaleWidth, i * mLineHeight + mLineHeight, 0
@@ -1016,7 +1029,7 @@ End Sub
Private Sub DrawCursors()
Dim x As Currency
- Dim Y As Currency
+ Dim y As Currency
Dim xx As Long
Dim Pos As Long
Dim data As String
@@ -1031,21 +1044,21 @@ Private Sub DrawCursors()
If mSelectedPos >= 0 And mSelectedPos <= Me.DataLength + 1 Then
Pos = mSelectedPos - mPos
- GetXYfromPos Pos, x, Y
+ GetXYfromPos Pos, x, y
xx = x * mAsciiWidth - AsciiOffset
x = x * mHexWidth - CanvasOffset
- Y = Y * mLineHeight
- If Y < 0 Then Y = 0
- If Y > Canvas.ScaleHeight Then Y = Canvas.ScaleHeight
+ y = y * mLineHeight
+ If y < 0 Then y = 0
+ If y > Canvas.ScaleHeight Then y = Canvas.ScaleHeight
If Len(data) = 1 Then data = "0" & data
If mEditMode = 0 Then
- dcCanvas.FillArea x + 8 + mSelectedCursorPos * mAsciiWidth, Y, x + 8 + mSelectedCursorPos * mAsciiWidth + 2, Y + mLineHeight, vbBlack
- dcAscii.FillArea xx + 8, Y + mLineHeight - 1, xx + mAsciiWidth + 8, Y + mLineHeight + 1, vbBlack
+ dcCanvas.FillArea x + 8 + mSelectedCursorPos * mAsciiWidth, y, x + 8 + mSelectedCursorPos * mAsciiWidth + 2, y + mLineHeight, vbBlack
+ dcAscii.FillArea xx + 8, y + mLineHeight - 1, xx + mAsciiWidth + 8, y + mLineHeight + 1, vbBlack
Else
- dcCanvas.FillArea x + 8, Y + mLineHeight - 1, x + 8 + 2 * mAsciiWidth + 2, Y + mLineHeight + 1, vbBlack
- dcAscii.FillArea xx + 8, Y - 2, xx + 8 + 2, Y + mLineHeight - 2, vbBlack
+ dcCanvas.FillArea x + 8, y + mLineHeight - 1, x + 8 + 2 * mAsciiWidth + 2, y + mLineHeight + 1, vbBlack
+ dcAscii.FillArea xx + 8, y - 2, xx + 8 + 2, y + mLineHeight - 2, vbBlack
End If
End If
@@ -1053,7 +1066,7 @@ End Sub
Private Sub DrawBookmarks()
Dim x As Currency
- Dim Y As Currency
+ Dim y As Currency
Dim xx As Long
Dim Pos As Long
Dim data As String
@@ -1067,19 +1080,19 @@ Private Sub DrawBookmarks()
For Each bm In mBookmarks
Pos = bm.Pos - mPos 'mSelectedPos - mPos
- GetXYfromPos Pos, x, Y
+ GetXYfromPos Pos, x, y
xx = x * mAsciiWidth - AsciiOffset
x = x * mHexWidth - CanvasOffset
- Y = Y * mLineHeight
- If Y < 0 Then Y = 0
- If Y > Canvas.ScaleHeight Then Y = Canvas.ScaleHeight
+ y = y * mLineHeight
+ If y < 0 Then y = 0
+ If y > Canvas.ScaleHeight Then y = Canvas.ScaleHeight
If Len(data) = 1 Then data = "0" & data
- dcCanvas.FillArea x + 4, Y, x + 4 + mHexWidth, Y + mLineHeight, vbBlack
- dcCanvas.FillArea x + 5, Y + 1, x + 3 + mHexWidth, Y + mLineHeight - 1, bm.Color
- dcAscii.FillArea xx + 8, Y, xx + 8 + mAsciiWidth, Y + mLineHeight, bm.Color
+ dcCanvas.FillArea x + 4, y, x + 4 + mHexWidth, y + mLineHeight, vbBlack
+ dcCanvas.FillArea x + 5, y + 1, x + 3 + mHexWidth, y + mLineHeight - 1, bm.Color
+ dcAscii.FillArea xx + 8, y, xx + 8 + mAsciiWidth, y + mLineHeight, bm.Color
Next
@@ -1458,9 +1471,9 @@ Public Sub DoUndo()
End Sub
-Private Sub GetXYfromPos(ByRef Pos, ByRef x As Currency, ByRef Y As Currency)
- Y = Pos \ Columns
- x = Pos - Columns * Y
+Private Sub GetXYfromPos(ByRef Pos, ByRef x As Currency, ByRef y As Currency)
+ y = Pos \ Columns
+ x = Pos - Columns * y
End Sub
Public Property Get SelText() As String
@@ -1611,7 +1624,7 @@ End Sub
Public Function LoadString(data As String, Optional ViewOnly As Boolean = True) As Boolean
Dim b() As Byte
b() = StrConv(data, vbFromUnicode, LANG_US)
- LoadString = LoadByteArray(b())
+ LoadString = LoadByteArray(b(), ViewOnly)
End Function
@@ -1652,6 +1665,7 @@ Public Function LoadByteArray(bArray As Variant, Optional ViewOnly As Boolean =
Set mUndoBuffer = New Collection
Set mBookmarks = New Collection
LoadByteArray = True
+ RaiseEvent Loaded
Exit Function
End If
@@ -1662,7 +1676,7 @@ Public Function LoadByteArray(bArray As Variant, Optional ViewOnly As Boolean =
Put f, , b()
Close f
- LoadByteArray = LoadFile(path)
+ LoadByteArray = LoadFile(path, ViewOnly)
If LoadByteArray Then RaiseEvent Loaded
Exit Function
hell:
@@ -1734,16 +1748,33 @@ Public Property Get IsDirty() As Boolean
IsDirty = mIsDirty
End Property
+Public Sub SaveAs(Optional fpath As String = Empty, Optional defaultfName As String)
+
+ If Len(defaultfName) = 0 And Len(LoadedFile) > 0 Then
+ defaultfName = FileNameFromPath(LoadedFile)
+ End If
+
+ mFileHandler.SaveAs fpath, defaultfName
+ mIsDirty = False
+ Call draw
+ ReadOnly = False
+ RaiseEvent Saved
+
+End Sub
+
Public Sub Save()
- If ReadOnly Then
- 'MsgBox "File was opened in readonly mode"
- Exit Sub
+ If Not mFileHandler.isMemLoad Then
+ If ReadOnly Then
+ 'MsgBox "File was opened in readonly mode"
+ Exit Sub
+ End If
End If
mFileHandler.Save
mIsDirty = False
Call draw
+ RaiseEvent Saved
End Sub
19 frmMain.frm
View
@@ -18,8 +18,8 @@ Begin VB.Form frmEditor
TabStop = 0 'False
Top = 0
Width = 8295
- _extentx = 14631
- _extenty = 14420
+ _ExtentX = 14631
+ _ExtentY = 14420
End
Begin VB.Menu mnuFile
Caption = "File"
@@ -29,6 +29,9 @@ Begin VB.Form frmEditor
Begin VB.Menu mnuSave
Caption = "Save (Ctrl+S)"
End
+ Begin VB.Menu mnuSaveAs
+ Caption = "Save As"
+ End
End
Begin VB.Menu mnuEdit
Caption = "Edit"
@@ -148,11 +151,15 @@ Private Sub Form_Resize()
End Sub
Private Sub HexEditor_Dirty()
- 'Me.Caption = Me.title & " *"
+ If Right(Me.Caption, 1) <> "*" Then Me.Caption = Me.Caption & " *"
End Sub
Private Sub HexEditor_Loaded()
- If HexEditor.ReadOnly Then Me.Caption = Me.Caption & " - Read Only"
+ If HexEditor.ReadOnly Then Me.Caption = Me.Caption & " - Read Only - " & HexEditor.LoadedFile
+End Sub
+
+Private Sub HexEditor_Saved()
+ Me.Caption = "Hexeditor 0.3 - " & HexEditor.LoadedFile
End Sub
Private Sub mnuAbout_Click()
@@ -212,6 +219,10 @@ Private Sub mnuSave_Click()
HexEditor.Save
End Sub
+Private Sub mnuSaveAs_Click()
+ HexEditor.SaveAs
+End Sub
+
Private Sub mnuSearch_Click()
HexEditor.ShowFind
End Sub
BIN  hexed.ocx
View
Binary file not shown
19 modShared.bas
View
@@ -2,8 +2,8 @@ Attribute VB_Name = "modShared"
Option Explicit
Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long
-Private Declare Sub SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal _
- hWndInsertAfter As Long, ByVal x As Long, ByVal Y As Long, ByVal cx _
+Private Declare Sub SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal _
+ hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx _
As Long, ByVal cy As Long, ByVal wFlags As Long)
Private Const HWND_TOPMOST = -1
@@ -17,9 +17,22 @@ Public ChunkSize As Long
Public Function SetTopMost(f As Form, Optional onTop As Boolean = True)
Dim flag As Long
flag = IIf(onTop, HWND_TOPMOST, HWND_NOTOPMOST)
- SetWindowPos f.hwnd, flag, f.Left / 15, f.Top / 15, f.Width / 15, f.Height / 15, SWP_SHOWWINDOW
+ SetWindowPos f.hWnd, flag, f.Left / 15, f.Top / 15, f.Width / 15, f.Height / 15, SWP_SHOWWINDOW
End Function
+Public Function FileExists(path) As Boolean
+ If Len(path) = 0 Then Exit Function
+ If Dir(path, vbHidden Or vbNormal Or vbReadOnly Or vbSystem) <> "" Then FileExists = True
+End Function
+
+Public Function FileNameFromPath(fullpath As String) As String
+ On Error Resume Next
+ Dim tmp() As String
+ If InStr(fullpath, "\") > 0 Then
+ tmp = Split(fullpath, "\")
+ FileNameFromPath = CStr(tmp(UBound(tmp)))
+ End If
+End Function
Public Function GetTmpPath()
Dim strFolder As String
11 test/frmTest.frm
View
@@ -1,5 +1,5 @@
VERSION 5.00
-Object = "{71532E87-B06E-431D-AC3A-686170A406ED}#2.1#0"; "hexed.ocx"
+Object = "{71532E87-B06E-431D-AC3A-686170A406ED}#7.0#0"; "hexed.ocx"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 7380
@@ -34,13 +34,12 @@ Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
- Dim edit As New CBasicEditor
+ Dim edit As New CHexEditor
- edit.GetEditor.LoadFile "c:\_jbig2.data", True
+ 'edit.GetEditor.LoadFile "c:\_jbig2.data", False
+ edit.Editor.AdjustBaseOffset = &H401000
+ edit.Editor.LoadString String(1000, "A"), True
End Sub
-Private Sub Form_Load()
- HexEd1.ReadOnly = True
-End Sub
2  test/test.vbp
View
@@ -1,7 +1,7 @@
Type=Exe
Form=frmTest.frm
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\system32\stdole2.tlb#OLE Automation
-Object={71532E87-B06E-431D-AC3A-686170A406ED}#3.0#0; hexed.ocx
+Object={71532E87-B06E-431D-AC3A-686170A406ED}#7.0#0; hexed.ocx
IconForm="Form1"
Startup="Form1"
Command32=""
2  test/test.vbw
View
@@ -1 +1 @@
-Form1 = 44, 44, 726, 449, , 22, 22, 880, 600, C
+Form1 = 44, 44, 726, 449, Z, 22, 22, 880, 600, C
Please sign in to comment.
Something went wrong with that request. Please try again.