You are here:

Visual Basic/Very Ungent help Required

Advertisement


Question
Hi Frnds,
       I have a immediate requirement for one of my client. the requirement is the jpeg images are loaded in the vb6 application dynamically depending upon the selection. the user should be able to resize the image as the user just drags. the same should be able to save. Can anyone please help me out.

Thanks
Ravishankar

Answer
You could do this with a LOT of work with an Image or Picture control.  However, there are ActiveX controls out there that would have this functionality built in that would save you a lot of work on this.  I don't have time to list them all, but one that I've seen is found at:
http://www.softsia.com/GOGO-Picture-Viewer-ActiveX-SDK-download-rhg1.htm

If you wanted to do it yourself, you'd use an Image or Picture control.  Then set the Picture property with the LoadPicture method to the picture of choice.  THEN, compare the height/width of the picture to the control and if larger, expand the control, but only to the max size you want (i.e. no larger than the containing control or form).  You'd also want to do the same if it's smaller than the control.  THEN, you'd need something control the MouseOver event to change the cursor, and then MouseDown to capture the drag coordinates.  Then finally MouseUp to resize everything as they requested.

As you can see, a lot of work that you shouldn't be concerned with because someone else has done it for you already and gives other functionality besides.

Hope this helps.

Visual Basic

All Answers


Answers by Expert:


Ask Experts

Volunteer


Robert Nunemaker

Expertise

String manipulation, Database access and usage, Class creation, and encapsulation are my strong suits. Active X Controls and DLL`s also. Although I don`t deal with Crystal - frankly because I don`t like it; I prefer to do things manually.

Experience

Employment history: Programmed with the Air Force for 15 years, and have continued in the private sector for the past 1 year. Used VB (all versions) for the past 8 years.

Organizations: MCP and MCSD certified.

Education: Computer Science Bachelor degree.

Awards: MCP and MCSD certified.

©2012 About.com, a part of The New York Times Company. All rights reserved.