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
-
3
votes2
answers907
viewsHow to count . xls / . xlsx files in folder with C#?
I have a Folderbrowserdialog and when I select the folder it shows the amount files (all, no filter). How do I do this length only with Excel files (.xls, . xlsx). Follow the code below:…
-
3
votes1
answer394
viewsHow to make object design control faster in a C#form
In a form, in C# for desktop, there are constant movements of certain controls. In this case I am using objects of type Picturebox, however its rendering is very time consuming. Is it recommended to…
-
3
votes2
answers1729
viewsHow to pass values of controls between different windows?
and I’m having a question here about programming in C#, which I’m in doubt of how to do. Well, first I have a program C# of Windows Form Application, in it I created 2 Forms, being the main Form1,…
-
3
votes1
answer195
viewsWhat is the size and coordinate measurement difference in C#Forms
In my project I work with the distance of elements and their size. But on a screen, 600 by 600, when inserting an object, 100 by 100, it appears to be much smaller than 1/6 of the screen, and when…
-
3
votes1
answer3273
viewsOnline SQL database for LOCAL NETWORK only, connect via c#
I developed a system for my company and need a database hosted on our internal network, explaining better I want to host this database on a PC running a Windows Server 2012 here in the company, our…
-
3
votes2
answers83
views -
3
votes1
answer1368
viewsCustomize calendar C#
In the system I’m doing, I need a calendar that has only the weekends of each month enabled to be selected, the rest is deleted.. How can I do this in C# Winforms? I searched on the Internet and…
-
3
votes3
answers590
viewsCombobox in Databases
I always used Delphi and there had with component called DBLookupcombobox where it was possible to list the data of a table and use the field ID save in the main table, for example: In an employee…
-
3
votes2
answers917
views -
3
votes2
answers593
viewsHow to pass filenames to a Datagridview using Folderbrowserdialog?
How do I pass the name of the files that were found inside the selected folder? So far I’ve only managed to get him to pick up the file’s path and move on to the DataGridView and now I want to make…
-
3
votes2
answers2851
viewsEnable/Disable Button according to Checkbox value in a Datagridview
A form in an application Windows Forms with C# displays a DataGridView with Checkbox. When one of Checkbox is marked I want to enable a certain button. If any Checkbox is marked I want to disable.…
-
3
votes1
answer502
viewsHow do you get a piece of an image?
Based on this image how would be the code to separate in, as if it were sub image without splitting this image into different files: Ex: void splitImage(int numeroDeDivisoes, ref Image original, out…
-
3
votes4
answers1209
viewsButton with pause function
I have a little app 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 not to disturb the client’s…
-
3
votes0
answers316
viewsConnection problem with bank . mdf
I’m in the way of connecting my application C# (Windows Forms) with a database in .MDF, which is already inserted in the project folder. On the computer of the course worked normally, but at home I…
-
3
votes1
answer412
viewsDragdrop for files . txt Windows Forms
I wonder if it is possible to use Drag and Drop in Windows Forms for files outside the application, in this case, a . txt(As is possible in WPF). I only found examples using Listbox. If possible,…
-
3
votes1
answer170
viewsQuestions in Windows Forms and C#
I’m trying to learn C# but I have a hard time understanding the hierarchy of files and folders of Solution Explorer from Visual Studio 2013. I can’t understand why there are two files .Cs, which is…
-
3
votes1
answer688
viewsHow to capture text that another console program writes on the screen
My Windows Forms program runs another console program. This second one writes messages on the screen while running. I want to know if you can prevent the execution of the other program from opening…
-
3
votes1
answer582
viewsHow to remove certificate messages from Webbrowser?
How do I remove those annoying messages showing that the page certificate is not valid or insecure from the component System.Windows.Forms.WebBrowser? I’ve tried many ways and I haven’t found an…
-
3
votes1
answer425
viewsPopular datagrid with threading
I am contracting a Windows Form application. I am not getting popular my datagrid with a threading, appears the following error: "Invalid threaded operation: control accessed datagrid of a thread in…
-
3
votes1
answer228
viewsAccordion in Windows Form?
Hello good afternoon / evening I’m new with c#, Guys someone there has an idea of how to get the accordion effect in Windows Form equal in HTML using jquery
-
3
votes1
answer449
viewsAdd line to Datagrid with Datasource defined
I have a DataGridView who has the DataSource setate with List<MinhaClasse> and would like to add a new line to it. I know this is not possible using the method AddRow() of DataGrid. Is there…
-
3
votes1
answer380
viewsDatagridviewcomboboxcolumn loses selected value
I have a Datagridview and bind it through a list. So far so good... Now I want to add a combobox (Datagridviewcomboboxcolumn) dynamically based on another list. In the first line of code I make the…
-
3
votes2
answers725
viewsHow can I save TXT file in C: directory using C#?
I’m trying to make a small data scrolling program and I want it to save a file. txt that stores the scrolls, so that it can be read later. The program is practically whole ready, all functionalities…
-
3
votes2
answers489
viewsCheckbox with External Checkbox
I have a Form with a Dropdownlist with Checkbox inside, and I have an external Checkbox that selects and unchecks all. My question is this:. When I uncheck one of the items in Dropdown the "Select…
-
3
votes3
answers1689
viewsHow to make visual form inheritance in Windows Forms?
I have a form base that will be the form 'Dad, with three buttons on it. Add, Delete and Change. I’m gonna use the formbase to standardize my registration screens, so each registration screen when…
-
3
votes0
answers55
viewsAccessviolationexception When I type ALT or TAB C# WINDOWS FORM
Guys, I have a form where the Form (Plano_aula) calls the form (Call) , in this Form Call has a list of students and a Panel that stays with the Visible = false, in this same screen I call a class…
-
3
votes1
answer155
viewsCreate dashboard with center at user click point
I need to create a Panel in a Form Getting kind of like this: When you click the mouse on Form create the Panel taking the location of the click and create the Panel centralized. I did so: Panel…
-
3
votes2
answers1914
views -
3
votes1
answer331
viewsSave Operations log to database with system user field
Hello, would like to know how to by means of triggers in the bank I get beyond saving the operations performed and in which table held also the user logged into the system (not the bank user, if the…
-
3
votes2
answers145
viewsdataGridView1_CellDoubleClick does not work!
I have the simplest function in the world and I can’t make it work. By giving 2 clicks on any cell of my datagridview I want to display the message "1" but it’s not working! What’s wrong? Look at my…
-
3
votes2
answers981
viewsSerialization of a large list in JSON.Net
I’m having a problem to be able to serialize an object (a list of a class with approximately 5000 items). I am using JSON.NET to generate the Json string but it is getting the following problem, in…
-
3
votes2
answers3501
views -
3
votes1
answer1168
viewsLock keyboard and mouse in C#, but keeping the execution of a method
I need to block the use of keyboard and mouse in form while it will perform a certain function of the system, on which I am placing the call of the blocking method in the event of Load of the form,…
-
3
votes2
answers305
viewsBest way to recover data for a Datagridview?
What is the best way to recover data from a direct table to a Datagridview ? I have several doubts, because, many people do not recommend using Unitofwork which makes it much easier and leaves the…
-
3
votes2
answers502
viewsObject Reference not set to an instance of an Object
I know the question is a little subjective, but maybe someone’s been through it and can help me. I have an application developed in C#/Windows Forms/ADO.NET with Firebird database. The error "Object…
-
3
votes1
answer1202
viewsRDLC report in an internal project folder?
I created a system with C# and Winforms and to create my reports I created an internal folder in the project with the name of reports, in this folder I create the RDLC for display in ReportViewer…
-
3
votes1
answer159
viewsRun an Attribute constructor
How do I call the constructor of an attribute before the constructor of the decorated class? For example, I have my attribute: using System; namespace T.WinForm { public class TesteAttribute :…
-
3
votes2
answers87
viewsC# Windows Forms Generic Object
I have a Desktop application in C# and need to load a dropdown with an option "All" and the rest coming from a database table. To load the dropdownlist I did something like this:…
-
3
votes1
answer572
viewsHow to take the path of the subfolder that was "SELECTED " in the listbox by the user and save the file inside
The program I’m creating should take the following steps: First the user creates a subfolder to go saving the projects that were calculated by the program, as image and code below. When the user…
-
3
votes2
answers411
viewsTextbox_changed is accumulating the sum value c#
I’m using the event textBox_Changed and when I type a value into the field, another textBox should receive this value, but this other textBox called ValorTotalVenda is accumulating this amount.…
-
3
votes2
answers114
viewsReturn original Textbox formatting
I have a method, which checks if a Textbox is filled, positive case follows normal, if it is blank, it displays a message on the screen, and paints Textbox background yellow, Here comes my doubt,…
-
3
votes1
answer258
views -
3
votes1
answer342
viewsHow to make the keydown function work with the program in the background?
Code: if (e.KeyCode == Keys.F7) { A1 = !A1; } How to make this code work without the program being in the foreground?
-
3
votes3
answers1224
viewsC# - Close Form without Stopping 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…
-
3
votes3
answers167
viewsInherited Form comes with no editing option on the whole. Use C# and VS 2017
When I create Form2 Inherited from Form1, I can’t edit anything on it. Of course the lock on the upper left has something to do with it, but how can I resolve this situation? Follow the image for…
-
3
votes1
answer887
viewsHow to make your program reliable - windows security
I finished a step of a program and we will start to put in production, however, when running the program is always displayed the message below: What should I do to make my program reliable? and stop…
-
3
votes1
answer803
viewsReplace a variable within a Word file
I am trying to do in C# (Windows Form application) print a Word .doc only that exchanging some vestments of the type @Nome by a string. In short, I have a contract and I need to print it. Stating…
-
3
votes2
answers4607
viewsHow to know which button was clicked?
I have three buttons, one for insert, another to alter and one for record. The button of record will work to save data either from an insertion or a change. How to identify which button I pressed to…
-
3
votes1
answer365
viewsCreate matrix (line header) in Datagridview
Would you somehow in C# use this pointed column of the image to add value to it as if it were a "header"? I’m using the DataGridView below to show an array. The matrix header is already being shown…
-
3
votes1
answer256
viewsInsert the value of an attribute into a textbox
I need to enter the value of the attribute SALDO class Conta in a TextBox. In java resgato via method get and convert with parse.float and Seto as string in the field. In C# as executed?…