Questions tagged as 'winforms'

3
answers

C # - Close Form without Stop Application

Hello, I'm using C # to create a login system. And I would like to know some formula to close this login window without stopping the application. I used this.Hide (); to hide the form, but when closing the program it keeps running only hidden. C...
asked by 16.03.2017 / 03:30
2
answers

Which .NET should I use?

I will start developing a program with C # using WinForms (Basic Agenda with MySQL) and it is my question to use framework . This program may be available on other computers and I do not know which Windows might be installed. What aspects...
asked by 10.02.2017 / 04:40
1
answer

Single instance of Class C #

I have a Windows Form with the following code: public partial class frmCadastroPessoaFisica : Form { public frmCadastroPessoaFisica() { InitializeComponent(); } } I would like to create only one instance of this form....
asked by 15.07.2016 / 14:14
2
answers

How to compare two string marking the differences?

Let's say I have strings : Oi, meu nome é ítalo and Olá, meu nome é ítalo How to generate a + result - like this: Hi , my name is Italo Hello , my name is Italo The system should mark somehow the part of s...
asked by 27.09.2017 / 02:23
4
answers

Button with pause function

I have a small application that inserts images into the database. There are many images and sometimes I need to stop the execution for a period and continue at another time so as not to disturb the work of the client. Anyway, my application i...
asked by 30.01.2015 / 12:28
2
answers

Refresh the label without crashing the program

I need to update my label at all times when I use timer it updates, but it crashes the program Program.cs public static String Uso() { ManagementClass mc = new ManagementClass("win32_processor"); ManagementObjectColle...
asked by 11.11.2015 / 18:04
2
answers

How to display the total rows of a table in a label

I do not know how to pull the total rows of a table, code: public string Eventos { get; set; } SqlCommand comando = new SqlCommand("SELECT count(*) FROM Active", conn); SqlDataReader leitor = comando.ExecuteReader(); while (leitor.Read()) {...
asked by 26.09.2017 / 18:08
2
answers

How to count .xls / .xlsx files in the folder with C #?

I have a FolderBrowserDialog and when I select the folder it shows the files quantity (all, without filter). How do I do this length only with Excel files (.xls, .xlsx). The following is the code below: FolderBrowserDialog fbd = new Fol...
asked by 29.08.2014 / 15:21
2
answers

How do I get the value of a ListBox from the selected index of another ListBox?

I'm trying to get the value of a ListBox from the selected index of another ListBox , but it does not work. What I have until the present moment: for (int i = 0; i < 10; i++) { Lst_ListBoxA.Add(2 * (3 * i) * 4); Lst_Lis...
asked by 26.05.2014 / 02:07
2
answers

How to transform a method into a class?

I have the following in a form: public form1() { InitializeComponent(); this.FormClosing += new FormClosingEventHandler(this.confirmarFechamento_FormClosing); } private void confirmarFechamento_FormClosing(object sender, FormClosingEve...
asked by 21.03.2014 / 05:23