|
Make sure your resources are set so their build action is 'embedded resource'. Then find an online tutorial and work through it, this can be tricky to make work the first time.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for replying!
|
|
|
|
|
Hello,
I want to know how to use the bar code scanner machine in my application is there any articles which speak about this topic?.
Thanks.
Dad
|
|
|
|
|
IT depends on your scanner. The hardware manufacturer needs to provide an SDK or a driver that gives you access to the hardware.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Barcode readers usually act like keyboards. You put the cursor in a textbox, read the barcode, and whatever the barcode contains (usually numbers but can also contain text), appears in your textbox as if it had been typed in the keyboard.
At least all the barcode readers I have used work that way.
|
|
|
|
|
Barcode scanners are generally 'keyboard wedge' these days, meaning they pretty much act like a keyboard.
The only time you'd probably need to write anything to read it would be if the scanner is serial port based. But that should be easy enough in .NET 2.0 with the SerialPort object in (I think) the System.IO namespace.
Generally, I'd really recommend using a keyboard wedge type scanner - if for PS/2 based keyboards, it will have a cable to create a junction for both the scanner and the keyboard to connect to the PS/2 port. If it's USB, it's even easier - it should simply work after being connected. The bonus with the USB/keyboard wedge ones is that you can test in places like notepad if it doesn't appear to be working property.
The only thing you may need to do is configure the scanner (from the user guide) by scanning a few barcodes if it doesn't behave exactly how your application is expecting input.
------------------------
Luke Lovegrove
------------------------
|
|
|
|
|
Basically I need to make a 5 x 5 triangular array which I did and it needs to simulate the cracker barrel peg game which I can't figure out, and I need to have it done by tomorrow
here's what I have so far:
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
<br />
namespace Pegs<br />
{<br />
public partial class Form1 : Form<br />
{<br />
const int size = 5;<br />
Color[,] Brd;<br />
<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
Brd = new Color[size, size];<br />
}<br />
private void PrintBrd(Color[,] B)<br />
{<br />
int i, j;<br />
Graphics Draw = CreateGraphics();<br />
SolidBrush PB = new SolidBrush(Color.White);<br />
Draw.Clear(Color.DarkGray);<br />
for (i = 0; i < B.GetLength(0); i++)<br />
<br />
for (j = 0; j < B.GetLength(1); j++)<br />
{<br />
<br />
if (j <= i)<br />
Draw.FillEllipse(PB, 225 + 60 * j + (30 * (size - 1 - i)), 100 + 60 * i, 50, 50);<br />
}<br />
Draw.Dispose();<br />
}<br />
<br />
private void startButton_Click(object sender, EventArgs e)<br />
{<br />
PrintBrd(Brd);<br />
}<br />
<br />
private void Form1_Click(object sender, EventArgs e)<br />
{<br />
<br />
}<br />
private bool IsIn(int x, int y, ref int i, ref int j)<br />
{<br />
bool found = false;<br />
for(i=0;i<Brd.GetLength(0);i++)<br />
{<br />
for (j = 0; j <= i; j++)<br />
{<br />
if (x >= 225 + 60 * j + (30 * (size - 1 - i)) && x <= 225 + 60 * j + (30 * (size - 1 - i))+ 50 &&<br />
y >= 100 + 60 * i && y <= (100 + 60 * i)+50)<br />
{<br />
found = true;<br />
<br />
break;<br />
}<br />
<br />
}<br />
if (found)<br />
break;
}<br />
<br />
return found;<br />
}<br />
<br />
private void Form1_MouseClick(object sender, MouseEventArgs e)<br />
{<br />
int i = 0, j = 0;<br />
if(IsIn(e.X,e.Y, ref i,ref j))<br />
{<br />
<br />
}<br />
PrintBrd(Brd);<br />
<br />
}<br />
<br />
}<br />
}
Thanks for any help
|
|
|
|
|
People will not answer this. You need to ask a specific question to get an answer.
I suggest you break your problem down until it becomes simple, and if your still stuck, ask a specific question on the problem.
If you think about the problem as a whole, you may not be able to manage or come up with solutions. So concentrate on one specific thing at a time.
My current favourite word is: Bauble!
-SK Genius
|
|
|
|
|
Well, no-one is going to do your homework for you, but here are some starters
randomo wrote: Graphics Draw = CreateGraphics();
Never, ever do this. Do all drawing in your paint event. Open your app. Open calculator. Drag the calculator over your window. The reason it doesn't redraw itself properly, is that you used CreateGraphics.
Rather than an array of colors, keep an array of bools, specifying if a hole has a peg in it or not. The color is a rendering detail, and can be worked out from the bool.
An array of bools is easier to use to work out if a peg is there, and where it can move.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
well i'm definitely not gonna get it done, no help[ from you guys I guess, thanks anyway
|
|
|
|
|
Hi,
I have a small problem with my solution/references.
I have 2 projects in the solution. I use a folder(in the solution) where are some cs files. I need in one cs file use System.Managemet.
I know that exist references folder in a project, but these file is in the solution. There isn't any references folder.
How can I do that? Is it possible to have any reference inside a cs file?
Thanks.
|
|
|
|
|
I don't understand your question. You don't need explicitly add a reference to your project to use the classes in the System.Management namespace. They're available by default.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
when i want to use System.Managemet, have to add reference. Without reference it doesn't work.
|
|
|
|
|
I'm not sure why have to explicitly add a reference to System.Management to use it. But if it works then there's no problem, right?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I am so stupid. I have been looking for asolution a couple of hours.
I just added reference into both projects and it works.
Thanks.
|
|
|
|
|
i know flash media server offers the functionality of multi-person video chat, live broadcasting,
does microsoft also has a server like that?
thanks
|
|
|
|
|
Hi,
I use "microsoft access" file (mdb) as a local database.
I have no problem reading the data from it and show it on the DataGrid. the problem is when i want to delete a row i get Exceptions like:
"An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dll
Additional information: Update requires a valid DeleteCommand when passed DataRow collection with deleted rows."
Well , this is my code. can someone tell me what im doing wrong ?
Thanx
----------------------------------------------------------------------
dsDB.Tables["Clients"].Rows[1].Delete();
ClientsAdapter.Update(dt);
----------------------------------------------------------------------
dsDb is my DataSet.
ClientsAdapter is my DataAdapter.
as i wrote above, i can see the data from the database on my datagrid so i assume that there is no problems with the object i use.
|
|
|
|
|
In order for your code to work you must set the ClientsAdapter.DeleteCommand property.
|
|
|
|
|
can you be more specific ?
what should i set?
|
|
|
|
|
ClientsAdapter.DeleteCommand property
|
|
|
|
|
I'm new to C#,but I used VB.NET a lot ... This prject I have to do in C# and I allready have problems connecting to my SQL SERVER Database.
I put an combobox into my form which I want to link to some records in my database ...
So combobox.Datasource = ... Add Project DataSource ... Database ... Connection to my SQL SERVER Database ...
I saved the connection string as TSConnectionString ... Selected the tables and views I need from my database ...
and Visual Studio has created the files ... TSDataSet.xsd ( TSDataSet.Designer.cs , TSDataSet.xsc , TSDataSet.xss )
I mention that the combobox.DataSource property is still empty and the program can compile succesfully ... for now
When I come back to fill combobox.Datasource with TSDataSet namely tSDataSetBindingSource when i try to compile the
next error message pops up :
Error 1 The type name 'TSDataSet' does not exist in the type 'TSales.TSales'
... and the code behind this error is :
this.tSDataSet = new TSales.TSDataSet(); --------------- here is the error
this.tSDataSetBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.panTop.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tSDataSet)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tSDataSetBindingSource)).BeginInit();
this.SuspendLayout();
Remember though I wrote above that Visual Studio creates those 4 files (TSDataSet.xsd , TSDataSet.Designer.cs , TSDataSet.xsc , TSDataSet.xss ) and puts them in Solution Explorer
So my question is ... how come there is no tSales.TSDataSet ?
and what should I do to link those records to that combobox and other records to other controls in my form
Thank you
|
|
|
|
|
hello everybody....
I want to know How to enable/disable an item in an checkboxlist ?
i need that urgent.
I follow below procedure.
CheckBoxList.item[0]. ===I did not get enabled option .how to get that enable option.
thanks
|
|
|
|
|
|
CheckBoxList.SetItemChecked(0, true);
hope it will help
Becoming Programmer...
|
|
|
|
|
Hi,
I have a datagridview with a checkbox column and multiselect set to true. I want the user to be able to select multiple rows and check/uncheck them with a single click on one of the selected checkboxes. (like you can set the status flag for multiple emails in outlook). But unfortunately when you click on a checkbox only the row this checkbox is in becomes selected destroying the current selection.
Is there a way to keep the selection?
Cheers
Andreas
|
|
|
|