Questions tagged as 'windows-forms'

1
answer

How to validate text boxes, which only supports numbers

I have 3 text boxes where I should only enter numbers and if a letter is written simply do not show it, as if I had not typed it. For Windows forms private void TBCausacion_KeyPress(object sender, KeyPressEventArgs e) { }     
asked by 15.08.2018 / 00:32
1
answer

Elements within a user control in C #

Good morning, I am developing an application in C # and I am working with Windows Forms, in which I am using User Controls to be able to use the main menu that I defined as shown in the following photo: In the menu that displays to p...
asked by 17.08.2018 / 20:50
1
answer

How to make a Foreach in a SQLite DataReader?

I'm trying to get the data from an SQLite query and then save the fields in a list and show them to the user through a MessageBox. I have two problems: 1) I do not know if what I'm doing is fine. 2) I do not compile the code, and I do not know w...
asked by 26.06.2018 / 04:14
1
answer

How to show names of a list in a MessageBox?

I have the following problem: I am trying to show the names stored in a list in a MessageBox but the names come out on top of it and not in the center where I want them to be. I attach a photo. As you can see, the Salmon Salmon names that...
asked by 28.06.2018 / 04:08
1
answer

How to store product names in the Database in variables and then display them in a WindowsForms MessageBox?

I have the following code that is executed when you click on a button that has the caption "CLOSE TABLE". What the code does is erase all the info from that table in the database! So far it's fine. What I need now is that before I delete them I...
asked by 26.06.2018 / 01:15
1
answer

Re-activate a disabled button C # Windows Forms

Hello first of all I am a beginner programmer (student) I am doing the game of the hangman, and my question is the following, I made the code with a method and an "if" condition so that when pressing each button this will be deactivated and will...
asked by 25.06.2018 / 10:29
1
answer

I can not add rows to a datagridview

I have a problem adding new rows to a datagrid I get the following error: "Can not add rows programmatically to the collection of DataGridView rows when the control is bound to data" The code I use to add rows is this: dataGridView1.Rows....
asked by 26.04.2018 / 18:04
1
answer

Open a form from another Form in a C # Panel

I'm doing a program with Visual Studio 2015, it's a Windows Form project with a pretty good UI design, which allows you to open a Form within a Panel without opening it in a new window. That causes me a problem, because for example...
asked by 06.05.2018 / 17:37
2
answers

How can I save and then read UserControl that were created dynamically, at run time? in C #, WindowsForms

I need to know how and where is the most optimal way in which I can go GUARDING controls (Buttons, Layouts, Label etc) , and mainly also UserControl that were created in time of execution. The funny thing is that ONCE THE PROGRAM I...
asked by 17.06.2018 / 06:27
1
answer

Color in Row DataGridView when Check box CheckBoxColumn, C #

I am giving color to the row of DataGridView if the cell box is selected, I have created a function which I invoke in the event CellValueChanged of DataGridView works fine, but only when it is the user that check the box, i...
asked by 28.02.2018 / 20:25