Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

Jan 1947

@Jan 1947
About
Posts
10
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Bluetooth set as com port in c#
    J Jan 1947

    Hi Richard Yes this is what I am using, but the event is never triggered. Serial port exists. thanks again regards John

    C# csharp com help question

  • Bluetooth set as com port in c#
    J Jan 1947

    Hi Richard great, yes this is how I use it, only I would like to use DataReceiveEvent. I will try to do it using the loop, may be this is the solution. Thanks you very much Regards John

    C# csharp com help question

  • Bluetooth set as com port in c#
    J Jan 1947

    Hi Richard I want to use Bluetooth connection and use it to communicate as serial port with to operate. Maybe I am asking for something which cannot be done appreciate you help regards John

    C# csharp com help question

  • Bluetooth set as com port in c#
    J Jan 1947

    Hi Richard maybe I have not been clear. I do not want to use the faulty driver as it has problems. This is why I like to use Scanner via Bluetooth and redirected to operate as com port. The Bluetooth driver is Microsoft and redirection is done via Windows 11, so no faulty driver to be used. regards John

    C# csharp com help question

  • Bluetooth set as com port in c#
    J Jan 1947

    Hi Richard. no errors, The Receive Data Event not working. the com port is in /foreach(string port in ports) / as well it shows as com port in Device Manager as 'Standard Serial over Bluetooth link (COM4)'. I use standard Serial port structure . It works as HID, when I scan barcode while in Note Pad ?!!?? In device manager I have its HID disabled. When I change the driver to do as com port, my software works. I have an issue with the com port driver supplied with the scanner, and this is the reason I like to change it. Regards John

    C# csharp com help question

  • Bluetooth set as com port in c#
    J Jan 1947

    Hi Guys me again, old man again ;) .. I have used Scanner set as com port and I like to change it to use Bluetooth, used as com port. I have register device and change it to use it as com port in Windows 11. I am using SerialPort and add

    SerialErrorReceivedEventHandler

    . This event never happens. I cannot find any suggestion. Can you help me please ? Regards John

    C# csharp com help question

  • Com port c#, windows form
    J Jan 1947

    thank you Gerry regards John

    C# help csharp winforms com

  • Com port c#, windows form
    J Jan 1947

    Hi Richard The error is, "Access to com port denied". as it is very hard to debug it but it happens on Open port call. I have done some changes, leave com port assigned and only remove or add SerialDataRceivedEventHandler. I feel it is still not the good way, but is working. regards John

    C# help csharp winforms com

  • Com port c#, windows form
    J Jan 1947

    Hi Garry thanks for your reply. As I was unable to find some example, this is how I have created. I feel it is not good way, as I done it, as there is a lot of areas which is unpredictable. I will try to see. what I can do. If you have some link to give me some link to example, will be very much appreciated. I fully agree with Napoleon and like the internet and Code Project, to learn. thanks for great help. Regards John

    C# help csharp winforms com

  • Com port c#, windows form
    J Jan 1947

    Hi Guys,
    I am not expert and will be glad to get some help. I wrote software, where I am using Barcode reader, com port, in number of Windows forms. I am switching receive data on Form Activation and disabling it on Form deactivated. it has worked well for number of months, but now I am occasionally get error, Com port is not accessible. Received I use Invoke.

        private void CheckForUsbDevice()
        {
    
            string\[\] ports = SerialPort.GetPortNames();
    
            // Display each port name to the console.
            foreach (string port in ports)
            {
                if ((port == "COM3") || (port == "COM4"))
                {
                    if (AcdStart.mySerialPort == null)
                    {
                        AcdStart.mySerialPort = new SerialPort(port)
                        {
                            BaudRate = 9600,
                            Parity = Parity.None,
                            StopBits = StopBits.One,
                            DataBits = 8,
                            Handshake = Handshake.None,
                            RtsEnable = true
                        };
                    }
                         AcdStart.mySerialPort.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler);
                    if (!AcdStart.mySerialPort.IsOpen)
                    {
                        AcdStart.mySerialPort.Close();
                        AcdStart.mySerialPort.Open();
                    }
                        PortTextBox.Text = (string.Format("Port {0}", port));
                    break;
                }
            }
        }
    
        private void RxPurchaseOrder\_Deactivate(object sender, System.EventArgs e)
        {
            if ((AcdStart.mySerialPort != null) && (AcdStart.mySerialPort.IsOpen))
                AcdStart.mySerialPort.DiscardInBuffer();
    
            if (AcdStart.mySerialPort != null)
            {
                AcdStart.mySerialPort.DataReceived -= new SerialDataReceivedEventHandler(DataReceivedHandler);
                AcdStart.mySerialPort.Close();
            }
            AcdStart.mySerialPort = null;
            PauseNow = true;
            this.BackColor = Color.LightSalmon;
        }
    
        private void RxPurchaseOrder\_Activated(object sender, EventArgs e)
        {
            if ((AcdStart.mySerialPort != null) && (AcdStart.mySerialPort.IsOpen))
            {
                AcdStart.mySerialPort.DiscardInBu
    
    C# help csharp winforms com
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups