Most voted "winforms" questions
Winforms is the informal term given to Windows Forms, is a graphical interface application included as part of Microsoft . NET Framework. Winforms provides native visual access to Microsoft Windows window interface using existing Windows API in managed code.
Learn more…1,192 questions
Sort by count of
-
35
votes8
answers45010
viewsWhat is the difference between C# and ASP.NET?
What’s the big difference about ASP.Net and C#? I program in C# for desktop, but I can’t understand. C# para desktop (Windows Forms Application) is identical to the C# used in web programming? And…
-
29
votes2
answers12489
views -
17
votes1
answer2946
viewsHow are applications made in C# Windows Forms updated, with version control?
What would be the step by step of such update so that the software after going through some change or update this is reflected to the systems that have the same software?
-
15
votes3
answers361
viewsIs it correct to call a method, and pass your null parameters?
For example, I have the event of click of a button calling the method below: //Evento this.serviçoToolStripMenuItem1.Click += new System.EventHandler(this.Nivel_Serv_Click); //Metodo private void…
-
15
votes8
answers2223
viewsError: not all code paths Return a value
I would like to understand why my code is causing the error not all code paths Return a value using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using…
-
14
votes6
answers14419
viewsWhich database should I use in a small desktop application?
I read a bit about the Meta and I thought that this question does not escape much from the current rules of the site. Risking losing reputation, come on: At the moment I work in a small company that…
-
13
votes7
answers10092
viewsHow to make child form change values in parent form C#?
I have a register in C#. There is a "street search" button that opens a form search child. When executing the search, displays the result in the datagrid that form son. I would like the event…
-
13
votes4
answers590
viewsInteraction between forms?
In my program, I inserted a button and a panel. When the button is clicked, logic inserts another form into the panel superimposing the form initial. In the form2 that appears has a return button,…
-
12
votes2
answers732
viewsHow to leave an invisible Tabpage inside a Tabcontrol?
How can I leave a certain invisible Tabpage inside a Tabcontrol ?
-
12
votes4
answers750
viewsHow to limit the resources used by the system?
I have a loop loop that makes several iterations and has in its scope calculations that require a lot of processing. The problem is that when executing the code snippet, the use of the processor…
-
11
votes4
answers160
viewsHow can I make a string code work with > or <?
Apparently I’m having problems with strings: public partial class Form1 : Form { private int _adicionar; private int _retirar; public Form1() { InitializeComponent(); } private void…
-
11
votes2
answers359
views -
11
votes1
answer125
viewsApplication C# Windows Forms Slow on certain machines
Good afternoon, I performed the migration of an application that ran in a windows ce to desktop, the Application uses Sql Server Compact 4.0. and runs very well in the development environment, I…
-
10
votes2
answers73740
viewsHow to access the print screen image?
When we hit the button Print Screen from our keyboard, the screen image is saved in some cache, in memory, somewhere, because when we give Ctrl V after, in Paint for example it trims, how to access…
-
10
votes2
answers440
viewsExport Reportviewer report to CSV
In the Reportviewer using Winforms, when creating the report I only have the option to export to PDF, Excel and Word and need to add the option to export in CSV.
-
9
votes2
answers282
viewsIs there a way to save types not listed in Settings.Default?
In a Windows Forms application I can create configuration properties. However there is the type List<T> or Dictionary<TKey, TValue>. By clicking on "Browse" and searching on mscorelib…
-
9
votes1
answer17765
viewsFill Data Grid View with object property
I have a form where I need to fill out a DataGridView with data from a user list. To generate this data, I used 3 classes: User class namespace TesteDataGridView { public class Usuario { public int…
-
9
votes3
answers382
viewsDesign Standard for Filters
First, filter in my current context is a list of objects to be used in Combobox type controls so that the user can choose from among the options. My scenario is this: Screen 1 - Has filters of…
-
9
votes4
answers810
viewsSQL LIKE clause does not work with Sqlparameter
Following the recommendation that the @Maniero fez in that question I decided to parametrize the darlings SQL of my program. Behold: private void btnConsulta_Click(object sender, EventArgs e) { if…
-
8
votes3
answers7123
viewsDisable windows form maximize and minimize
I need a solution to disable the maximize and minimize buttons of a windows form. Using WPF these two attributes would solve: WindowStartupLocation="CenterScreen" ResizeMode="NoResize" But now I…
-
8
votes1
answer3472
viewsUnable to connect to remote server - When consuming C#webservice
I have an application developed in C# that consumes a webservice also in C#. In some cases (not always and not everywhere/customers) when consuming the webservice i get the following error: Unable…
-
8
votes1
answer112
viewsCan you use a dialog to open both folders and files?
Well, I’m using the openfiledialog to open files, however the software needs to receive files or folders, because it compressed and zipped (.zip) and then make a symmetrical cipher. I have searched…
-
8
votes1
answer1947
viewsHow to drag form without border?
I’m trying to implement a way to drag my form no edge while clicking and holding down the left mouse button on it, however I did not succeed. Below follows the example of my attempt at…
-
8
votes2
answers268
viewsShoot event only once
I’m doing an interface in Visual Studio 2015, how do I hold an event just once? For example: private void textBox5_Click(object sender, EventArgs e) { textBox5.ForeColor = Color.Black;…
-
8
votes1
answer305
viewsImpact of the Garbage Collector
The project here of the company is done in Windows Forms and we do not manage memory very well, because it is a legacy system that has several years running. Currently we are facing problems with…
-
8
votes1
answer290
viewsProgressidialog in C#
I’m trying to create a form similar to Progressdialog on android, in C#.. The idea would be that this would happen: //criar o controle na thread principal frmWaitingProgress fl = new…
-
7
votes3
answers1552
viewsHow to download an image from the internet with C#?
For example, I need to download a sequence of images: http://www.simepar.br/site/fragmentos/radar/simepar_24.gif http://www.simepar.br/site/fragmentos/radar/simepar_23.gif…
-
7
votes3
answers9362
viewsHow to get the value without a mask from a Maskedtextbox?
I’m wearing a MaskedTextBox for formatting documents. It is working perfectly, but how do I get the value typed in the field without the mask being present?
-
7
votes3
answers15498
viewsC# dynamic COMBOBOX (SQL BD table data)
I need to load a combobox with the data from an SQL DEPARTMENT table (with code and description/ the description is displayed in the combobox but what is caught is the code) I used a datasource (the…
-
7
votes4
answers4198
viewsHow to save and upload data from a . txt to a gridview?
It’s been two days since I’ve been looking for help for my problem, but everything I think doesn’t fit. I’m doing a simple program, as if it were an agenda, where I put all the records of my store.…
-
7
votes1
answer657
viewsSave files from a Datagridview
I would like to know how to get all the content that was passed to a Datagridview and save it in an Excel file. So far I have it: private void btnDiretorio_Click(object sender, EventArgs e) {…
-
7
votes1
answer1161
viewsC# Winforms - Autocomplete (filter) combobox when typing
I have a Combobox (cmbBairro) with the names of the neighborhoods of my city, which carries the values of a List (_Listneighborhoods). When the user tries to search a neighborhood by typing, he…
-
7
votes2
answers1066
viewsListview or Gridview in Windows Forms
I’m studying about Windows Forms Aplication. I made a tutorial where Listview is used to display the data of a query according to the parameters passed. But I noticed that you also have Gridview for…
-
7
votes1
answer481
viewsPopulate aggregate class from datatable using a Dataset with LINQ C#
I’m having trouble filling an aggregate class in C#. Is it possible using LINQ? Does anyone have any example of how to solve this problem using the return of a DataTable or DataSet? public class…
-
7
votes1
answer272
viewsFill in a collection type property
Good personal evening how to fill a collection property using this type of structure in a class: public class Order { public string orderNumber {get; set; } public DateTime orderDate {get; set; }…
-
7
votes3
answers2024
viewsKeep application (Windows Form) open in icon tray with C#
How to do that when closing the application (either by close button, ALT F4, or any method other than the process manager), the application continues running in the Windows icon tray: And it is very…
-
7
votes2
answers1573
viewsHow to access next and previous record with C# using Entity Framework
I am developing a Windows Form application, with Entity Framework 6 + Mysql. As is common in systems, I have in each form navigation buttons (First Record, Previous Record, Next Record, Last Record)…
-
7
votes1
answer589
viewsModify visual element by another thread
I want to define by a Thread the content in a Richtextbox but I get an error saying Cannot make calls from another thread distinguished from the same Textbox I have heard that it is possible to use…
-
7
votes2
answers642
viewsError while trying to update table using C#
I created a form to change a table, but my update is not working. cnxCli.sel =/*"set dateformat dmy \n"+ */ "update Cliente" + "set Nome = '" + txtNome.Text +"'," + "Rg = '" + mskRg.Text + "'," +…
-
7
votes2
answers2411
viewsCount how many pixels of a color the image has
I am working on a solution for tattoo studios. I would like to know how it would be possible to determine how many pixels a certain color exists in the image inserted in pictureBox1. In this image,…
-
7
votes2
answers355
viewsHow to use Windows Forms components in a WPF application?
Is there any way to use Windows Forms components in WPF? For example, I need to use control Chart or the MaskedTextBox from Windows Forms, which does not exist in WPF applications, as I could use it…
-
7
votes1
answer1263
viewsApp.config how to use`Connectionstring` encrypted
In my app.config I have a section that for my String connecting: </configSections> <connectionStrings> <add name="Azure.Onee"…
c# winforms cryptography connectionstring app.configasked 8 years, 2 months ago Thomas Erich Pimentel 3,059 -
7
votes3
answers190
viewsConsole, Windows Forms or MVC what’s the fastest for heavy loads?
I’m developing a program that will basically have the following cycle: Database query(some milliseconds) For each record will perform the following process: Início | Parse de um XML web (alguns…
-
7
votes2
answers808
viewsHow to save program settings, database or configuration file?
In my application, the admin user, can make some settings, for example: Configure if you want to use specific product templates, or stay open for the end user to type. Configure if you want to use…
-
6
votes4
answers438
views"Clean" way to modify the "Visible" attribute of a Picturebox
I have 5 background images for my application and that will be visible to the user’s taste. What is the simplest way (clean code) to get the user to choose? private void…
-
6
votes3
answers1504
viewsCopy file with progress
How I use the C function# File.Copy(string path); to copy a file by incrementing a value in a Progressbar?
-
6
votes1
answer1790
viewsDisable dates before the current day in Datetimepicker?
It is possible in the DateTimePicker, disable the days before the current day?
-
6
votes2
answers513
viewsMonetize Windows Forms C#?
Hello, sorry not to be a question directly linked to a language, but I searched a lot and did not find, anyone knows any library like Ad Mediator to be used in Windows Forms? How do I monetize/place…
-
6
votes3
answers13362
viewsHow to remove whitespace from a text?
I was trying to get blanks out of a string, but the .Trim() does not work, it displays the white spaces yet: var teste = texto.Trim(); txtConteudo.Text = teste; For example, if he receives: "text ",…
-
6
votes1
answer71
viewsWhy can’t I display Messageboxbuttons if it’s not a string?
'Cause I’m having trouble showing off MessageBoxButtons if it is not a string? static void Main() { string texto = "Minha primeira MessageBox"; MessageBoxButtons botao = MessageBoxButtons.OKCancel;…