Drag an Rectangle onto a Form with hDc and API 
Author Message
 Drag an Rectangle onto a Form with hDc and API

Hiya,

how can I drag (with the mouse, somehow like the select rectangles) onto my
form, for later making a textbox of it? I dont want to paint the rectangle
in the form, cause later it would resist there...or dont?
Can some1 help?

Thankx Tim



Mon, 12 May 2003 03:00:00 GMT  
 Drag an Rectangle onto a Form with hDc and API
You may accomplish it without using APIs. Take a look at VB Line method. If
you specify B as a parameter, you can draw a box. You may also use global
scope variables to keep the coordinates. Or use MoveEx API.

To "delete" the previous box, you may redraw it with the DrawMode 7 - XOR
Pen.
Remember the difference between AutoRedraw = FALSE and AutoRedraw = TRUE.
It's a matter of painting or not to the persistent bitmap. If AutoRedraw =
FALSE you must provide redraw action under painting events, which is bad for
coding. Otherwise, setting AutoRedraw = TRUE, increases the memory amount
used to drawing operations. Pick up one of them.

But if you really want to absorb the whole idea, buy Daniel Appleman's
"Visual Basic 5.0 Guide to the Win32 API", chapter 7 through 9. I bet you're
gonna be fully satisfied.

HTH.



Quote:
> Hiya,

> how can I drag (with the mouse, somehow like the select rectangles) onto
my
> form, for later making a textbox of it? I dont want to paint the rectangle
> in the form, cause later it would resist there...or dont?
> Can some1 help?

> Thankx Tim



Tue, 13 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. DRAG an ATTACHMENT from an outlook incoming email message, ONTO a vb6 form directly

2. Drag FILENAME from explorer and DROP onto VB form

3. Dragging Desktop Icon onto Form

4. Drag Files onto Form

5. VB4.0-32 OCX CreateObject vs drag onto form

6. unable to drag controls onto form

7. unable to drag controls onto the form?

8. drag OUTLOOK Attachment file ONTO a vb6 form directly

9. Can not drag fields from Data Environment onto Form

10. Drag items onto windows form my app???

11. Dragging a oriented rectangle

12. Dragging a rectangle???

 

 
Powered by phpBB® Forum Software