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
-
2
votes1
answer576
viewsHow to change the color of multiple textbox by looking at only one condition
I’m creating an app on VS2015 Windowsformaplication where I need to change the colors of textbox where the result is greater than, equal to or less than zero(0). This is how I’m working: if…
-
2
votes1
answer40
viewsShow user-selected date using Monthcalendar
I need that when a user selects a date a Messagebox appears saying: Your class has been scheduled for [date] private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e) {…
-
2
votes3
answers636
viewsLoad grid information in textbox in a form that is already open c# windows form
Hello I’m trying to do something that seems simple but I’m not getting, I want to click on a button add the data of a grid go to another form that is already open. the problem is that I am only able…
-
2
votes1
answer432
viewsPlay value from a grid that is in form to another grid in another form C# windows form
Hello I’m here with another situation requesting help because there is not yet found in the surveys. I have a form that I put a Gridview, the form has button to open another query form and when I…
-
2
votes1
answer226
viewsDoubt - Winforms on the subject on the second screen
Form1 created panel with black background and label property: Autosize = False Dock = Fill Font size(Size) = 20 And 2 buttons to forward or back letters Form2 only has a black form and a property…
-
2
votes1
answer87
viewsDynamically remove components in C#
Good evening, I’m trying to solve a problem I came across by dynamically trying to remove the picturebox I created: namespace WindowsFormsApplication8 { public partial class Form1 : Form { int count…
-
2
votes1
answer568
viewsCheck whether a COM port is connected or not
It is possible via code line to check whether a COM port is connected or not ? Analysis: I have a program PDV(Point of Sale) where the same has the integration with Sitef, through a Pinpad(cardboard…
-
2
votes2
answers460
viewsMethod to automate the call of Forms in C#
Here’s what I’m trying to do I am creating an application in C#, Mainframe is MDI Father, and I have other windows too. What I want is to use a class called "Formcaller" to call other Forms…
-
2
votes1
answer1087
viewsHow to validate Combobox?
I have a Form registration in which you have some fields TextBox and ComboBox, I want my code to allow the user to register only when all fields are filled, but it is only validating TextBox, thus…
-
2
votes1
answer98
viewsError creating an executable distribution with sql database using Entity Framework
I am developing a C# winforms desktop application in Visual Studio with Sql database through the Entity Framework. The intention is that it be a local database, the program will be installed on…
-
2
votes2
answers93
views -
2
votes1
answer51
viewsC# - Name of the instance property in a Datagridview
I have a class Produtos with the following attributes: public class Produto { public int cod { get; set; } public string codBarras { get; set; } public string nome { get; set; } public Categoria…
-
2
votes1
answer45
viewsDatagridview displaying incomplete id
The grid displays only the first character of the "ID" For example: if the ID is 16 it displays 1; If it’s 20 displays 2; However from 1 to 9 displays correctly... Code that selects the data...…
-
2
votes1
answer200
viewsHow to split the screen with 2 Open Forms within an MDI
Good morning to you all. I have a question about forms. In my application, I can open 2 forms with grids where they present factory information. Those Grids are updated every 30 seconds, and are…
-
2
votes1
answer199
viewsHow to get all 'Yamldotnet' values in 'File.yml'?
I’m working on a.yml file and I want to get all the values it contains in that file. I’m using the reference Yamldotnet.Serialization. What I want to do is take a certain value and display the…
-
2
votes1
answer86
viewsget the values of a generic list List<t>
My project Winforms C# has a form with a GridControl(gvDados) and a button Sue with an event Click(). Validation takes place in the event Click from the process button, through a method responsible…
-
2
votes2
answers709
viewsHow can I execute a function that is in another form?
I’ve got two presses, one of them I’ve got: namespace J13_Rouparia_CS { public partial class frmMain : Form { public static int LocPesq; public static string peqNume; public static string peqArti;…
-
2
votes1
answer1298
viewsError: Configuration system failed to boot
I am developing an application in C# and during development I came across the following mistake: In the archive: Settings.settings there’s a string which stores the user name. Apparently this may be…
-
2
votes2
answers73
viewsUse standard Form instance in another class
This is my class HotKey public class HotKey { private string nome; public HotKey(string nome) { this.nome = nome; } private void Start_KeyPressed(object sender, KeyPressedEventArgs e) {…
-
2
votes0
answers80
viewsPopulating an Existing Datagridview
Guys I have the following problem, I have a datagrid, in which I would like to insert more lines in it. - When the record is new Grid accepts normal, but when I edit it, it reports to me:…
-
2
votes1
answer43
viewsC# How to pass service and model to a search window
Hello, I have the following situation. A CRUD form calling another form (common or generic) to search for records... private void barButtonItemProcurar_ItemClick(object sender,…
-
2
votes4
answers737
viewsHow do I close the form I’m in?
private void BtnEntrar_Click(object sender, EventArgs e) { string login = txtLogin.Text; Conta conta = new Conta(); try { BLL bll = new BLL(); conta = bll.SelectContaByLogin(login); if(txtSenha.Text…
-
2
votes0
answers22
viewsGeneric method for updating Cross-thread error form
I have a form where you need to do several updates using the thread-safe calls for Windows Forms controls Snippets of code that do this repeat several times. Trying to refactor I created a kind of…
-
2
votes2
answers361
viewsExport large amount of data to Excel
I have a DataGridView where in it there is an average of about 50 thousand lines where these should be exported to an Excel file. But because of the huge amount of data the application simply…
-
2
votes1
answer95
viewsObject does not recognize member
All I do is in Python. One of the functions I have to do is a conversion, where she tries to convert the value of TextBox and if it goes wrong, run the error block. private void converter(object…
-
2
votes1
answer234
viewsHow to fill a Datagridview manually, after having used "Tolist()" from the link as Datasource?
I am filling the Datasource of my Datagridview so: var enderecos = from endereco in EnderecoBusiness.Enderecos select new { Logradouro = endereco.Logradouro, Numero = endereco.Numero, Cidade =…
-
2
votes1
answer265
viewsCompute square root with input from typed text
I’m not getting the calculator to take the root of a number that the user types. The most I got was what is in the code, but regardless of the screen value, it only returns the root value of 2…
-
2
votes1
answer105
viewsHow to sync multiple buttons to an event?
Good evening, my teacher of programming language asked us to make a program, that when calling the event Form1_load generate 200 buttons, until then I did, but I wanted to implement a function that…
-
2
votes0
answers35
viewsTransforming a 1xN Sql Server Table into an object in C#
I’m new to the forum and I’d like some help. I am trying to pass a junction of tables with client information to C# but am having problems turning 1xN fields into objects. I want to bring the fields…
-
2
votes0
answers91
viewsSystem.Diinotfoundexception: Failed to find library "leptonica-1.80.0.dll" for Platform x86
I am developing an application in Winforms using OCR Tesseract, whenever I run the application on localhost works perfectly, but when I publish or send the folder bin to another computer appears the…
-
1
votes2
answers1412
viewsHow to turn a DLL created in C# to VB6?
I created a very basic DLL in C# just for testing. It looked like this: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using…
-
1
votes3
answers5780
viewsForm opening another form within a splitcontainer
I have a main form divided by a splitcontaniner. When I click on a button panel1, a form is loaded into the panel2. private void btnCadastrarConta_Click(object sender, EventArgs e) {…
-
1
votes5
answers38715
viewsCalling a form and closing a form in the same event
How do I call one form and close a form at the same event. For example: private void iniciar_Click(object sender, EventArgs e) { Close(); Frm1 newForm2 = new Frm1(); newForm2.ShowDialog(); }…
-
1
votes2
answers998
viewsMethod does not work when called
I have two forms: In the form1 there’s a ListBox with some pre-entered data and a method. In the form2 there is a button that executes a method in the form1. //form1 public void limparListBox() {…
-
1
votes2
answers6454
viewsHow to clean the combobox without losing the items?
How to clean the combobox without losing the items? I try to clean up the combobox in C#, but either it eliminates all options or the selected one, as I do to clean without losing items?…
-
1
votes1
answer754
viewsHow can I pass a class value to a Listbox
I am involved in a small personal project, composed of some classes and many photons. I need to send a value that is obtained when I access a certain button, to the listbox that is in one of these…
-
1
votes2
answers529
viewsI rotate in my browser Webservice and gives me a strange message
While giving a View In Browser on my Webservice, brought me this message. It doesn’t look like a message that Webservice is all ok. What is this message? Service This is a Windows© Communication…
-
1
votes1
answer8336
viewsHow to break a label line 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 very large, it "breaks" its container, going beyond the edges, with this,…
-
1
votes1
answer74
viewsScreen touch recognition such as Mousedown
I’m developing a game (Puzzle) in C# Winforms, to run on a touch screen. The mapping of touch events to mouse events already occurs by default, and I didn’t have to do anything to make it happen.…
-
1
votes1
answer491
viewsInclude a search button inside a gridview c#cell
I have the following problem: I have a gridView on a Windows form system that I am developing with c#. This grid will serve for the user to include items of a quote. In the product cell, where the…
-
1
votes1
answer2330
viewsDelete a folder even if it is with files
What code should I use to delete a folder where it contains files within it? This code I used only erases an empty folder. void ApagarPasta(string nameOf, bool subPastas){ Directory.Delete(nameOf,…
-
1
votes1
answer570
viewsLog Navigation C#
I have Two buttons: Next and Previous in a Windows Forms application in C#, I am using an SQL statement: SELECT * FROM aluno LIMIT 1; for MYSQL. This statement takes the first record. Now comes the…
-
1
votes5
answers13026
viewsCoin style in a Textbox in Winforms
I need to put the text R$ in a textbox so that it has the following format: R$: 1,200.58 I am trying in the following ways without success: textbox1.Text =…
-
1
votes1
answer3634
viewsWhere to place the connection string with the database?
I have the form: Already created the database and table for registration, I am using wampserver and Mysql Workbench. My question is where to place the connection string: MySqlConnection conn = new…
-
1
votes1
answer126
viewsHow to view progress in Taskbar
Hello guys I recently saw on a forum that is yes possible to show progress in Taskbar (compatible with Windows 7) I have the following code: using System; using System.Runtime.InteropServices;…
-
1
votes1
answer1783
viewsFormat cell in Datagrid at runtime C#
I am creating a Datagridview automatically with a time column and am using the time format 00:00, as follows below. dgvhorario.ColumnCount = 1; dgvhorario.Columns[0].Name = "Horário";…
-
1
votes2
answers1224
viewsHow to fix this issue with Datagridview Check Box Cell?
I’m having a problem with the Datagridview checkbox Cell: Click on checkbox, and it marks the Checkbox and updates a value field. I click again, and he does the opposite. Everything works normally,…
-
1
votes1
answer625
viewsShow database image for each usercontrol
Usercontrol1 private string lastName; private string nnovo; public string LastName { get { return lastName; } set { lastName = value; label2.Text = value; } } public string Nnovo { get { return…
-
1
votes1
answer161
viewsHow to know if the client is already open on another computer?
I’m building a system that can and will open on possibly two to seven computers. There is concern in the following case: PC1 opened the João client file and began editing. PC4 opened the João…
-
1
votes1
answer1937
viewsHow to remove mask from a Maskedtextbox
I’m using Visual Studio to make an application using Windows Forms in C# and I need to get all the Maskedtextbox of the form, without masks. I’m using the code below right now. The Maskedtexbox are…