![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Dec 2005
Posts: 2
Rep Power: 0
![]() |
Problem with access and vb
Right thought this would be a simple task i am so frustated. Basically i have a database with pictures. i understand basic vb and access but never tried this before and thought it would be simple when i load the form instead of the picture being in a picture box it is a jpeg or bmp icon which you click on and it loads up in a photo application say paint. What's the point in that? I want the pictues on the form. Tried everything including package settings but that won't even let me change view to picture. Is there some code i can put in and where would i put it so that it ativates when the form loads and when records are changed.
Help would be very very helpful i will email a copy of my game when it is finished as well if you can provide the answer |
|
|
|
|
|
#2 |
|
Expert Programmer
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4
![]() |
What version of VB are you using?
|
|
|
|
|
|
#3 | |
|
Caffeinated Neural Net
![]() Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,005
Rep Power: 5
![]() |
Quote:
' assumes fileName is a string with the bitmap's filename in it, and picBox ' is a PictureBox control. Dim isValid As Boolean = True Dim itemImage As Bitmap Try itemImage = New Bitmap(fileName) Catch ex As Exception isValid = False End Try If isValid Then picPreview.Image = itemImage Else picPreview.Image = Nothing End If
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
|
|
|
|
|
|
#4 |
|
Newbie
Join Date: Dec 2005
Posts: 2
Rep Power: 0
![]() |
hi thanks for your help unfortunlty it came up with syntax error when i coded it in also i am using a jpeg file not a bitmap does that make any difference?
|
|
|
|
|
|
#5 | |
|
Caffeinated Neural Net
![]() Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 1,005
Rep Power: 5
![]() |
Quote:
What was the error?
__________________
And once again, Probability proves itself willing to sneak into a back alley and service Drama as would a copper-piece harlot. - Vaarsuvius, Order of the Stick |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|