Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Clickĭim startInfo As New ProcessStartInfo("C:\Program Files\GIMP 2\bin\gimp-2.8.exe") PictureBox1.BackgroundImage = Image.FromFile("C:\Users\John\Desktop\InitialStorage\PictureBoxImages\Pic3.Png") PictureBox1.BackgroundImage = Image.FromFile("C:\Users\John\Desktop\InitialStorage\PictureBoxImages\Pic2.Png")ĮlseIf = "My great Nieces kitten" Then PictureBox1.BackgroundImage = Image.FromFile("C:\Users\John\Desktop\InitialStorage\PictureBoxImages\Pic1.Bmp")ĮlseIf = "My great Nephews quadcopter" Then Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged PictureBox1.BackgroundImageLayout = ImageLayout.StretchĬ("My great Nephews quadcopter")Ĭ("My great Nieces kitten") Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load It's just an issue of whether it acceptsĬommand line arguments for a file path/name or something. You will need to see of Corel Draw can be passed parameters for a file name to open when it is launched using this method. Probably because I'm not passing appropriate parameters in startInfo.Arguments.Ĭorel Draw may not be able to be used in this fashion.
When launched using this method the program Gimp does not accept spaces in the paths folders names or possibly even files names.Īlso for some reason two instances of Gimp are launched although only the second one has the image in it and is on top of the first instance. Then you have a direct association of what the user selects in the ComboBox and what the associated file path is (and anything else that you want to maintain in it). I'd suggest that you consider encapsulation of the data - either in a class or a datatable - rather than that long-winded If/ElseIf/Else/End If (or a Select Case for that matter). Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickįileSystem.FileOpen(1, "C:\Users\Christene\Documents\Corel\Karries_Crusaders\Believe.cdr", OpenMode.Input) PictureBox2.Image = Image.FromFile("C:\Users\Christene\Pictures\Macro_Pictures\Crew_Back.jpg") PictureBox1.Image = Image.FromFile("C:\Users\Christene\Pictures\Macro_Pictures\Crew_Front.jpg") If ComboBox1.SelectedItem = "Crew Neck Sweatshirt" Then Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged I am trying to say when the user has selected "this" from the ComboBox and they click the submit button then open "this" file.