×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Graphic selection in VB 5

Graphic selection in VB 5

Graphic selection in VB 5

(OP)
How can I take one bitmap and select various portions of it and put it in another picturebox?

Thanks
Erik

RE: Graphic selection in VB 5

I have not been able to get the picturebox to do any of the following
1. zoom in or out
2. move around (like panning)
3. copy a portion of it to the clipboard

But maybe this will get you going
AutoRedraw property needs to be True on both pictures.
Start with the mouse down event of the first picture box
you need to save the X & Y coordinates of the first click in global variables
then put a small cross hair there with the line property of the picture so your eye knows where you clicked.

Next click the other corner of the picture get its X-Y coords.
I put two text boxes on the form so I can see the X and Y coords when I programming a picture box
You can erase them later.
Change the mouse to cross hair if you like in the pictures MouseIcon property

After that I'm not sure

RE: Graphic selection in VB 5

Erik

What exactly do you want to do?
1) Do you want to mark parts of a picture with a mouse and then copy those to another picture?
2) If Yes, are these regular, i.e. Square, Rectangular, Circular, or are they irregular, i.e. drawn freehand?
or
3) Do you want to click on a button to have a predefined part of a picture copied?

Based on your answers to these I can send you info on how to do each. In the mean time, if you are not familiar with the BitBlt API function, I would suggest having a look at the code code I posted a few weeks ago.

-Ian

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close