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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
N

naouf10

@naouf10
About
Posts
17
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to multiselect DataGridView rows without pressing CTRL key in c#?
    N naouf10

    I am new to c# and using windows forms. I have a DataGridView control on a form and I need to allow a user to multi-select rows (when they click on a row) without using the CTRL key (no keyboard is available - they are using a touch screen) and without using check box column. I have enabled the mutli-select property. Please help me how to do that, Thank you

    C# csharp winforms help tutorial question

  • How do I read data from USB Virtual COM in C#?
    N naouf10

    Thank you alot, I will consider what you have said.

    C# question csharp com help

  • How do I read data from USB Virtual COM in C#?
    N naouf10

    @ Gerry Schmitz . Thank you for your good information. yes both the SerialPort (class) and the Caller ID have the same settings. maybe your ideas will work but I have to modify my code first. Can you please tell me how to do the following in my code: -

    .BytesToRead() call

    - how to sleep before trying? - how to insure my "timeout" settings are high enough. I don't have TimeOut in my code. Please help me so I can modify my code. Thank you

    C# question csharp com help

  • How do I read data from USB Virtual COM in C#?
    N naouf10

    @ OriginalGriff. I tested the caller Id in different PC (PC2) which has EPOS and this EPOS could display the phone number so it means the port receives data when phone rings therefor I tested my C# code in PC2 and still my app didn't receive data from COM port although EPOS can read data from same port. any idea?

    C# question csharp com help

  • How do I read data from USB Virtual COM in C#?
    N naouf10

    @ OriginalGriff . I will try your idea and see what happens, I will let you know . thank you

    C# question csharp com help

  • How do I read data from USB Virtual COM in C#?
    N naouf10

    @

    Gerry Schmitz

    . I tried to read the port into a string but the string still empty, I debugged the program and I noticed that the DataReceived event did not got fired. Does it mean the port did not receive any data ? plseae help

    C# question csharp com help

  • How do I read data from USB Virtual COM in C#?
    N naouf10

    I searched for a solution on the internet but no luck. I am using windows form with Serial Port control and richTextBox. I am trying to read the phone number from caller ID device (CTI comet caller ID) which decodes the Caller's telephone number from the telephone line and presenting it on a virtual COM5 Port of my PC because the Caller ID is a COM device. The caller ID is connected to my PC via USB to COM Adapter because my PC doesn't have physical COM ports. Also the USB to COM Adapter driver is installed well .Note that the telephone line supports the caller ID feature. When the phone rings the phone number should show up in richTextBox, I tried the following code but nothing happens (phone number did not appear) Am I missing something?. My question: How can I read data from virtual COM5 port in C#? Please help me to modify this code to make it work. Thank you

    public partial class Form1 : Form
    {
    public SerialPort mySerialPort = new SerialPort("COM5");

    public Form1()
    {
        InitializeComponent();
    
        mySerialPort.DataReceived += new SerialDataReceivedEventHandler(DataR);
        mySerialPort.Open();
     }
    
    public void DataR(object sender, SerialDataReceivedEventArgs e)
    
    {
    
        if (richTextBox1.InvokeRequired)
         {
             richTextBox1.Invoke(new SerialDataReceivedEventHandler(DataR), sender, e);
         }
    
         else
         {
    
            richTextBox1.AppendText(mySerialPort.ReadExisting()); //recieve data in real time.
    
          }
      }
    
    
    private void serialPort1\_DataReceived(object sender, SerialDataReceivedEventArgs e)
    {
    
    }
    

    }

    C# question csharp com help

  • How can I include house address finder in my application?
    N naouf10

    Customers can phone in to make an order and their order will be saved and printed out and delivered to their home :) so this EPOS does not have internet access. So that is why I am wondering how this EPOS can find the address from the postcode although there is no internet access nor address database in the PC? but this PC has Ms MaPPoint and some C# APIs. Do you have any idea how possibly the PC can find the address? Thank you

    C# help question csharp tutorial

  • How can I include house address finder in my application?
    N naouf10

    Thank you Gerry for this information but as I understood from your explanation that I have to use online services ( PAF database and PCA Predict web services) to search for the address (list of street names and and house numbers) by its Postcode. Am I right? I asked you this because I don't want to use online service as my EPOS will not have internet connection. In the UK, most of EPOS don't use online services to locate addresses. Yesterday I check one computer which contains EPOS which can do address lookup but there is no address database in this PC and on the same time this PC has not internet connection But it has MS MapPoint and it has some Postcode APIs. So how this PC find the full address? does it use MapPoint to find address ? Please help me I am confused, I would appreciate it if you answer my questions? Thank you

    C# help question csharp tutorial

  • How can I include house address finder in my application?
    N naouf10

    Hi Gerry and thank you for your reply. yes this app for myself, my EPOS will be free for some time and then will be sold for very cheap because my app is new. Therefore I might cost too much to buy an address finder app. I can not find any address database in the internet. Can you please guide me how can I access this address finder APIs / data? or do I have to develop address finder as you did? please help me. Thank you

    C# help question csharp tutorial

  • How can I include house address finder in my application?
    N naouf10

    I am building EPOS system (takeaway order software) with C# and everything went as I planed and I almost done programming it. The application works where customers provide their Postcode when they want to order something and based on their postcode I should get a list of street names and when I select the street name I get a list of house numbers, then select the number to deliver the food to. I noticed that all nowadays takeaways use this address finder which included in their EPOS which works with no need for internet connection. Now the problem is: know do I build / include this address finder in my EPOS system? I do not want to use online address search in my EPOS. Do I have to use another special application to like address finder? I am really stuck at this point and I can not go further programming my POS till I solve this address finder issue. Please help me with any peace of information you know in how to solve this issue. Thank you

    C# help question csharp tutorial

  • How do I pass data from child of child form to parent form in C#?
    N naouf10

    Hi . nothing wrong but i am new to c# and i have to study the events and property then i will test the code. yes i will try to use form and user control instead, thank you

    C# question csharp winforms help

  • How do I pass data from child of child form to parent form in C#?
    N naouf10

    Hi, thank you for the help, I will have to study the properties and events then i will test the code written in the answer. thank you

    C# question csharp winforms help

  • How do I pass data from child of child form to parent form in C#?
    N naouf10

    I am new to c#. I have the following in my project in windows forms: Form1 with button and DataGridView. Form2 with button. Form3 with button and 3 textBoxes. In form1, I click buttonOpenForm2 form2 pops up. Then in form2 I click buttonOpenForm3 form3 pops up which has 3 text boxes and button. Now the 3 forms are open. now in form3, I enter values in textBox1, textBox2 and textBox3 and when click buttonAddRow ( from form3) I want these values to be inserted into the DataGRidView in Form1. My question is: How can I add a row into DataGridView in Form1 ( parent) from form3 (child of child form) WITHOUT closing form2 and form3? I mean I want to pass the data while form2 and form3 are still open. Please help me. Thank you

    Form1:

    public partial class Form1 : Form
    {

    public Form1()
    {
        InitializeComponent();
    
    }
    
    private void buttonOpenForm2 \_Click(object sender, EventArgs e)
    {
        Form2 frm2 = new Form2();
        frm2.Show();
    }
    

    }

    Form2:

    public partial class Form2 : Form
    {
    public Form2()
    {
    InitializeComponent();
    }

    private void buttonOpenForm3 \_Click(object sender, EventArgs e)
    {
        Form3 frm3 = new Form3();
        frm3.Show();
    }
    

    }

    Form3:

    public partial class Form3 : Form
    {
    public Form3()
    {
    InitializeComponent();
    }

    private void buttonAddRow \_Click(object sender, EventArgs e)
    {
        //What to write here to insert the 3 textboxes values into DataGridView?
    
    }
    

    }

    C# question csharp winforms help

  • How to set TextBox to only accept numbers?
    N naouf10

    I have already checked other questions here but the answers are not related to my issue. the following code allows textbox1 to only accept numbers if the physical keyboard (laptop) is pressed: private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { char ch = e.KeyChar; if ( !char.IsDigit(ch)) { e.Handled = true; } } but this is not what I wanted (I dont use physical laptop keyboard). I have windows form with buttons and a textbox1. I designed keyboard and it works well but I want textbox1 to only accept numbers and the ".". There are only two lines of code inside each button (and only code in the project) which is: private void buttonName_Click(object sender, EventArgs e) { // each button only has this code. textBox1.Focus(); SendKeys.Send(buttonName.Text); } I know how to set textbox to accept numbers if the physical (laptop ) keys are pressed but here in this case I have windows form with control buttons ( each button to print its text into textbox1) and I want to set textBox1 to only accept numbers and the ".". Please help in how to achieve this. Thank you

    C# help tutorial question

  • How to design a keypad in C#?
    N naouf10

    I am new to C# and I am planing to design my own keypad but I don't know how/where to start, I have 4 textBoxes the keypad buttons. The first problem came into my mind was: how can I detect the cursor location (which textBox is the cursor in?). So for example if I had only one textbox then it is easy I could write inside button1 : textBox1.text = "1" and inside button2 : textBox1.text = "2" and inside button_A : textBox1.text = "A".... and so on but I have 4 textBoxes and it is confusing. Can you please provide me with an idea or what to write inside each button to print its value in the textbox which the cursor is in. Thank you professionals.

    C# tutorial question csharp design help

  • How can I pass data to DataGridView from another form?
    N naouf10

    I just want to pass data to DataGridView from another form? I have 2 windows forms: - from1 contains DataGridView1 and button_frm1.The DataGridView have 3 columns and already have some data (6 rows) and DataGridView1 modifiers = Public. - form2 contains textBox1 and button_frm2. Now, when I click button_frm1 form2 appears and next when I click button_frm2 the value in the textBox should be inserted into DataGridView1 in column0 in the selected row. but instead, I got this error: "Index was out of range. Must be non-negative and less than the size of the collection". Please help me how to insert the textBox value from form2 into DataGridView1 in form1. What steps to follow? Thank you very much in advance. Here is the code I tried: Form1: public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button_frm1_Click(object sender, EventArgs e) { Form2 frm2 = new Form2(); frm2.Show(); } } Form2: public partial class Form2 : Form { public Form2() { InitializeComponent(); } private void button_frm2(object sender, EventArgs e) { Form1 frm1 = new Form1(); textBox1.Text= frm1.dataGridView1.SelectedRows[0].Cells[0].Value.ToString(); } }

    The Lounge help question css database winforms
  • Login

  • Don't have an account? Register

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