Drawing onto a form window

  • Thread starter Thread starter Lee Schipper
  • Start date Start date
L

Lee Schipper

I want to show some very dynamic read-only information on a form. Mostly
text with a few simple blocks and lines to show heading information.

I have been toying with the idea of formatting the data with a report and
displaying it inside the form (From my 3/19 post "Display report preview
inside form.") but have been wondering if it might not be easier just to use
API calls to draw directly onto the form window.

Anyone have experience doing this with Access forms? If I start down that
road will I be getting myself into a heap of nasty code? I am not afraid of
code, but I am looking for a simple solution here, not a hard one.

Thanks,
Lee
 
You cannot draw directly onto an Access Form with Subclassing to catch
the form's WM_Paint message. With A2K or higher you would have to have
the subclassing code reside within an external DLL due to a bug in the
VB IDE.

An alternative would be for you to use the vbPictureBox class on my site
here:
http://www.lebans.com/imageclass.htm
ImageClass has been replaced by the PictureBoxA97 project. A standard
Image control is wrapped within a class to allow the control to resemble
the standard Visual Basic PictureBox control. Simple drawing methods are
directly supported as is Text output with rotation. A handle to a Device
Context is exposed to allow the developer to use the full range of
Graphic API's. Also supports Screen Grabs, Copy to Clipboard and Save
Image control to a disk Bitmap file. Here is the Access 2000 version,
PictureBoxA2K.zip
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Domo arigato gozaimasu sensei!!

TC :-)


Stephen Lebans said:
You cannot draw directly onto an Access Form with Subclassing to catch
the form's WM_Paint message. With A2K or higher you would have to have
the subclassing code reside within an external DLL due to a bug in the
VB IDE.

An alternative would be for you to use the vbPictureBox class on my site
here:
http://www.lebans.com/imageclass.htm
ImageClass has been replaced by the PictureBoxA97 project. A standard
Image control is wrapped within a class to allow the control to resemble
the standard Visual Basic PictureBox control. Simple drawing methods are
directly supported as is Text output with rotation. A handle to a Device
Context is exposed to allow the developer to use the full range of
Graphic API's. Also supports Screen Grabs, Copy to Clipboard and Save
Image control to a disk Bitmap file. Here is the Access 2000 version,
PictureBoxA2K.zip
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Back
Top