|
Subject:
|
sketching activex in MS Access
|
|
Posted By:
|
ParadiseIsle
|
Post Date:
|
9/12/2006 1:38:22 PM
|
|
I'm trying to make an activex that will sketch lines based on dimensions entered in textboxes in access. My problem is that the activex flashes briefly what it is supposed to show, and then goes blank. I've removed all cls commands from the activex code, and from the access form, and it still does the same. What could be causing this to happen?
|
|
Reply By:
|
marcostraf
|
Reply Date:
|
9/12/2006 4:37:31 PM
|
we need more information, like the way you paint the lines and where (usercontrol, picturebox etc)
|
|
Reply By:
|
ParadiseIsle
|
Reply Date:
|
9/12/2006 7:05:35 PM
|
Thanks, To illustrate my problem. I tried the most simple embodiment of my activex ever: it has a command button on it and a picture box on it. When you click the command button, it uses PSet to put a dot on the picture box. So the line is: picture1.Pset(10,10) Unfortunately, while it works in a test Standard EXE within visual basic, it does nothing when located on an access form. Is there something I don't understand about the Line and Pset method, that they don't work outside of visual basic?
|
|
Reply By:
|
marcostraf
|
Reply Date:
|
9/13/2006 12:45:26 PM
|
Unless the PictureBox AutoRedraw property is set to true, you should use the graphics methods in the Refresh (or Paint, do not remember) event, because the drawing is not retained. For more info, look into MSDN for the AutoRedraw property.
|
|
Reply By:
|
ParadiseIsle
|
Reply Date:
|
9/15/2006 11:13:26 AM
|
That solved it. Thanks!
|