|
as my code show previous i take a picture of a QR barcode using my webcam. so i need to show a preview of my webcam befor take the picture of barcode. bcz that will be easy to user to show the barcode properly to the webcam. so i can get perfect image to process. that is the purpose.
A S E L A
|
|
|
|
|
So, wait, all this code works, but you can't work out how to set the properties of a picturebox to show the image ? I thought this was a web app ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
yaa untill now every thing work fine. can take image and as you told me earlierday doing image processing and filtering and convert to gray scale and adjust brightness and contrast. after process can deocde barcode to. some times got few errors. but now only problem is i have to take few images untill i get the fine image. bcz its very dificult to show QR properly without a preview of webcam.
my plane to user a another picturebox to show the preview of webcam.
sorry i forgot to tell you. this is not web app...just a windows app...
A S E L A
|
|
|
|
|
So, you have a picturebox, it has a property, called source or image. I forget which. Set it to point to your bitmap.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
|
what ? A picturebox shows pictures, and it does it in a pretty standard way. If you want to show video, then you need a timer to update the picture. A picturebox plainly is not a video control.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
hi
i m drawing a image using graphics on a image object
and i want to display that image in crystal report
i cant save the image in any drive as a user i dont have permission to read and write.
here is my code
public Image img;
img = Image.FromFile("Image1.jpg");
Graphics grf = Graphics.FromImage(img);
grf.Clear(Color.White);
now i drawn a picture using drwaline method of graphics
now i want to display this image "img" in crystal report
crystal report is binded to a table in dataset
i created a table for storing image in dataset
and to display image i m using
rptobj.Subreports["ImageReport.rpt"].SetDataSource(dt1);
plz help me
|
|
|
|
|
May this help u.........
{
DataTable dt = new DataTable("tblImgData");
dt.Columns.Add("Picture", typeof(Byte[]));
dt.Rows.Add(GetImageData(""));
Ds = new DataSet("NewDataSetName");
Ds.Tables.Add(dt);
objRpt.SetDataSource(Ds);
crystalReportViewer1.ReportSource =objRpt;
}
byte[] GetImageData(string fileName )
{
System.IO.FileStream fs = new System.IO.FileStream(fileName,System.IO.FileMode.Open, System.IO.FileAccess.Read);
System.IO.BinaryReader br = new System.IO.BinaryReader(fs);
return (br.ReadBytes(Convert.ToInt32(br.BaseStream.Length)));
}
|
|
|
|
|
hi
thanks for u r reply
but i m not storing the image in any file.
i have a blank image name "Image1.jpg"
i m calling this blank image and storing in img object
and in drawing lines on this image object using graphics
now i want add img to a table in a new row
it is showing error cannot convert to byte
|
|
|
|
|
Iam having values in datatable
datatable is having id's like 80,84,86
dtsecondlstbox-->datatable name
lstSelected.DataSource = dtsecondlstbox;
how to sort datatable values....
can anyone help me
|
|
|
|
|
//your question is already answered, The only way to sort datatable is to use dataview
DataView dv = new DataView(dtsecondlstbox, null, "Id", DataViewRowState.CurrentRows);
dtsecondlstbox= dv.ToTable();
lstSelected.DataSource = dtsecondlstbox;
|
|
|
|
|
DataView dv = new DataView(dtsecondlstbox, null, "Id", DataViewRowState.CurrentRows);
iam binding listbox not datagrid.
for listbox can u tell me
|
|
|
|
|
ListBox has Sorted property.
|
|
|
|
|
DataView dv = new DataView();
dv = dtCompanyForm.DefaultView;
dv.Sort = "ID";
dtCompanyForm.DefaultView = dv;
then also getting error like "Property or indexer 'system.data.datatable.defaultview'cannot be assigned to--it is read only".
|
|
|
|
|
DataView dv = new DataView(dt, "", "id", DataViewRowState.CurrentRows);
dt = dv.ToTable();
listBox1.DataSource = dt;
listBox1.DisplayMember = "name";
listBox1.ValueMember = "id";
|
|
|
|
|
|
DataView dv = new DataView();
dv = dtCompanyForm.DefaultView;
dv.Sort = "ID";
dtCompanyForm.DefaultView = dv;
then also getting error like "Property or indexer 'system.data.datatable.defaultview'cannot be assigned to--it is read only".
can u help me
|
|
|
|
|
swetha_insoft wrote: then also getting error like "Property or indexer 'system.data.datatable.defaultview'cannot be assigned to--it is read only".
You didn't read the documentation
There is a no need to create a new DataView . Use the one you are getting from DataTable.DefaultView . You could write something like
yourDataTable.DefaultView.Sort = "id ASC"
Now bind using the DefaultView .
modified on Monday, June 29, 2009 2:30 AM
|
|
|
|
|
ya thank you very much.
it's working fine
|
|
|
|
|
i hav a project with a DLL (someone created this),
suppose in this project a form (frmmain) contain some textboxes, combobox and some button also as save,Edit, delete..
suppose record loaded by RecordID-
so he just call
objDLL.LoadRecord(this)
and record filled in text boxex and combobox, radio button
and clicking on save- programmer just call
objDLL.hndRecordSave(this); //// as form name is same frmMain
and record saved, record of textboxes, combo, radio, etc
similarly on edit he just call
objDLL.hndRecordUpdate(this);
and record updated.
i just wana to know at ceating dll how he manage all form in function and how he create this dll. and now i wana to implement it to add and remove some field according to requirement.
thanks hoping u all understand what i want to say.
|
|
|
|
|
ishika_kukki wrote: objDLL.LoadRecord(this)
ishika_kukki wrote: objDLL.hndRecordSave(this);
ishika_kukki wrote: objDLL.hndRecordUpdate(this);
This methods must be written somewhere in the dll and contain the actual code performing the operations.
In order to create a dll, create Class Library project.
|
|
|
|
|
thanks for replying
yes, this method is inside the dll, but how can we pass a control name (textbox, combo) when we creating a dll. as at calling the dll method he just pass the form object (this) and all control accessible inside the dll. how can we manage dll project and application project which using this dll.
|
|
|
|
|
See the "Controls" collection of a form.
If you pass the form to the DLL as you describe, it can iterate through the Controls collection to view all controls on the form.
foreach (Control c in this.Controls)
{
...
}
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
all the control uses by form have modifiers property set public. but how can we access a form inside code of dll, as dll is a seperate control project.
|
|
|
|
|
ishika_kukki wrote: all the control uses by form have modifiers property set public
IMO you are violating a lot of OOP concepts here.
ishika_kukki wrote: but how can we access a form inside code of dll
Isn't it the other way?
|
|
|
|