944,076 Members | Top Members by Rank

Ad:
Aug 17th, 2007
0

how to open picture in vb by oading internet explorer

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
orvet is offline Offline
4 posts
since Aug 2007
Aug 17th, 2007
0

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

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
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Aug 18th, 2007
0

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

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
orvet is offline Offline
4 posts
since Aug 2007
Aug 19th, 2007
0

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

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
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Aug 19th, 2007
0

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

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
orvet is offline Offline
4 posts
since Aug 2007
Aug 19th, 2007
0

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

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
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Aug 20th, 2007
0

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

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
orvet is offline Offline
4 posts
since Aug 2007
Aug 23rd, 2007
0

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

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.
Reputation Points: 11
Solved Threads: 49
Posting Whiz
jireh is offline Offline
316 posts
since Jul 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: inserting variable value into fields in access?
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: vb-ms sql-datareport???? Urgent I have to do it today





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC