by Ed Porter (3 Submissions)
Category: Graphics
Compatability: VB Script
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating:
(3 Votes)

'This code is a rewrite for the code that appeared in vbcoders.com
'https://www.vbcoders.com/vb/scripts/showcode.asp?txtCodeId=55153&lngWId=1
'The original code was very poorly written and as a result was painfully slow,
'difficult to use, understand and generally substandard
'Original Programmer : Mahdi Shakouri rad, [email protected]
'Changes:
'1. Use drag/drop on the pictureboxes so that the results can easily be "scrolled"
'onto the screen for analysis. Some times objects will not fit on the available
'real estate - have some respect for your potential user!
'2. Use "beginner" APIs - GetPixel, SetPixel for speed
'3. Place RGB calcs in loops - do not exit loop to an outside subprocedure when
'parsing a bitmap
'4. Use industry standard notation for variables. Precede a string with "s",
'a Long with "l" etc.
'5. Indent and use spacing - this is the most valuable productivity tool that you
'will ever need to learn, so start now!
'6. Use Long variables unless Singles are required. RAM "savings" are no longer
'necessary, but the speed enhancements are!
'7. Develop discipline - Stand out - do not be proud of "lazy" code.
Download Edge Sketch ReWrite (71 KB)