That depends on what you mean by "get picture file size when loaded into application".
A Bitmap object will always represent an image in memory as 32-bits per pixel (R, G, B, A). Images on disk can be of varyious formats and compressions, so there is no relationship at all between the image size in memory and the file size of the image on disk.
hey thank you for that code, but i've just figured out that your suggestion works only for standard picturebox.
however, i'm using devexpress picture edit control.
this control didn't support location.
but really, thank you very much for helping.
actually i'm asking why when i convert an image into byte array
and get the length, i gain byte size of the image,
but the size always bigger than the real image 10-50KB.
you are right about compression dave, thank you.
I plugged in a form a datapicker, but I'm having difficulty viewing the correct date when I fetch the same from a mysql table.
I manage the double-click on a row in a datagrid to retrieve the record data when editing a record in a form.
If the date my datapicker (textdatanascita) is set to the value of the table.
FormRegistrazioneUtente.TextDatanascita.Value = Me.DataGridView1.Rows.Item (e.RowIndex). Cells ("ut_datanascita"). Value
As evidence of this fact I put a msgbox to check the accuracy of the data, and in fact everything is ok. The data obtained is as expected.
But when I open the form all the data in various textboxs are the expected ones, while only datapicker still shows the current date.
Someone would be so kind as to tell me where wrong?
It isn't very clear what you're having a problem with. Are you saying that you're trying to retrieve records from the database using the date in the DatePicker control?
Or, are you saying that the date you get from the database isn't being bound to the DatePicker control properly?? If so, what does you're code look like that does the binding to the DatePicker? Are you binding to the DatePicker's SelectedDate property?? You should be!
I am working on app in vb 2008 and have following situation:
I have one form with datagridview binded to access table with dataset, bindingsource, tableadapter and tablemanager. User cannot change, delete or add records in datagridview.
On same form I have two buttons for editing and adding new records
When user clicks on "edit" button another form is opened and on this form detailed information is displayed (based on row selected in datagridview) so user can edit and save data. On second form there are several txt boxes binded to same table through another dataset filtered on current record with following code: frmPD.TblPartnersBindingSource.Filter = "CompanyID =" & TblPartnersDataGridView.CurrentRow.Cells(0).Value.ToString
My quiestions are:
1. Is this correct way to open "details" form (using filter property of bindingsource)
2. How to use same "details" form to add new record.
there is an idea that you could use your textboxes at same form(let me say top)
when you navigate between records,your detaild information will be shown in text boxes to the user.
you can use TblPartnersBindingSource.addnew to insert a new record to database.
Command line arguments are delimited by spaces. You can use double quotation marks (") to include spaces within an argument. The single quotation mark ('), however, does not provide this functionality.
If a double quotation mark follows two or an even number of backslashes, each proceeding backslash pair is replaced with one backslash and the double quotation mark is removed. If a double quotation mark follows an odd number of backslashes, including just one, each preceding pair is replaced with one backslash and the remaining backslash is removed; however, in this case the double quotation mark is not removed.
Cool man! I love your reply. It really challenges me to be more careful next time when I post my question. I should clearly state what my input should be. I guess right now you should figure out I want to have three parameters. First one is a directory name. Second one is also a directory name. The last one is a special string.