how to open picture in vb by oading internet explorer

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2007
Posts: 4
Reputation: orvet is an unknown quantity at this point 
Solved Threads: 0
orvet orvet is offline Offline
Newbie Poster

how to open picture in vb by oading internet explorer

 
0
  #1
Aug 17th, 2007
i successfully saved picture file as pathfile to database but i do not know how to open this picture file by relevant program suh as internet explorer, acdsee or else?
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: how to open picture in vb by oading internet explorer

 
0
  #2
Aug 17th, 2007
Hi,

Add a Picture box Control on the form and use this code:

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Picture1.Picture = LoadPicture("C:\Mypict.bmp")

Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 4
Reputation: orvet is an unknown quantity at this point 
Solved Threads: 0
orvet orvet is offline Offline
Newbie Poster

Re: how to open picture in vb by oading internet explorer

 
0
  #3
Aug 18th, 2007
Thank you for your quick respond.

Just give the details:
I made a form to input data contains pathfile of picture in datagrid table as below:

D:\ADR Files\MCC & Tooling Cost\MCC Image\MCC.jpg

Then i would like to open this image by using another picture program such as internet explorer, bitmap or else. Therefore by double clicking row in datagrid this image will be opened by another program not be shown on picture box of visual basic.

I have link pathfile by choose hyperling on database (access) and can open it. But i have know yet how to open it in vb form.
Should i did some stupid mistake procedure, could you pls tell me hoe to make it easier?

thanks in adavance
Orvet
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: how to open picture in vb by oading internet explorer

 
0
  #4
Aug 19th, 2007
Hi,

in case if u dont want to use the PictBox, shell out the image;

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Shell "C:\WINDOWS\SYSTEM32\MSPAINT.EXE " & Chr(34) & "C:\MyPict.BMP" & Chr(34), vbMaximizedFocus
U can also Shell JPG/GIF Files also in the same way.
I feel its a better option to Show the Image in a PictureBox on another Form in the same project.

Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 4
Reputation: orvet is an unknown quantity at this point 
Solved Threads: 0
orvet orvet is offline Offline
Newbie Poster

Re: how to open picture in vb by oading internet explorer

 
0
  #5
Aug 19th, 2007
Actually i have prepared data grid where picture file saved in pathfile not a picture. Then i made a new form to browse data and to call that picture saved. When i compiled this form, we couldn't open that picture using another windows program because there is only pathfile not a picture in datagrid table.

I gave command button to call this picture , then problem came out as object not identified. I assumed that data grid can not show link of picture file to the its source.

Should you need the details of my project , i ll give you by email.
It is important for me to finish this job because our company needs online database for computing material cost and show them to any viewer.

By the way we can not specify picture file in one name, but i need to provide relation every picture file refer to picture number. therefore i can not make procedure for single picture only.

should you have any suggestion pls let me know.
thank you
Orvet
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: how to open picture in vb by oading internet explorer

 
0
  #6
Aug 19th, 2007
Hi,

OK.. ur pict is not stored in the db, To show the Picture in another Form, it is simple..
First Add a Public Variable to the Form and in either Click Event of the Grid or Command button, populate the public variable with the Path and Show the Second Picture Form. Some thing like this:
Add a Form (frmPict). Place a pictureBox on this form, write this code in Main/Calling form..
Declare this Variable FormLevel:
Public MyPath As String
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. MyPath = DataGrid1.Columns(5).Text
  2. frmPict.Show

Write this code in frmPict FormLoad Event:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Me.Picture1.Picture = LoadPicture(Form1.MyPath)

Where as Form1 is the Main Form where datagrid is Loaded.. Change it to ur Form name..

Regards
Veena
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 4
Reputation: orvet is an unknown quantity at this point 
Solved Threads: 0
orvet orvet is offline Offline
Newbie Poster

Re: how to open picture in vb by oading internet explorer

 
0
  #7
Aug 20th, 2007
i tried and it works but picture can not be shown, i only see empty picture box even there is pathfile in datagrid column.

Assuming that datagrid1.column(5) contains pathfile: d:\images\mcc.jpg.
hw to open this image by calling pathfile. is there any procedure must be created? what kind of type should we define for database column where saved pfthfile? hyperlink , OLEobject or text?

if we can oen picture, how to view picture by default application?
thank you
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 300
Reputation: jireh is an unknown quantity at this point 
Solved Threads: 42
jireh's Avatar
jireh jireh is offline Offline
Posting Whiz

Re: how to open picture in vb by oading internet explorer

 
0
  #8
Aug 23rd, 2007
try to use the OLE Object datatype for your picture in the database. it will save the picture, ergo you need not the path of your picture.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC