Questions tagged as 'winforms'

1
answer

Mask for Formatting TextBox

I was practicing programming in a WinForms project, so a question arose: How to apply a phone mask to a TextBox . So the first thing that came to mind was to use the KeyPress event of the component. The logic of the code was simple, belo...
asked by 22.08.2018 / 18:24
1
answer

Connection Problem with MySQL - Connection must be valid and open

I have a problem in a Windows Form in C # that uses DataGridView . The following is done: When clicking on a row in the dataGrid the information of the respective row, saved in a database, should appear in a group of TextBoxes and from it...
asked by 11.11.2016 / 17:12
3
answers

How to replace the number of letters of a word with a character?

I'm doing a hangman game, let's suppose I type the name "john" in a text box, shortly after I press a button and I want it in the "text 2" box to appear " _ _ _ _ ", then I want the same number of underlines to appear as the number of letters....
asked by 03.06.2017 / 20:40
2
answers

What code should be used to focus on a TextBox?

What code should be used to focus on a TextBox? I am creating a system, where it is necessary that when the client press ESC, the focus of the textBox is lost. How do I do it?     
asked by 03.07.2017 / 19:27
2
answers

How do I close / close a msgbox via code?

I tried to find out how I could do this, but I did not find anything clear. I want to know if it is possible to close the first msgbox , just after 2 seconds . Follow the Code: MsgBox("Iniciando Conexão Com a Impressora Fiscal", MsgB...
asked by 16.02.2015 / 12:54
3
answers

Console, WindowsForm or MVC which is the fastest for heavy loads?

I'm developing a program that will basically have the following cycle: Query in the database (some milliseconds) For each record, you will execute the following process: Início | Parse de um XML web (alguns milisegundos pra executar) |...
asked by 08.10.2016 / 02:13
1
answer

How to make an element disappear after it is used?

How to make an element disappear after being used for example:    When clicking on a button it disappears and something like a ListBox appears? Ps1: If the question is confusing, let me know Ps2: If you can tell what to do for the butt...
asked by 11.05.2017 / 13:23
1
answer

How do I toggle the rows of a report with custom Crystal Reports and C # winforms colors?

In the report I'm doing, I've already been able to toggle the colors by doing the following: Menu Access: Crystal Reports - Report - Section Expert Select the section Details and click on the Color...
asked by 22.12.2016 / 18:26
4
answers

How to display data from 2 tables in a grid?

I am developing an application using Windows Forms and wanted to be able to display data from 2 tables in a ggrid, by the SQL command I can do this SELECT SU.SUBCATEGORIAID, SU.NOME, SU.CATEGORIAID, C.NOME FROM SUBCATEGORIA SU INNER JOIN CAT...
asked by 21.06.2016 / 00:01
2
answers

How to save program, database, or configuration file settings?

In my application, the admin user can make some settings, for example: Set whether you want to use certain product templates, or leave it open for the end user to type. Configure whether to use TIPE table, or whether NCM will be open for t...
asked by 18.10.2016 / 12:19