how to use bar code reader in c# windows application? [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I want to create windows application in c# that can work with bar code reader.
I want following feature to be add in my windows application:
-> Details of Product should be fill up automatically in form when bar code reader scanned correct bar code of product.

There are (at least) two types of bar code readers:
working as keyboard input
working on Serial Port
So the first one is really easy. Just plug in your reader to your computer, put the cursor on your TextBox and read barcode. As it works as keyboard input, the code will automatically fill your TextBox. There may be line break at the end of read (it depends on reader and/or its settings).
This works out of the box. The problem is that your textBox MUST HAVE focus.
Other type is ComPort. This is great if you want more functionality (or don't want to have focus on control). But needs more work. But C# has a class to do that: https://msdn.microsoft.com/pl-pl/library/system.io.ports.serialport(v=vs.110).aspx
You will need to set some things like baudrate, parity bits, port name (COM1, COM2, etc). It's more complicated but the question is about how to do it - not about COM ports. So I am not writing about COM ports.

Related

How to listen for key strokes without Windows Forms .NET [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How can I create a key listener that listens for strokes while a program is running in the background, or as a service, for instance?
I already have a loop running with Thread, and I just need to be able to set and unset key bindings. Everywhere I searched all I got were Windows Forms solutions D:
You mentioned "Windows Forms" so I assume you are on Windows. You could register a hook function to accomplish this:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms644990(v=vs.85).aspx
The function will reside in a DLL that is loaded externally. If you need to communicate with a console or application you will need to handle the IPC yourself.
This will allow you filter all keyboards events, even those bound for the system.

Winform app with loaded DB connection [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have a question regarding problem i am solving. I am editing an old Winform app; currently the only part I need does not take input from the user(automated program). However the form contains database connection settings that program uses. Currently the program needs the user to press a button to start the process (code is associated with the button). Do i need to convert whole app to Console App or is there an easier way to automate this process without messing with the database connection settings.
Right now, you have a WinForm that runs code on a button press. You need to turn this into a "headless" or automatic process. Here is what I think based on your description would be the best things to do:
Remove the button, and have the code that was being ran by the button be called by a more "automatic" process, such as "Form_Load" or a timer.
Take the code and move it into a console app. As long as you don't ask for user input within the logic, it will run and close itself when it's done.
However, this is just some broad and generic suggestions. You need to look at your code and decide for yourself what to do.

finding type of a dll functions ? how to see them? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am developing a .net program that needs to communicate with a magnetic card reader/writer.
it has a DLL but i couldnt find its functions and the producer company told me that i have to use only with serial port commands.
In its manual, there is some commands that has been explained not clear enough ! I tried to use them but i couldn't get any response for non of commands.
Does any body has experience with card reader devices ?!
Is there any handshaking or initialization i need to set ?!
My card reader model is : Skankyo 6940
As said Dennis asking a vendor and reading its docmentation is more productice and most accurate way you can approach to work with the library .
Alternatively you may think of using: DUMPBIN.EXE utility, to dump all export functions of that (presumably C) dll. I repeat,in this way is much harder then reading a documentation, but, yes, you can also find some "hidden gems".
Hope this helps.

Simulate A Gamepad Input With C# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'll simplify the situation to get rid of confusion.
I want to make a program that only has 1 button in the program. Upon clicking the button, the program will simulate a generic gamepad button. I'm sure when the program starts, it will have to somehow emulate a gamepad. The gamepad that is being emulated should be visible in the Control Panel. (joy.cpl to be more specific)
I have to do this without making a driver or relying on a 3rd party library/API- I know it can be done this way since I've seen some programs that actually do this already but my program will have a completely different use than those. I cannot find any good information on where to start, so pushing me in the right direction would be nice or showing me some code in C# would be cool, too!
Thanks, guys!

How to read barcode from ASP.NET? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm not sure, is this possible or not? I want to scan barcode from within ASP.NET website. Anyone know how to do this?
You would need a scanner and the relevant software to interact with the scanner. Most hand held scanners simply output the text into whatever field is in focus, so this could be Notepad, Word, or even a textbox in your app.
Best approach is to find a scanner that suits your needs and then look into the Driver software it provides.
The simplest way would be to use Flash to gain access to a user's web cam and have them place the barcode infront of the camera. I'm sure Silverlight can do this as well.
No matter how you cut it, though, you're going to need to use some sort of third-party control, whether Flash/Silverlight, Java applet, or browser extension/addon.
An alternative would be to use a specific brand of barcode scanner whose software can insert the results into an arbitrary textbox.

Categories