Click here to Skip to main content
15,884,176 members
Home / Discussions / C#
   

C#

 
QuestionSite not working on IE9 for production server Pin
nitin_ion10-Aug-14 23:03
nitin_ion10-Aug-14 23:03 
SuggestionRe: Site not working on IE9 for production server Pin
Richard MacCutchan11-Aug-14 0:37
mveRichard MacCutchan11-Aug-14 0:37 
AnswerRe: Site not working on IE9 for production server Pin
Dave Kreskowiak11-Aug-14 3:07
mveDave Kreskowiak11-Aug-14 3:07 
AnswerRe: Site not working on IE9 for production server Pin
Pete O'Hanlon11-Aug-14 5:27
mvePete O'Hanlon11-Aug-14 5:27 
QuestionExcel.interop error Pin
Member 1098941510-Aug-14 20:28
Member 1098941510-Aug-14 20:28 
SuggestionRe: Excel.interop error Pin
Kornfeld Eliyahu Peter10-Aug-14 20:47
professionalKornfeld Eliyahu Peter10-Aug-14 20:47 
AnswerRe: Excel.interop error Pin
Richard MacCutchan10-Aug-14 21:29
mveRichard MacCutchan10-Aug-14 21:29 
QuestionProblem with my C# code for Motorola MC5574 barcode reader Pin
Jaspar Lamar Crabb10-Aug-14 11:26
Jaspar Lamar Crabb10-Aug-14 11:26 
I've started a small program for a motorola mc5574 barcode reader. The problem is that I've managed to make it read barcodes but it just read them once and then the readers stops working. Could someone look at my code and tell me where the problem is, thanks alot in advance.

C#
using System;
using System.Linq;
using System.Collections.Generic;
using System.Windows.Forms;

namespace inventering
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [MTAThread]
        static void Main()
        {
            Form1 frm1 = new Form1();
            Application.Run(frm1);
        }
    }
}


C#
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Symbol.Barcode2;



namespace inventering
{
    public partial class Form1 : Form
    {
        Barcode2 MyBarcode;
        

        public Form1()
        {
            
            MyBarcode = new Barcode2();
            MyBarcode.Enable();
            MyBarcode.Scan();
            MyBarcode.OnScan += new Barcode2.OnScanHandler(myBarcode_OnScan);
            InitializeComponent();
        }

        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {
            if ((e.KeyCode == System.Windows.Forms.Keys.Up))
            {
                // Up
            }
            if ((e.KeyCode == System.Windows.Forms.Keys.Down))
            {
                // Down
            }
            if ((e.KeyCode == System.Windows.Forms.Keys.Left))
            {
                // Left
            }
            if ((e.KeyCode == System.Windows.Forms.Keys.Right))
            {
                // Right
            }
            if ((e.KeyCode == System.Windows.Forms.Keys.Enter))
            {
                // Enter
            }

        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void label1_ParentChanged(object sender, EventArgs e)
        {

        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {

        }

        void myBarcode_OnScan(ScanDataCollection sd)
        {
            ScanData scanData = sd.GetFirst;

            if (scanData.Result == Results.SUCCESS)
            {
                

                // Write the scanned data and type (symbology) to the list box
                textBox1.Text += (scanData.Text + ";" + scanData.Type.ToString());
            }
            
            //MyBarcode.Scan();
        }

        private void label2_ParentChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {

            MyBarcode.Dispose();
            this.Close();
        
        }


    
    }
}

AnswerRe: Problem with my C# code for Motorola MC5574 barcode reader Pin
Richard Andrew x6410-Aug-14 16:08
professionalRichard Andrew x6410-Aug-14 16:08 
AnswerRe: Problem with my C# code for Motorola MC5574 barcode reader Pin
Bernhard Hiller10-Aug-14 21:41
Bernhard Hiller10-Aug-14 21:41 
AnswerRe: Problem with my C# code for Motorola MC5574 barcode reader Pin
Gerry Schmitz11-Aug-14 19:52
mveGerry Schmitz11-Aug-14 19:52 
Questiondownload webpage Complete Pin
Member 94738099-Aug-14 22:48
Member 94738099-Aug-14 22:48 
AnswerRe: download webpage Complete Pin
Richard MacCutchan10-Aug-14 1:51
mveRichard MacCutchan10-Aug-14 1:51 
QuestionRe: download webpage Complete Pin
Member 947380910-Aug-14 4:07
Member 947380910-Aug-14 4:07 
AnswerRe: download webpage Complete Pin
Richard MacCutchan10-Aug-14 6:09
mveRichard MacCutchan10-Aug-14 6:09 
AnswerRe: download webpage Complete Pin
Kornfeld Eliyahu Peter10-Aug-14 6:28
professionalKornfeld Eliyahu Peter10-Aug-14 6:28 
GeneralRe: download webpage Complete Pin
Member 947380910-Aug-14 18:32
Member 947380910-Aug-14 18:32 
QuestionRe: download webpage Complete Pin
Member 947380911-Aug-14 5:42
Member 947380911-Aug-14 5:42 
AnswerRe: download webpage Complete Pin
Eddy Vluggen11-Aug-14 7:06
professionalEddy Vluggen11-Aug-14 7:06 
QuestionRe: download webpage Complete Pin
Member 947380911-Aug-14 21:33
Member 947380911-Aug-14 21:33 
AnswerRe: download webpage Complete Pin
thatraja11-Aug-14 23:15
professionalthatraja11-Aug-14 23:15 
QuestionHow to process data asynchronous when (socket ) recieving data high frequently Pin
Peng20139-Aug-14 6:53
Peng20139-Aug-14 6:53 
AnswerRe: How to process data asynchronous when (socket ) recieving data high frequently Pin
Eddy Vluggen11-Aug-14 7:08
professionalEddy Vluggen11-Aug-14 7:08 
Questionngen in windows applications c# Pin
Zeyad Jalil9-Aug-14 2:03
professionalZeyad Jalil9-Aug-14 2:03 
AnswerRe: ngen in windows applications c# Pin
Dave Kreskowiak9-Aug-14 4:25
mveDave Kreskowiak9-Aug-14 4:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.