Questions tagged as 'winforms'

2
answers

Doubt about how to position buttons

Images are for illustration only. What I need to do, is this: There are several buttons with their respective names, and can be called (clicked). I type the name of that button in the search game field and the rest of the buttons d...
asked by 03.05.2017 / 02:50
1
answer

How to choose the first form to be displayed?

When I run my project, fmPrincipal is always opened, however, I decided to create a fmLogin to be displayed first and the user to log in. How do I configure fmLogin to be displayed first?     
asked by 16.04.2017 / 17:25
3
answers

Call a form and close a form in the same event

How do I call a form and close a form in the same event. For example: private void iniciar_Click(object sender, EventArgs e) { Close(); Frm1 newForm2 = new Frm1(); newForm2.ShowDialog(); }     
asked by 12.03.2014 / 04:50
1
answer

How to break the line of a label automatically?

  .NET Framework 4.0 Visual C # = = I have a problem with labels , when I assign a value to the property text and this value is too large, it "breaks" its container, surpassing the borders, with that, the part that is out of bounds...
asked by 17.05.2014 / 00:28
2
answers

Is it wrong to put that amount of code in a button click event?

Is it wrong to put that amount of code into a button click event? private void CPeBTNSalvar_Click(object sender, EventArgs e) { try { if (CPeTBCodigo.Text == "") { throw new ExcecaoM...
asked by 22.07.2018 / 22:08
1
answer

How to detect when the mouse is pointing to a button

I have a form where certain actions will be executed only when a button btn has the mouse cursor on it, which button event do I use?     
asked by 13.04.2018 / 06:00
3
answers

What are the advantages of working with Fluent Interface with LINQ?

What are the advantages of working with a fluent interface with LINQ? I have this code: Employees.cs namespace LinqConsulta { class Empregados : List<Empregado> { public Empregados Lista() { this.Add...
asked by 07.06.2016 / 19:29
2
answers

Adjust the layout of the Form according to the resolution of the monitor

I made a form in fullScreen , where the monitor I use has 23 inches. But where the feature will be deployed, they use 19 ". When I ran, Form was not the smallest monitor size, and some components were cut. Is there any way to be re...
asked by 22.11.2017 / 14:41
4
answers

Currency style in a TextBox in WinForms

I need to put the text R $ in textbox so that it is in the following format:    R $: 1,200,58 I'm trying the following unsuccessful ways: textbox1.Text = Convert.ToDouble(textbox1.Text).ToString("C"); and textbox1.Text = De...
asked by 07.08.2014 / 14:05
2
answers

Search for a string anywhere in List C #

Good afternoon. I would like to know how to search for a given string anywhere in the list. Ex .: string "123". It can be in Pessoa.id , Pessoa.Nome , Endereco.id , Endereco.Rua or Endereco.CEP ; List of People...
asked by 13.10.2016 / 22:16