Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Common Dialog Stay Open 1

Status
Not open for further replies.

Error7

Programmer
Jul 5, 2002
656
GB
Is there a way to force the CommonDialog control to stay open, or is there an alternative control which will do that?

[gray]Experience is something you don't get until just after you need it.[/gray]
 
Perhaps you can explain what it is yopu are trying to achieve, and then we might to be able to provide appropriate suggestions.
 
My wife isn't computer literate so I wrote a programme that opens up in the folder where she has all her photo's. It's preferred if she can see her photo thumbnails so she can easily view them then select individual images to view full screen and copy to for posting to Facebook.
It would be better if the CommonDialog stayed open while she is using the programme instead of closing after each selection.

[gray]Experience is something you don't get until just after you need it.[/gray]
 
Many years ago I wrote a program, a 'picture viewer', where I've displayed JPG files in an array of Image controls in VB 6. I used an Image control because it has a Stretch property which allowed me to resize all files to (pretty much) the same size of display. Kind-of Windows Explorer with the View set to Extra Large icons, or whatever size you want.

You can use this approach, which allows you to select any picture.
You can still use a Common Dialog just to select a folder with your pictures,


---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
Thanks Andy, I already tried that method but it can be very slow loading a few hundred jpg's

[gray]Experience is something you don't get until just after you need it.[/gray]
 
Ok,. so look at my code in thread222-1735226 dated 7 Aug 14 06:36. Some tiny changes should allow you to do what you are suggesting

(i.e. try usong a Shell wndow as your dialog)
 
Thanks strongm, that is amazing. The only thing I haven't been able to figure out is how to increase the size of the thumbnails. I tried changing all the parameters in your FolderViewMode but the thumbnails always remained tiny.
Then I need to deal with the aspect ratio of the Image control but I think I can handle that.

[gray]Experience is something you don't get until just after you need it.[/gray]
 
You also need to play around with IconSize, as the display is a combination of CurrentViewMode and IconSize

e.g,

[tt]WebBrowser1.Document.CurrentViewMode = FVM_ICON
WebBrowser1.Document.IconSize = 256 ' Largest currently supported (to the best of my knowledge)
[/tt]
 
strongm, you're a star

[gray]Experience is something you don't get until just after you need it.[/gray]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top