Click here to Skip to main content
15,893,663 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Creating Setup Problem Pin
Dave Kreskowiak12-Aug-14 2:44
mveDave Kreskowiak12-Aug-14 2:44 
GeneralRe: C# Creating Setup Problem Pin
Member 1094435912-Aug-14 3:50
Member 1094435912-Aug-14 3:50 
GeneralRe: C# Creating Setup Problem Pin
Dave Kreskowiak12-Aug-14 3:54
mveDave Kreskowiak12-Aug-14 3:54 
Questionc#.net Pin
naralasaimanoj11-Aug-14 17:36
naralasaimanoj11-Aug-14 17:36 
AnswerRe: c#.net Pin
Dave Kreskowiak11-Aug-14 18:06
mveDave Kreskowiak11-Aug-14 18:06 
AnswerRe: c#.net Pin
Pete O'Hanlon11-Aug-14 20:14
mvePete O'Hanlon11-Aug-14 20:14 
AnswerRe: c#.net - Use MSI Package installer Pin
Swinkaran11-Aug-14 21:04
professionalSwinkaran11-Aug-14 21:04 
AnswerRe: c#.net Pin
V.12-Aug-14 0:18
professionalV.12-Aug-14 0:18 
GeneralRe: c#.net Pin
OriginalGriff12-Aug-14 0:22
mveOriginalGriff12-Aug-14 0:22 
GeneralRe: c#.net Pin
Richard Deeming12-Aug-14 2:26
mveRichard Deeming12-Aug-14 2:26 
GeneralRe: c#.net Pin
OriginalGriff12-Aug-14 2:32
mveOriginalGriff12-Aug-14 2:32 
QuestionC# Tutor, Sunshine Coast, Qld, Australia. Pin
Kenny__K11-Aug-14 13:43
Kenny__K11-Aug-14 13:43 
AnswerRe: C# Tutor, Sunshine Coast, Qld, Australia. Pin
Kenny__K28-Aug-14 15:14
Kenny__K28-Aug-14 15:14 
AnswerRe: C# Tutor, Sunshine Coast, Qld, Australia. Pin
Thanks787228-Aug-14 19:59
professionalThanks787228-Aug-14 19:59 
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 

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.