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
votes1
answer68
viewsSystem.Windows.Forms.HtmlDocument.Body.get returned null
I am creating HTML elements by C# using Webbrowser, I am not using the URL property, just using pure code. When I try to use this command: this.webBrowser1.DocumentText =…
-
-1
votes1
answer48
viewsHow to select from the end of a textbox
Good afternoon, you guys! My question is simple and a little silly, but it’s making me crack my head. My program has a textbox where a log is saved, at all times new data (characters) are added to…
-
-1
votes1
answer90
viewsDatagridview - remove button
Good morning. I need help to solve the following problem: I need to do a project in which I insert a code and name of a person to be stored in a datagridview (windows Forms c#), but when I use the…
-
-1
votes1
answer37
viewsin my code when I search for pre-inserted variables it shows the variable more than once
for some reason as soon as I search for a variable in the code it lists the variable only that more than once based on the Count variable, int x=0; int count=0; string[] item = new string[500];…
-
-1
votes1
answer48
viewsDisplaying SQL Server data in Windows Forms
I am wanting to display the information of certain person I am looking for in the SQL Server Database on a label in Windows Forms, but when I run the code it displays…
-
-1
votes1
answer31
viewsI wanted to know how to connect the database data to the chart data in Windows Forms C#
I have no idea how I’m going to handle the data, so far what I’ve tried to accomplish is this code: public void loadChart() { MySqlConnection conexao = new MySqlConnection();…
-
-1
votes1
answer37
viewsI need to insert phone number and mobile number in the same textbox using masks in Windows form C#
Type I wanted to know if there is any way to create a format whenever the user type some characters (ex: 8 for phone and 9 for mobile), already identify and apply in the textbox. Or when the user…
-
-1
votes1
answer19
viewsHow to delete xml file with c#?
I am using this code to create the XML file, but I wanted to know how to delete one without having to go to the folder and delete manually. DataTable table = new DataTable("tbl");…
-
-1
votes2
answers59
viewsError clicking button to save data to database
Good morning guys, I’m trying to save some data in the database, for a button of windows form C# and this error appears. I have tried everything but the error persists. I did the print and pasted…
-
-1
votes1
answer263
viewsRead a txt file, insert into an array and display in a textbox in C#
I need to open the txt file with the data already inserted with three columns and separated by ';' and after opening the file I insert it into an Array with List, save the data and need the values…
-
-1
votes1
answer23
viewsHow to start Timer.Start a service by clicking a button?
Hello! Here’s the thing, I have a visual studio solution that has two projects... The first project is a Windows Form system and the second project is a Windows Service that serves as a…
-
-1
votes1
answer22
viewsFill Labels with values from a Mysql Database table
C# and Mysql I’m trying to get the table values Employees of the current user logged into the program and displayed in the Windows of my form, however the values are not being returned, my guess is…
-
-1
votes1
answer40
viewsc# problems in calling screens that even the teacher could not solve
Mens, I’m taking a DS technical course, I’m in the TCM phase and I was wondering if you can solve or help me with this problem: Next: I am doing a CRUD in c# win Forms and I came across an error…
-
-1
votes0
answers20
views -
-2
votes4
answers2549
viewsHow can I automatically download PDF from a web page
Is there any way to download a PDF embed on a web page? I am currently using the control WebBrowser.ShowSaveAsDialog() (Save As) but need to do without it, automatically using C# Windows Forms My…
-
-2
votes2
answers711
viewsInstalling a Winforms C# application on the client
I developed an application in Winforms C# in 03 layers with Access.MDB Database: Now the questions so that the Application can be installed in the client and function properly. The files I send to…
-
-2
votes1
answer324
viewsHow to place an exe in the Vb.net form
Well, I have the code Dim proc As Process proc = Process.Start("notepad.exe") proc.WaitForInputIdle() ' Set the panel control as the application's parent SetParent(proc.MainWindowHandle,…
-
-2
votes1
answer96
viewsHow to disable a window?
I am looking for some code that disables a window, and after the user enters a login and password in my form the window comes back to operate. Being more specific and with a little detail, I’ve seen…
-
-2
votes1
answer140
viewsHow to add controls created by me in Visual Studio Toolbox?
I created a control for WinForms. But I can’t find my control on Toolbox. How can I add my control to Toolbox?
-
-2
votes1
answer96
viewsObject reference undefined, what could it be?
"Undefined object reference for an object instance." Button[,] botoes = new Button[(int)numericUpDownLinhas.Value, (int)numericUpDownColunas.Value]; for(int i = 0; i <…
-
-2
votes2
answers485
viewsHow can I call a class void method to display an msg in a form
I have a method public void listarProduto(). It needs to have all the user input information. My problem is time to call this method within a MessageBox() in the form for the message to be…
-
-2
votes3
answers47
viewsDatetime does not update on Console.Writeline
When I click the button, something is written in the Console along with the date, but the time does not update. Code: private void button2_Click(object sender, EventArgs e) {…
-
-2
votes2
answers710
viewsHow to know how many characters there are after the comma c#
I would like to count how many characters there are after the comma. I was using public static string strToDouble(String text) { string aux; if (text.IndexOf(",00") <= 0) { aux = text + ",00";…
-
-2
votes2
answers463
viewsSystem.Nullreferenceexception error when trying to pass Value from one Form to another Winforms C#
I have in my application a customer registration form and a customer search form. To send values from one form to another I use the code below, I have used this same code in several other forms and…
-
-2
votes1
answer284
viewsFormat numeric field with 2 decimal places in datagridview c#
I need to show a column in the raw weight column datagridview this format 0.00, but I’m not getting, this column is not created in any database, I created the column directly in datagridview, I’ve…
-
-2
votes2
answers441
viewsError 1 No Overload for method 'Inherited method' takes 1 Arguments
Error 1 No Overload for method 'Inherited method' takes 1 Arguments Code: public void restauraRegistro(DataGridViewRow linha) { try { string codigo = String.Empty; //verifica se e para recuperar com…
-
-2
votes1
answer70
viewsHow to Change a Data in the BD
I’m trying to change the data registered in the database, for example, when I click on DataGrid He pulls the dice for me textBoxs, but I wish I could save the changes made, but it does not change,…
-
-2
votes2
answers306
viewsNo Overload for Matches delegate error on a C#
I am programming a button that checks if the login is existing and advances to another screen but appears the following error: "no Overload for 'btnEntrar_Click' Matches delegate 'Eventhandler'"…
-
-2
votes1
answer227
viewsSearch the database and move to a listview c# Windows Forms
I am developing a project and for being new in the area I am with enough doubts and difficulties. My problem is the following: I have a form to manage a company’s forward notes, when opening the…
-
-2
votes1
answer137
viewsCheck if the selected line is the penultimate of datagridview
I have a dataGridView on the screen and need that when the penultimate record is selected, I send the selection to the next line of the grid, which in case would be the last. Summary of the problem:…
-
-2
votes1
answer80
viewsCapture keystrokes even if pressed outside the app
good morning I did a little program where it shows the typed key, it’s pretty simple , just so I can learn how to use Windows form application. My goal was that when running another app , for…
-
-2
votes1
answer80
viewsTextbox with preset value, but also editable in c#
I have an application of calculations, and I have the following situations: In a textbox I have a preset value in the codes to perform a calculation with another form that I type the value, for…
-
-2
votes1
answer74
viewsC# - Clear all form fields at once
I have a form with several Textbox, Combobox, Radiobutton. And I would like to clear all fields at once. I’ve seen a lot of forums, but I haven’t found what could be my mistake. When I compile it…
-
-3
votes2
answers63
views"Nullreferenceexeption error was unhandled" when compiling
Follow the code below: public partial class Form1 : Form { public Form1() { button1.Click += Button1_Click; } private void Button1_Click(object sender, EventArgs e) { decimal n1, n2, result; n1 =…
-
-3
votes1
answer64
viewsHow to leave new form without depending on each other?
Here is the code that opens my Form4: Form4 form4 = new Form4(); form4.Show(); // Aqui um código gigantesco que demora aproximadamente 1 minuto para ser executado. form4.Close(); The problem is that…
-
-3
votes2
answers121
viewsWorking with C#; images
So, I’m working on a hangman game, it’s almost ready. Still have to make the images appear via code. And that’s my problem. For example: I want that if the error is 1, the head appears and etc. You…
-
-3
votes1
answer75
viewsHow to instantiate an Abstract class in C#?
I know the class abstract cannot be instantiated. But I need to call it in Windows Forms and I’m not getting it.
-
-3
votes3
answers898
viewsValidation and counting of days of a date
Consider an informed date in a form. Construct a function that checks if the date is correct (considering leap year, April 31, etc.). You need to pass the date entered in the form as a parameter. If…
-
-3
votes3
answers386
viewsThe user will have 3 attempts to set the password
The following form does not open when the password is correct and if it is wrong continues to pass even if the password has typed 3 times. private void btnEntrar_Click(object sender, EventArgs e) {…
-
-4
votes1
answer1531
viewsWould it be possible to pass a string from one form to another?
Imagine a Form who asks you for a color, so would have a TextBox, and from that TextBox I wanted to press the button "OK" for example, this sends the text of that TextBox to another Form, so that it…
-
-4
votes1
answer113
viewsWhat’s wrong with parole?
What the error in the parole below and how to resolve? private void Botão_Click(object sender, EventArgs e) { if(Pbox.Show();) Pbox.Hide(); else(Pbox.Hide();) Pbox.Show(); } private void…
-
-4
votes1
answer59
viewsbutton to add a minute
Hello I have this code and I’d like to do a boot to add a minute to the time that’s running. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using…