Questions tagged as 'winforms'

1
answer

How to apply 2 mascara in the same textbox windows form c #

I have 2 checkbox of person and company, and only a textbox . I want to select in% with% of individual, I want to apply the mask to CPF, or when selecting the legal entity, it applies the mask to CNPJ in checkbox . I do...
asked by 15.03.2018 / 18:29
2
answers

The property or indexer "Color.Name" can not be assigned because it is read-only

Here is the code where I define SegundaTela : public partial class Form1 : Form { SegundaTela telaSecundaria; } Code: telaSecundaria = new SegundaTela(); telaSecundaria.label_segunda_tela.BackColor.Name = cor_fundo; I get err...
asked by 05.12.2017 / 03:54
1
answer

How to display a Messagebox when selecting an item in the combobox

I would like to know how to implement in my combobox a Messagebox when selecting an item from the list? Example: Combo List: Junior Maria Joseph When you select Mary, a message box will appear stating: You have sel...
asked by 01.12.2017 / 14:12
2
answers

dataGridView1_CellDoubleClick does not work!

I have the simplest function in the world and I can not make it work. When giving 2 clicks on any cell in my datagridview I want it to display the message "1" but it is not working! What's wrong? See my code: private void dataGridView1_...
asked by 16.06.2016 / 01:27
2
answers

Create textboxes at runtime

I have a project that basically is a program that calculates the electricity consumption of various equipment that I am creating in VS2013. The problem is that since I do not want to put just one piece of equipment or a limited quantity, I wa...
asked by 27.06.2016 / 18:11
2
answers

Copy a List to another List without dependencies

How do I copy data from one list to another so that they are independent of one another? I have a < > of a class that I created where the data inserted in it, will appear in a listBox, and wanted to copy everything that is in that list to...
asked by 16.12.2016 / 01:39
4
answers

How to clear form fields in C #?

I'm doing a project for college, I created a GroupBox and inside it has RadioButton , Label , MaskedTexbox and TextBox . When I click the cancel button I cleaned MaskTexbox and TextBox and disabled...
asked by 18.01.2015 / 21:31
6
answers

Clear a datagridview in C #

I have tried all this already and nothing has served. All are excluding rows and columns. What I need is to clean up the content written on them. datagridview.datasource=null; datagridview.resetbindings(); datagridview.Rows.Clear() DataGridVie...
asked by 14.08.2014 / 20:54
3
answers

Do not allow space in maskedTextBox

No windowsforms what is the simplest way to avoid typing spaces in a maskedTextBox control?     
asked by 16.12.2014 / 12:47
2
answers

Form behind the Windows toolbar

What is happening and the following, when I configure the form in C # visual studio 2015 to maximize, the bottom of the form is behind the windows taskbar, how can I solve it? Follow the code: public class frmComissaoPic : Form { ......
asked by 27.10.2017 / 19:02