Hi, I want to build an application in which when someone Selects a Model No. of a Cell Phone, a JPEG Diagram Should be open in Windows Image Viewer instead of VB Picture Box because User want to Zoom, Rotate or save the JPEG File...
Can any body gimme a help how to do this ???
I am new in programing and not getting proper lessons from any where, just surfs the web for the relevant stuff.. so plz consider me
8 replies to this topic
#1
Posted 21 January 2012 - 01:12 PM
|
|
|
#2
Posted 25 January 2012 - 02:28 PM
You can do this
But not everybody may have it installed, so you can do this instead to open the picture in the default program assigned to open files of that type
process.start("c:\pathToApplication\Application.exe", "c:\pathToPicture\Picture.jpg")
But not everybody may have it installed, so you can do this instead to open the picture in the default program assigned to open files of that type
process.start("c:\pathToApplication\Application.exe", "c:\pathToPicture\Picture.jpg")
#3
Posted 26 January 2012 - 01:06 AM
This thread has been posted AND answered at least twice already. Try to refrain from double posting, as people will always try to help, double posting just clogs the forum.
As said by danp129, you need to use process.start
I'd go with the :
As said by danp129, you need to use process.start
I'd go with the :
Process.Start("C:\yourimage.jpg")
Rather than danp129's example, as this means you can open it with the default application, rather than opening it with a program that might not be installed.
#4
Posted 26 January 2012 - 07:05 AM
Oops, I meant to give the example of using the filename only in the second code block but accidentally copied the wrong line!
#5
Posted 26 January 2012 - 07:42 AM
Great, its working.. Great, its working.. but I want to use existing Images from My.Resources, and its not working on it.. is there any other solution ?? It I think there is ......
Thankx 4 response
Thankx 4 response
#6
Posted 26 January 2012 - 09:32 AM
It would look something like this:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click SaveFileDialog1.ShowDialog() End Sub Private Sub SaveFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles SaveFileDialog1.FileOk My.Resources.MyImageName.Save(SaveFileDialog1.FileName, Drawing.Imaging.ImageFormat.Jpeg) Process.Start(SaveFileDialog1.FileName) End Sub
#7
Posted 27 January 2012 - 01:16 AM
I wouldn't notify the user that you're saving the image, rather save it to a temp folder.
Dim bmp as bitmap = My.Resources.IMAGE_NAME
dim dirandfile as string = My.Computer.Filesystem.SpecialDirectories.Temp("newimagename.bmp")
bmp.save(dirandfile)
Process.Start(dirandfile)
Edited by Blimp, 02 February 2012 - 09:41 AM.
#8
Posted 01 February 2012 - 06:44 AM
saya kog malah bingung ya???? :cursing:
#9
Posted 02 February 2012 - 09:39 AM
ahmadsofi said:
saya kog malah bingung ya???? :cursing:
Something about being confused... If you have a question, post a new thread asking about it. We'll gladly help you out!
~ blimp.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top










