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
-
1
votes2
answers56
viewsHow to insert a List<> into a Listview C#?
I’m trying to insert a List<> (Generated by another class that brings the data from the Database), the data is inserted but the ListView receives only the first column, and the other is null.…
-
1
votes2
answers93
views -
1
votes0
answers263
viewsBulk C# and Sql Server NFE xml import
Good morning! I have an application with the following features: Windows Forms, C# Visual Studio Community 2019 Sql Server Express Windows 10 Pro About: I created the application in order to import…
-
1
votes1
answer75
viewsHow to open a . txt file and play text for my Textbox in Winforms?
Hello, everybody! For study purposes, I created my own custom notepad, it can open files and get the text of a common Windows notepad through Openfiledialog and transfer to my program. However I…
-
1
votes1
answer25
viewsCreate click event for multiple C#buttons
I make a class to generate buttons like this: public Button GerarBotao(string Text, string Name) { Button button = new Button(); button.Text = Text; button.Name = Name; button.Dock = DockStyle.Top;…
-
1
votes1
answer30
viewsHow to run a method until the return is true(true) ? Windows Forms C#
I have a condition where the main FORM only opens when the charger is connected. How do I keep updating the battery percentage in the main FORM ? How do I keep monitoring if he removes the charger…
-
1
votes1
answer35
viewsHow to make an internal calculation in Textbox?
I need to calculate a value entered in Textbox and this value I enter is multiplied by 9,81. So all the numbers I insert in this Textbox will be multiplied by 9,81 and you will have to show me the…
-
0
votes1
answer887
viewsHow can I allow insertion directly into a Datagridview?
I am setting the DataSource of a DataGridView with a List<T>. I enabled by designer "enable addition". But there is not appearing that line with asterisk for adding new elements. My code is…
-
0
votes2
answers7874
viewsHow to pass lines from one Datagridview to another?
I wish to pass the selected lines of a datagrid for another, for example, I select lines, click on a button, and they pass to one another. Is to make an add - remove items. I have two datagrids, one…
-
0
votes1
answer1273
viewsHow to update button form or event automatically?
How do I update a Private Sub _PAINEL_VENDAS_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load automatically and an event for example button? I have to use a…
-
0
votes2
answers67
viewsHow to convert Sender to a Form?
In my program, I need the following routine to work: private void FuncaoTal() { frmSelecao.FormClosing += atualizarEvento; SplitContMenu.Panel2.Controls.Clear();…
-
0
votes1
answer117
viewsTransforming Checkboxlist Labels into strings
I have a checkboxlist with some items and their name are the directories so I can save the file. I wonder how I get the name of each label selected from checkboxlist and turn it into a string. I…
-
0
votes2
answers4407
viewsPass data between Forms
I am working on my TCC and I needed to make the data collected in the register serve as login, because we do not have a server yet to store this data, so they are being done with ArrayList. Follows…
-
0
votes1
answer247
viewsLarge volume data loading with Nhibernate + Windows Forms
I use the ORM Nhibernate in a windows Forms project and there is a forecast to work with a large volume of data in several tables, ranging from 1 to 15 thousand records on average. Although it is…
-
0
votes2
answers1220
viewsError povoar combobox - An unhandled Exception of type 'System.Invalidoperationexception' occurred in mscorlib.dll
This is a Cod. to fill a combobox with a list that will be populated by the insert event that will redeem a value from a textbox, and will cause the name selected in combobox1 not to appear in…
-
0
votes1
answer54
viewsMethod does not act as expected
When I go to check the following code, there is nothing in any of the ComboBoxes. For me, everything is normal, I see nothing wrong, what can be? public FormExemplo() { ExemploList = new…
-
0
votes1
answer388
viewsCreate registration pattern with C# UI repository
I created in my system a repository with EF6, each registration I do access the methods of my repository to commit the actions I need (Insert, Delete etc...). The problem is that my system is very…
-
0
votes2
answers3813
viewsHow to change the border color of a Groupbox
How to change the border color of a Group-box? Because I need to put a very light background color...there the edge of the Group-box q I have almost do not appear because they are a very light gray…
-
0
votes2
answers1041
viewsFailed to convert nvarchar'VINET' value to int data type
I have that mistake: Falha ao converter o nvarchar valor 'VINET' para o tipo de dados int. Down with my code: private void button1_Click(object sender, EventArgs e) { try { SqlConnection…
-
0
votes2
answers1834
viewsUpdating object value of a Form by a thread
I need 2 Abels of my form to be updated every 1 second, so I threaded it myself load of Form: Thread threadUpdate = new Thread(new ThreadStart(UpdateState)); threadUpdate.Start(); And my method…
-
0
votes1
answer894
viewsChange Tabpage title color
Does anyone know how to change the color of the title Tabpage in C#? Not full page text color, only page title color (from Tab).
-
0
votes2
answers729
viewsHow to fill datagrid in a form with fields in another form C#?
I’m making a loyalty system, and I wanted to use two forms for customers, Form1 with the datagridview and a button register and the other form2 with the data fields to be filled in, that form2 would…
-
0
votes1
answer879
viewsChange column color (Chart) with values above the limit
I’m making a report for winforms using the Viewer REPORT, in this report I added a column chart. What I need to do is that before loading the report the user can choose what value is good for it,…
-
0
votes4
answers7370
viewsValidate content from Textbox
I have the fields TextBox, for example: txtValorCompra would have to be typed by the user 98,90 and it can’t be letters txtNumero integer input nome only letters. You’d be able to do that on the…
-
0
votes1
answer216
viewsHow to know if a function has been called by another form?
How to know if a function has been called by another form? For example: In my Form 1, I have a method that calls another form: private void btnFormulario2_Click(object sender, EventArgs e) {…
-
0
votes1
answer58
viewsHow do I use Mysql in a common form?
I’m having trouble using a Mysql database I have on a host (Bluehost) in a C#application, I would like to view the tables in an application but I can’t connect to DB , I already installed the Nector…
-
0
votes1
answer704
viewsQuery Mysql in Visual Studio does not return all data
I have a problem in Visual Studio, where in my database access class, I have a query that makes a query in my Mysql database, and returns only the last result. Therefore, when I test this same query…
-
0
votes1
answer347
viewsThread hanging
My system has a method that puts each event fired into one thread, save, edit, search, everything goes to one thread. backgroundWorker.DoWork += acaoProcessamento;…
-
0
votes2
answers306
viewsSplash Screen in Windows Form C#
So far everything is fine, but I did one splash screen and put the same to rotate in form and ran perfectly. After a while I always updating the project with new functions and the main splash…
-
0
votes1
answer598
viewsHow to insert values inside a key using List and JSON
I’m trying to do something that gives me a way out of this: [ { "Nome": "João", "Comprou": [ "Carro": "Sedan", "Preco": "12000", "Moto": "Honda", "Preco": "8000" ] } ] For this I use List and to…
-
0
votes1
answer720
viewsAdding more than one string to a List
I have a customer registration system and I am trying to add products to registered customers. For the registration list I have the following: public class Cliente { public string Nome { get; set; }…
-
0
votes2
answers112
viewsReactivate form to closure of other
I have a form main and from this form I click on a button and open another form, So when I open this other form I disable the main one, so that’s okay, so I wanted when the user closes the second…
-
0
votes2
answers1026
viewsMove image (Picturebox) in form
How to move an image in a windows form. I used the following code: private void button1_Click(object sender, EventArgs e) { int tamanhoFundo = picFundo.Width; int x = myPic.Location.X; int y =…
-
0
votes1
answer643
viewsPopular C# datagridview with inheritance class
Good people, I have the following situation: public class TiposMateriais { public int tipoCodigo { get; set; } public string tipoDescricao { get; set; } } public class Materiais { public int…
-
0
votes0
answers48
viewsDatarepeater replacement
I always used Datarepeater to put my data and put buttons. Only in visual studio 2013 he disappeared. How do I use it without downloading Powerpack? Or if you have something like your ease? to do…
-
0
votes2
answers243
viewsHow can I create a Datagridview with Mongodb?
I want to present the BD data in a table, but so far I could only do it using a ListView. How can I do it but using one DataGridView? using System; using System.Collections.Generic; using…
-
0
votes1
answer220
viewsProblem with parameters in Sqlcommand
I am developing a service registration, the first screen is the login and I need to take the position of the user who logged in and indicate a form for it, my code ta thus: using System; using…
-
0
votes0
answers652
viewsInserting double type value into mysql database
I have a Windowsform with a value field and I need to enter its value in the database. I need some example of how to do this? File that queries //Cadastrar Gastos public void cadastroGasto(Gasto…
-
0
votes1
answer117
viewsHow to use query column data as a row in datagridview?
I have a query with 3 columns that bring data from the Oracle database and I want to use one of these columns as row in datagridview. Are 3 columns name, data and contagem de nomes, and in the…
-
0
votes0
answers1142
viewsMove Image in Picturebox C# Windows Forms
I looked for some examples on the Internet, but the ones I tried didn’t work. I load an image at runtime, this works normally, but I am not able to move the image that is loaded inside a PictureBox,…
-
0
votes1
answer646
viewsAssign Listbox values in vector
By playing the items one by one within an array, position 0 with 0 and so on, it works correctly. But the code has a malfunction because ,in the first iteration is normal in the second of the error:…
-
0
votes1
answer94
viewsRibbon for Visual Studio Express 2013
How to install or activate Ribbon in Visual Studio Express 2013?
-
0
votes1
answer472
views -
0
votes1
answer866
viewsHow to validate a date on a Datagridviewtextboxcolumn?
I’m creating a form where the user will input data through a DataGridView, one of the columns of this DataGridView is the type DataGridViewTextBoxColumn and it will receive a date, I would like to…
-
0
votes1
answer170
viewsFor the movement of a picturebox c# windows
I have a picturebox and I make his movement only to the right and left, but I would like that when the end of the image reaches the edge of the form and the beginning, it is no longer possible to…
-
0
votes1
answer1226
viewsProblem when exporting data from c# datagridview to excel spreadsheet
Good morning guys, I have the following code below, in it I am taking the data from the datagridview and exporting to one . xls, I’m going through everything like String, the texts, names, which are…
-
0
votes1
answer981
viewsTake the data searchFornecedor and put in the form of product registration
I cannot take the data from the Pesqvendor form and put it in the formCadastroProdu My project is in C# Windows Forms in 4 layers. did so frmCasters private void pctLocalizaFornecedor_Click(object…
-
0
votes2
answers1539
viewsPublish Windows Form C#
I have an application developed with Windows Form C# + Entity Framework V6.1.3, where I use an existing database. The application works correctly, in Visual Studio 2013, where I am developing. My…
-
0
votes2
answers55
viewsDisable Toolstripbutton in Form
I need to do a check and if it is true, the button remains enabled, if it is false, the button must be disabled... How could I do that ? So far only have the if, because I do not know how to do…
-
0
votes1
answer2209
viewsHow to fill out a web form through c#
Is there any way to fill out a web form via c#? I have a system developed in WPF and when the user clicks a button open a particular page in the browser and your fields are filled automatically with…