Article ID: 40140
This article was previously published under Q40140
This article has been archived. It is offered "as is" and will no longer be updated.
The program example shown below demonstrates how to work around a problem with the DragGrayRgn routine in QuickBasic Version 1.00 for Macintosh. The behavior of DragGrayRgn differs from the DragGrayRgn provided in Basic Version 3.00 or in the earlier Basic Compiler Version 1.00 for Macintosh.
Microsoft has confirmed this DragGrayRgn problem in QuickBasic Version 1.00. We are researching this problem and will post new information as it becomes available.
The DragGrayRgn routine (which is an MBLC routine) in QuickBasic produces the following incorrect behavior:
DragGrayRgn copies the region into a frame (a border outline), forgets the handle to the original region (so that EraseRgn can't reference or erase it), and leaves you with just a frame outline (at the wrong coordinates) when you finish the drag.The code example below demonstrates the necessary modifications to a Basic Version 3.00 routine to work around the problem. The program then behaves correctly as follows:
You click on the triangle, drag its outline to a new location, then release the button. At this time, the old triangle should be erased and the outline of the triangle that was dragged to the new location should be filled in.To work around the problem in QuickBasic Version 1.00, copy the original region to a new region before the drag, and invoke DragGrayRgn with the new region.
The program example that follows shows a Basic Version 3.00 source code that uses DragGrayRgn which has been modified to make it run under QuickBasic Version 1.00:
Note the following:
Article ID: 40140 - Last Review: February 27, 2014 - Revision: 1.2
Contact us for more help