home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code2 / bmp_kit / bmpkit.txt < prev    next >
Text File  |  1991-10-06  |  2KB  |  50 lines

  1. BMPKIT
  2.  
  3. By George Campbell
  4. CIS ID: 71571,222
  5.  
  6. Don Funk from Microsoft gave me a set of routines for dealing with 
  7. .BMP files from within Visual Basic.
  8.  
  9. Using these routines, with some modifications, lets you scale, 
  10. print, and display bitmaps in VB applications, something not 
  11. included in the internal commands in the language.
  12.  
  13. Here's a demo application which deals with scaling and printing of 
  14. images.
  15.  
  16. Copy the files into either your VBASIC directory, or a directory of 
  17. their own. When working with the source code, you must have the 
  18. RIBBONS.BMP file, a Windows background BMP in your VBASIC 
  19. directory. When running the program as an .EXE, the BMP file must 
  20. be in the directory holding BMPKIT.EXE.
  21.  
  22. A few notes:
  23.  
  24. 1. Experiment with the StretchBlt variables.  You'll find that you 
  25. can not only scale, but also crop, etc.
  26.  
  27. 2. The Picture Box holding the original image of the Bitmap does 
  28. NOT have to be visible, but must be present.
  29.  
  30. 3. The constants set in the program, as far as I know, can't be 
  31. changed without errors creeping in.  If you find otherwise, please 
  32. let me know.
  33.  
  34. 4. When combining text and lines or circles with bitmaps in 
  35. printing, you MUST print everything but the graphics first. Then 
  36. end your page with a NewPage/EndDoc combo as shown here.
  37.  
  38. 5. The 3.14 scaling factor used here to make the screen image 
  39. scaled properly in inches works for 640X480.  Experiment to change 
  40. to other resolutions, to get an accurate printout.
  41.  
  42. Sorry I can't go further in explaining all this, but the source 
  43. code is fairly well documented.  Good luck.
  44.  
  45. This information is placed in the public domain for any use 
  46. whatever.  If you've solved a VB problem, why not do the same thing 
  47. with your code.  It'll help us all.
  48.  
  49. George Campbell
  50.