| | |
how to open picture in vb by oading internet explorer
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Hi,
Add a Picture box Control on the form and use this code:
Regards
Veena
Add a Picture box Control on the form and use this code:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Picture1.Picture = LoadPicture("C:\Mypict.bmp")
Regards
Veena
•
•
Join Date: Aug 2007
Posts: 4
Reputation:
Solved Threads: 0
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
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
Hi,
in case if u dont want to use the PictBox, shell out the image;
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
in case if u dont want to use the PictBox, shell out the image;
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
Shell "C:\WINDOWS\SYSTEM32\MSPAINT.EXE " & Chr(34) & "C:\MyPict.BMP" & Chr(34), vbMaximizedFocus
I feel its a better option to Show the Image in a PictureBox on another Form in the same project.
Regards
Veena
•
•
Join Date: Aug 2007
Posts: 4
Reputation:
Solved Threads: 0
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
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
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
Write this code in frmPict FormLoad Event:
Where as Form1 is the Main Form where datagrid is Loaded.. Change it to ur Form name..
Regards
Veena
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)
MyPath = DataGrid1.Columns(5).Text frmPict.Show
Write this code in frmPict FormLoad Event:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
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
•
•
Join Date: Aug 2007
Posts: 4
Reputation:
Solved Threads: 0
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
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
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.
A conclusion is the place where you got tired of thinking. http://www.martin2k.co.uk/forums/index.php?showforum=4
http://www.a1vbcode.com/a1vbcode/vbforums/Forum3-1.aspx
http://www.developerfusion.co.uk/for...orum&ForumID=4
![]() |
Similar Threads
- XP Error: Internet Explorer link won't open (Windows NT / 2000 / XP)
- can`t open more than one window of internet explorer (Web Browsers)
- Multiple Internet Explorer Windows Opening Without Prompting (Viruses, Spyware and other Nasties)
- Internet Explorer & Windows Explorer (desktop shortcuts) Won't Load! (Viruses, Spyware and other Nasties)
- Internet Explorer - set as default browser (Web Browsers)
- Unable to open Internet explorer and it gives result "The page cannot be displayed" (Web Browsers)
- Nothing will open in my Internet explorer (Web Browsers)
- Internet explorer terminating at will. (Viruses, Spyware and other Nasties)
- Internet Explorer won't open log file attached (Viruses, Spyware and other Nasties)
- Internet Explorer does not open when clicked (Web Browsers)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: inserting variable value into fields in access?
- Next Thread: vb-ms sql-datareport???? Urgent I have to do it today
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





