|
-
February 3rd, 2006, 06:51 AM
#33
Re: Hex Viewer / Editor
 Originally Posted by GremlinSA
For the scroller i need to be able to Convert the scrollers Integer to a Long, unless theres a sroller with Long variables.. it's the only method i can think of.. (PS. i checked my Dos Hex editor (Norton's DE) and they use a multiplier in much the same way as i proposed..)
Like I posted earlier, you can just use a Long variable. No mystery involved.
Here's the way I edited the code when I was in Debug:
Code:
Private Sub Next_Block()
If File_Change Then Write_Data (File_Pos)
File_Pos = File_Pos + Tot_Count
If File_Pos > (CLng(Scroll_Pos.Max) * 16) Then
File_Pos = (CLng(Scroll_Pos.Max) * 16)
End If
Read_Data File_Pos
End Sub
However, it would be more efficiant to use a Long. Either declare one form-wide, or in the subs that need it, like this:
Code:
Private Sub Next_Block()
If File_Change Then Write_Data (File_Pos)
Dim I As Long
I = Scroll_Pos.Max
File_Pos = File_Pos + Tot_Count
If File_Pos > I * 16 Then
File_Pos = I * 16
End If
Read_Data File_Pos
End Sub
That's all there is to it, though the Next_Search_Block sub needs the fix too.
Please remember to rate the posts and threads that you find useful.
How can something be both new and improved at the same time?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|