|
M Riaz Bashir wrote: for(int i = 0; i < m_clientCount; i++){
if(m_workerSocket[i] != null){
if(m_workerSocket[i].Connected){
m_workerSocket[i].Send (byData);
}
}
}
I have two reasons to believe that you really have not the slightest idea what you're doing.
1 - you posted a ton of useless boilerplate code
2 - if you can't work out from this how to send to only one user, then you should take a class, read a book, do SOMETHING to create a basic understanding of programming before you play with other people's code. I assume you're playing with something you found online to teach yourself, I can't see how this could be work or school. So, take a step back, buy a book, and learn how to read some basic code before you start trying to mash up other people's.
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
|
|
|
|
|
Christian Graus wrote: I have two reasons to believe that you really have not the slightest idea what you're doing
I agree
Moim Hossain
R&D Project Manager
BlueCielo ECM Solutions BV
|
|
|
|
|
i need to show a preview of my webcam in a picture box when i connected to the webcam. im using WIA.
how can i show preview of my webcam in a picturebox.
here is my code to connect to webcam...
private void btnDecode_Click_1(object sender, EventArgs e)
{
try
{
Cursor.Current = Cursors.WaitCursor;
DeviceManager manager = new DeviceManagerClass();
Device d = null;
foreach (DeviceInfo info in manager.DeviceInfos)
{
d = info.Connect();
}
Item item = d.ExecuteCommand(CommandID.wiaCommandTakePicture);
foreach (string format in item.Formats)
{
i++;
WIA.ImageFile imagefile = item.Transfer(format) as WIA.ImageFile;
imagefile.SaveFile("d:\\" + i + ".jpg");
Bitmap image = new Bitmap("d:\\" + i + ".jpg");
Bitmap bm = new Bitmap(image, 200, 150);
Gray(bm);
|
|
|
|
|
Well, what does it do, and not do ? I know how to do this, but not with WIA, so you'll need to tell us what's going wrong.
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
|
|
|
|
|
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.
|
|
|
|