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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Viewing Photoshop Pictures in a form

Status
Not open for further replies.

KingofSnake

Programmer
Jul 25, 2000
73
US
Is there anyway to show Photoshop (.psd) files in a form?
KingOfSnake - The only sports drink with ice crystals
(and marshmellos!)
 
The easy way to do it would be to change the format to .jpg. If you are using the commondialog filter to open them you should be able to add the .psd to the commondialog code. Every day above ground is a GOOD DAY!!!
 
See, I have a program that displays a picture, and gives you the option to keep the picture or to delete it. I made it because my collection of pictures is getting very large, and I need to reduce it. But I have 100's of photoshop pictures. Me going into photoshop and changing the format to jpg would defeat the purpose.
KingOfSnake - The only sports drink with ice crystals
(and marshmellos!)
 
You'll have to add the MS Common Dialog control to your form and the following code should work. However I've only been at this stuff for about 4 months or so.This code allows the user to select a photo. If you don't want the user to select the photo, you have to add the photo type to the control at design time. Hope it helps ya.

Private Sub mnuOpenItem_Click()
CommonDialog1.Filter = "PhotoShop (*.psd)|*.psd"
CommonDialog1.ShowOpen
SourceFile = CommonDialog1.FileName
imgViewer.Picture = LoadPicture(SourceFile)
mnuCloseItem.Enabled = True
End Sub

Every day above ground is a GOOD DAY!!!
 
Yeah, but LoadPicture doesn't work on psd files. That's what I'm getting at.
KingOfSnake - The only sports drink with ice crystals
(and marshmellos!)
 
In your form, you could display a generic image that said something like "Other Image Format".

When you double-clicked on it, you could do a ShellExecute (see the API textviewer for the function call details), and let the windows file associations take care of launching Photoshop for you.

Chip H.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top