|
It would help if you mentioned what you want these scroll bars to do...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
ok ,
i have a really width photo that i would like to show ,
the photo in width do not fit the screen so what i am trying to do is to have a scroll that when i go to the right i can see the rest of the photo
thank u in advance , for anyhelp ..
|
|
|
|
|
|
Easy. Put a Panel on your form, then put a PictureBox in the Panel. Make sure the Panel's AutoScroll property and the PictureBox AutoSize properties are set to True.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Woah! Nice one Dave!
Steve
|
|
|
|
|
I had to make one of these for an application I wrote a while back. Turned it into it's own control in about 10 minutes and now it sits in the GAC and has it's cozy little place in my Toolbox.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I think I will do the same!
A simple but great idea!
Steve
|
|
|
|
|
Hey Dave ,
i wanna remind u that the photo that i am trying to show is going to be biger than 1024 pix in width ..
thxx for any help ..
|
|
|
|
|
forget about the sh*t that i had just said it worked fine for me
|
|
|
|
|
Oops!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
So what?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
I want to change the color of the whole Tab control along with the Tab Pages..Currently i am able to change the color of the Tab pages.For e.g if there are 2 tab pages then both the tab pages header as well as the tab pages can get color but the empty space along side the 2 tab pages dont get any color.
Plz help me out with this problem.
Thanks
Riz
|
|
|
|
|
It looks like I replied to the right person, wrong post. My answer is here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
hi.. everybody..
hope you can help me with this thing.
Do you have any idea, how to save a file into MS Access database using VB 2005?
Here's the simple scheme of the table
FieldName {Data Type}
--------------------------
Date {Date}
EmployeeID {Number/Integer}
Attachment {OLE Object}
--------------------------
I red the MSDN help, but still haven't any idea how to apply it into my case.
Or should i make an array of bytes stream of the file and then store it into 'Attachment' field. But then how the to read and restore/create the file back?
Thanks before..
|
|
|
|
|
I haven't done anything like this with access, but with another database I declared a column of type blob....which essentially IS an array of bytes. That way I could store any type of file (.pdf, .jpg, .gif,...) Perhaps searching for information using the keyword "blob" will help you.
Sorry i couldn't be more helpful.
|
|
|
|
|
Thanks anyway..
|
|
|
|
|
This is an image file?
Do you want to embed them in the database or create a link to them?
OLE Object fields can be set to embed or link to an image or other OLE file such as a Word document or Excel workbook.
Embedding an image (especially GIF and JPEG) will cause the size of the database to grow far beyond the size of the image files you embed and may cause the database to run much slower. Part of the reason is that Access creates a bitmap (bmp) of the image for display information purposes. Also, If users are using Access forms, they will need additional software to view images other than bitmap (.bmp) or device independent bitmap (.dib) files on a standard Windows installation.
If the OLE Object field in the database is set to 'Link' instead of 'Embed' then all you need to do is store the path to the file.
Steve
|
|
|
|
|
It will be pdf or ms office files.
I want to embed it to the database.
Here i tell you the concept we want to meet to:
We have several teams on the field. And those team will use and report the data using that database. So for this purpose, i create the replica set.
Frequently, they have to submit the pre-formated report in office(doc,xls,ppt) and pdf.
The teams report once every month. So all they have to do is just to send the database file and at HQ team will syncronize the database and send it back to the field.
I never use OLE object, so it possible to store array of byte into it?
Is it take more space?
ty
|
|
|
|
|
Wow... i just found it...
Just take a line of code to read a file into an array of bytes, and
a line for write the bytes array into a file...
ty Microsoft
|
|
|
|
|
If the column contains an array of bytes, I'm not sure Access will display the file. I think you would need code to extract the bytes to a file again.
Also, you may want to try a few examples because, as I said, embedding files in Access (especially images) increases the file size by a huge amount. THis may not be the case with an array of bites...
Steve
|
|
|
|
|
I use ReadAllBytes and WriteAllBytes built-in functions Form Systems.IO namespace.
The size is ok.
|
|
|
|
|
posted b4 but i cant seem to find the old thread
n i need help urgently >.<
tis is the code i tried to use
---------
Private Sub AddSubmitB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddSubmitB.Click
Dim strcon As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Jasmine\db.mdb"
Dim cmd As New OleDb.OleDbCommand
Dim con As OleDb.OleDbConnection
Dim strsql As String
con = New OleDb.OleDbConnection(strcon)
con.Open()
strsql = "Insert into member (BorrowerId, password, MemberType, Fname, Lname, Gender, Address1, Address2, Address3, ContactNo, HandPhNo, Email, CourseOfStudy, EnrolledDate, ExpiryDate) values ('" & StudIdTB.Text & "','" & StudPwTB.Text & "','" & UgTB.Text & "','" & StudFnTB.Text & "','" & StudLnTB.Text & "','" & StudGenderCLB.Text & "','" & StudAdd1TB.Text & "','" & StudAdd2TB.Text & "','" & StudAdd3TB.Text & "','" & StudHmTB.Text & "','" & StudHpTB.Text & "','" & StudMailTB.Text & "','" & CosCB.Text & "','" & EnrolledCB.Text & "','" & ExpiryCB.Text & "')"
cmd.Connection = con
cmd.CommandText = strsql
cmd.ExecuteNonQuery()
con.Close()
MsgBox("New Member Added!")
Me.Close()
End Sub
---------
when i tested it today, it did not work
the debugger stopped at cmd.ExecuteNonQuery
it says
OleDbException was unhandled
Syntax error in INSERT INTO statement.
i checked thru my database and the sql statements n r fine, oso tried adding square brackets
how to solve?
|
|
|
|
|
Have you check the concurency?
|
|
|
|
|
Your old post is here[^], along with my reply to it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
opps, thx
mus haf posted help at too many forums, missed out, haha
|
|
|
|