If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: Hex Viewer / Editor

As for searching multiple pages, I seem to recall that what I did was to simply move the ScrollBar. The scroll event fired and did the rest.

Problem here is that i only read 1K of the file at a time.. (what you see on the form is whats loaded into the byte array) in order to try and keep away from the 'Out of memory error' you picked up previously. Although that was mostly because of the memory used by the 1024 textbox's

So i will need to read the next block (and maybe include the last 100 bytes of the previous block) and search again..

Originally Posted by WizBang

For pasting past the end of the page, the first thing that comes to mind is to require the data be written to file, then it will already be there when scrolling. Binary mode doesn't set the EOF marker, so that's no problem. Optionally I suppose you could use a temp file. Other things will likely come to mind after I click submit

Or after you logout..

The thing here again is the 1K block of loaded data.. File additions will be in steps of 1K (Or 512 bytes if used in narrow mode) Also setting a new EOF earlier in the file (Cutting a file shorter) cannot work with out using a new temp file... But i'm not to sure if i need to go in that direction ??

Originally Posted by WizBang

Checking for an image file header **shouldn't** be too difficult. I think I ran into a code snippet on PSC for detecting a number of header types, though it's probably gonna need some tweaks too.

On my way there now...

Thanks for your Valuable input Wizbang.. Your enthusiasm (<--- I know, my spelling is bad, But CG doen not have a 'F7' function,, Spellchecker ) with this little progect of mine has made it worth my while to write, when compleate I'm contemplating posting it on PSC.. So it can help 100's of others.. (Ahh CG users will have first option though)

Re: Hex Viewer / Editor

Originally Posted by GremlinSA

Problem here is that i only read 1K of the file at a time.. (what you see on the form is whats loaded into the byte array)...
So i will need to read the next block (and maybe include the last 100 bytes of the previous block) and search again..

I understand that, but mine also loaded in small blocks (I think it was 2k) to avoid overloading the textbox. Moving the position shouldn't be a problem. As it was a quick thing, I didn't bother to overlap the read, but you're correct on that. One thought is to load more than you display. Just don't load it all into the box at once.

Loading more than 1k would solve the pasting past the end of the box issue 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?

Re: Hex Viewer / Editor

Originally Posted by WizBang

I understand that, but mine also loaded in small blocks (I think it was 2k) to avoid overloading the textbox. Moving the position shouldn't be a problem. As it was a quick thing, I didn't bother to overlap the read, but you're correct on that. One thought is to load more than you display. Just don't load it all into the box at once.

Loading more than 1k would solve the pasting past the end of the box issue too

Thanks.. I think that after spending so much time if front of the same code, i must have developed 'Coders Block' . after a bit of CG, A quick trip to the store for something to drink and smokes. I think i'm ready to continue..

Also i found this code snip on PSC, I think i may just be able to use this to pick out even the embeded files.. (Bmp or Gif embeded in a binary file, etc.)

Re: Hex Viewer / Editor

For pasting past the end of the page, the first thing that comes to mind is to require the data be written to file, then it will already be there when scrolling. Fixed Up

Checking for an image file header **shouldn't** be too difficult. I think I ran into a code snippet on PSC for detecting a number of header types, though it's probably gonna need some tweaks too.Implemented

Okay i know it gets a bit fustrating when updates apears so quickly one after the other.. but this is not just surface updates, Its some what of majour surgery.. The search works 99% (Even added a search for next). Popup Paste now can paste text of any size (tested with a 18K clipboard). Ctrl + C calls the popup paste.. Auto File writing, added to the options menu..

Re: Hex Viewer / Editor

Originally Posted by WizBang

Two bugs found:

1) Using the logical edit doesn't enable the "Functions" menu. FixedThis actully was not done in any of the popups..
2) Typing non-numeric characters into the logical edit window textbox raises an error. Fixed

Thanks for those .. I missed them.. Testing your own code you sometimes forget to check these things..

Also .. If the file open Failed (Running exe or locked File) the editor kicked in with a blank form.. Fixed this problem too...

Made a few other minour changes and fixes. Corrected the Application Caption, and added the open file name to it. Made default buttons on the Entry forms..

Sorted out the Tabindex order into a logical Tab order..

It runs pretty nicely now... (although i still would like to speed up some of the editing code... )

AND.... This zip is a bit smaller because the code is quite a bit shorter using Clng, Cbyte and Cint .. Thanks for pointing me to that... I never knew that Val (And the others) translate Hex vals so easily... ( Well I never tried with "&H" prefix) ...

Enjoy...

Gremmy..

PS.. next on my list of incomplete Projects is the IPLink App i posted Here ... But i will start a new thread for that one... when this one is done...

a Little Nip and tuck on some code here and there...

----- NEW File on later post... -------

Last edited by GremlinSA; January 17th, 2006 at 05:58 PM.
Reason: Newer File on later post...

I didn't look at why more than 32 bits would need to be supported, but if it does you can return a Currency type. I've also used a string to prevent overflow when the number might get huge. It just depends on how you end up using it.

Last edited by WizBang; January 17th, 2006 at 05:47 AM.
Reason: typo

Please remember to rate the posts and threads that you find useful.How can something be both new and improved at the same time?

Re: Hex Viewer / Editor

Nice to see an update on this

I actually hadn't gotten to look at the last one I downloaded, but I just took a quick glance at this one. I did see a few things, but as usual, my coding style is so different from most others that I find it difficult to follow. I'm not at this moment sure what the usage is for all those binary/hex/decade functions. Maybe you can point some out for us/me? The ones I looked into seem to rely on each other in a maze of confusion...or I'm just lost...lol

This eliminates the extra If...Then, which I'm sure must be faster. You can alternatively use Do While. The returned type of the function is also undefined, which means a Variant. That's gonna slow things down too, but I know it's just an oversight.

Also found two bugs:
1) If you click File >> Open... but cancel, the file you are looking at is no longer "enabled", and you have to open it again.
2) The scrollbar (nice feature I've been waiting for) always seems to scroll past the end of the file until the valid part goes off the screen. Is that on purpose for some reason?

I'll try to take a more in-depth look a bit later...keep up the good work!

Please remember to rate the posts and threads that you find useful.How can something be both new and improved at the same time?