Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.basic.visual.misc > #1994
| From | "DaveO" <djo@dial.pipex.com> |
|---|---|
| Newsgroups | comp.lang.basic.visual.misc |
| Subject | Re: Dynamic Image in Picture Box |
| Date | 2014-01-08 15:03 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <lajpcm$o5i$1@dont-email.me> (permalink) |
| References | <b521bd28-41d5-4da6-a6c3-2226da6c4925@googlegroups.com> |
"Yogesh P" <kkryogesh@gmail.com> wrote in message news:b521bd28-41d5-4da6-a6c3-2226da6c4925@googlegroups.com... > Hi, > Am new to VB. My requirement is simple. > I want to load images into a picture box one by one upon mouse click of a > command button. > Say..i will have 100 images in a folder in local(C:\Users\Desktop\Images) > I want to load first image into Picture box while the form load. > Then upon clicking a command button i want the next image to be loaded in > the Picture Box. > > Also need to zoom in and out of the picures if possible. > Thanks in advance. > > Regards, > YOgesh P The LoadPicture function does exactly what it says so that part is quite easy. Zooming is more interesting as selecting which portion to view could be tricky, the actual enlargement can be done with the StretchBlt API or by using a Image control instead of a PictureBox as it has a Stretch property. The easiest way I can think of would be to place an Image of 4 times the size of the picture inside a PictureBox then load the picture to the Image control and you now have a magnified view of 1/16th of the image and you can then work out what method you want to use to move the viewport around. Not all that elegant but it should work. These suggestions relate to VB6, if you are using a later version of VB then it will probably require a slightly different approach. DaveO.
Back to comp.lang.basic.visual.misc | Previous | Next — Previous in thread | Find similar | Unroll thread
Dynamic Image in Picture Box Yogesh P <kkryogesh@gmail.com> - 2014-01-08 03:03 -0800 Re: Dynamic Image in Picture Box "DaveO" <djo@dial.pipex.com> - 2014-01-08 15:03 +0000
csiph-web