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
answer50
viewsHow to open an Openfiledialog box when selecting a Tabcontrol Tab?
I would like when the user selects a particular Tab, to immediately open an Openfiledialog box. I already have this Savefiledialog, but it’s in the button click method: private void…
-
1
votes1
answer481
viewsReturn selected object in datagridview
I have the following parameterization of my datagridview: List<ModelAluno> alunos; ModelAluno aluno = new ModelAluno(); public PesquisaAluno(List<ModelAluno> alunos) {…
-
1
votes1
answer3156
viewsHow to add one Form inside another?
I have two presses (FormMenuPrincipal and FormFuncionarios) in which when the button btnFuncionarios of Menu is clicked, I want to open the form Employees. I thought I’d add one panel painel as…
-
1
votes1
answer37
viewsVB.NET - Automatic textchanged
Come on, you guys! I am trying to realize automatic date. For example, if I choose the year of the field "Up", in the year 2018. The "From" field automatically calculates for year 2013. As print…
-
1
votes1
answer124
viewsNullreferenceexception in Winforms code
I believe it’s a bug not the code, but the compiler... When I eat this area of code, the error always goes to the next variable, or method. Behold: Part of the code: grpBoxMDeck[i] = new…
-
1
votes2
answers65
viewsProblem with variable connection to C# Visual Studio Database
I have my connection string that takes the connection variable from App.Config static String string_conn = ConfigurationManager.ConnectionStrings["bd1"].ConnectionString; However I put a function…
-
1
votes1
answer1374
viewsLeave Selected specific item Combobox C# Winforms Visual Studio 2017
I am developing an application that contains a customer register. In this register there is a ComboBox listing the cities in the database. My question is this: How do I leave 'setate' the name of a…
c# winforms visual-studio visual-studio-2013 visual-studio-2017asked 6 years, 4 months ago user59669 -
1
votes1
answer123
viewsManipulation of records (regedit)
I have an application developed in windows Forms that handles some records in the following way: "HKLM SOFTWARE MINHAEMPRESA etc...". This application was run as an administrator and I never had a…
-
1
votes1
answer52
viewsHow to make the console output appear in a textarea in Windowsforms?
I would like to know a way in which the output of my project, appear in a textarea in Windowsforms. I need this because my system is a binary number converter, and I want you to print out the…
-
1
votes1
answer53
viewsProgress bar for procedure stored in c# windows form
I have a project that updates data through a stored procedure (delete, Insert, update) with a long duration not determined. I would like to present a progress bar with time not determined during the…
-
1
votes2
answers1554
viewsMask CURRENCY {en-BR} in Gridview C#
My problem is: I want to include a mask with the Brazilian currency in a column of GridView. I’m using the CultureInfo.CurrentCulture, but when I put to turn, in the GridView only the first…
-
1
votes1
answer338
viewsScroll bar in incorrect position - Datagridview
I am trying to select the last line in a Datagridview after including a new item. For this I am running the following code: dgwVenda.ClearSelection() dgwVenda.Rows(dgwVenda.Rows.Count - 1).Selected…
-
1
votes0
answers432
viewsChild form is in front of everything including other windows Windows Forms C#
I need my child Forms to stand in front of the parent form, up to there blz. Only they stand on top of any other window or program. I wonder if there are ways the child Forms stay only in front of…
-
1
votes1
answer133
viewsCheck/Uncheck button check box
In my program there is a button to mark and the same button to uncheck a checkbox. Example: If I click once, it marks the check box, if I click again on the button it unchecks the check box.…
-
1
votes2
answers61
viewsHow to display the values of two-class fields in a Datagridview?
I’m populating an object DataGridView with a list of type classes List<Curso>, and the way I populate the DataGridView is as follows: meuDataGridView.DataSource = cursos; But one of the fields…
-
1
votes2
answers109
viewsIs it wrong to put this much code into a button click event?
It is wrong to put this amount of code in an event of click button? private void CPeBTNSalvar_Click(object sender, EventArgs e) { try { if (CPeTBCodigo.Text == "") { throw new…
-
1
votes3
answers162
viewsProgram to rename files
I am trying to develop a small program to rename lots of files (pdf, etc). Imagine that the default is "1250_F1_001A_E01-001A00.pdf" and at the end would get "1250_F1001A00.pdf", kept the first 7…
-
1
votes1
answer64
viewsMap windows Forms controls
I am developing an application descktop in c# The framework 4.5 I did not imagine that the application could grow and have many fields, with this came the need to make an automatic mapping (from /…
-
1
votes2
answers691
viewsLimit the number of characters in a textbox
I am simulating an electronic urn in C#. To limit data entry, I decided to create a "keyboard" from 0 to 9, for the insertion of votes. However, I’m having trouble limiting the amount of characters…
-
1
votes1
answer328
viewsdataGridView with line break, but when exporting to excel no break
Galley, I have a dataGridView that used the following code snippet to break the text: dataGridView1.Columns[0].DefaultCellStyle.WrapMode = DataGridViewTriState.True;…
-
1
votes1
answer59
viewsAdd a new variable to a component (Picturebox)
I’m creating a game for a college job, this game consists of several Picturebox, one is the main character who walks, jumps and shoots, the PictureBox of the shooting and the PictureBox of monsters…
-
1
votes1
answer202
viewsError saving monetary values in Mysql database
I have a table column from my bank called salario_base where it is of the type Decimal(7,2). I enter the value in a textbox, I convert the same and pass this and other variables to an insert class…
-
1
votes2
answers650
viewsSave file with openFileDialog
I need to select PDF files with the openFileDialog and save them in a specific directory set in a string in Properties.Settings, but the code below does not work. private void…
-
1
votes1
answer249
viewsViewing PDF file after obtaining bytes
I would like to view a file .PDF staying at a FTP. I can get the Stream through the bytes, but I can’t create the file in a browser. Follow the code so far: private void btnVerFilePdf_Click(object…
-
1
votes1
answer371
viewsHow to fix Blinking Panel (Flickering Control) when drawing something?
I made an example when this happens pisca-pisca, just put the control Panel in the form and execute. public Form1() { InitializeComponent(); this.KeyDown += Form1_KeyDown; this.KeyPress +=…
-
1
votes0
answers317
viewsHow to send the value of a combo box to the database
Man ComboBox brings the ID Primário table Produto to be registered in a new table that is the Pacotes. So far so good, the problem is that if I select another record on ComboBox it saves as if it…
-
1
votes1
answer58
viewsHow to Show a split result on the screen
I am developing a project in which the result of the division of the 5 items always 0, someone can help me to tidy up private void btnCalcu_Click(object sender, EventArgs e) { //convertendo Total =…
-
1
votes1
answer53
viewsHow to send the Data Time Picker date to the Mysql database
Speak guys I have a problem that is send my DTPentrar alias DataTimePicker, follows photo of the error and the code, if anyone can give a light thank you. Hugs private void btnSalvar_Click(object…
-
1
votes0
answers142
viewserror with windows forms
Created an application, on my pc runs normally, but on the client’s pc presents the following problems: here the full description: Assinatura do problema: Nome do Evento de Problema: CLR20r3…
-
1
votes1
answer109
viewsHow to resize 2 Datagridview equally?
I have a form with 2 DataGridView and when resizing the form I can only resize 1 of DataGridView on all sides (with anchor 4 sides) without overlapping the other side DataGridView. Taking the image…
-
1
votes1
answer459
viewsEntity Framework Migrations on an already installed system, how to run?
A C# Winforms application, with the Entity Framework that accesses data in SQL Server in development phase we use Migrations to make the database according to our model, but then with the system…
-
1
votes0
answers88
viewsLink n to n
I have a database and I wanted to dial n to n on C#, but I don’t know how to get the data from my other table. I wish where it says id_equipa the data of the team selected in the combobox Step to…
-
1
votes1
answer650
viewsC# - Windows Form how to search in a Datagridview
I have a datagridview which is populated from a list with data. When starting the screen I make a SELECT searching all bank records. How do I perform a search on this list and datagridview? My…
-
1
votes1
answer41
viewsSearch only one record type in the database and show in Datagrid
How do you do a bank search and show on DataGrid, only that I select a category I’m not sure how to do this kind of search in the bank, when I select in the ComboBox1 the active word, it brings me…
-
1
votes1
answer74
viewsInvalid thread operation, Invoke method does not work
I have an online chat code, in it there is a list of logged in users on the system. There is a problem when adding the name of users on listBox; The error is as follows: Operação entre threads…
-
1
votes1
answer107
viewsEdit Activedirectory user with C#
Hello, I am trying to add the initials of the company’s employees in the initial parameter of the AD user and when trying to run it returns me the following message:…
-
1
votes1
answer307
viewsWebbrowser does not load css c#
I tried to create a Simple browser and when I finished I realized that it does not carry css the site gets horrible looks like a website outdated. :\ Can someone help me? Photos from the site, if…
-
1
votes0
answers86
viewsProblems with music in Windows Forms in C#
I am doing a job for college with Object Orientation and Windows Forms, but I have the following problem: The program consists of several Forms, in the first I made the code to play music as shown…
-
1
votes1
answer70
viewsMonitoring the last Row from a table
I’m trying to monitor the latest row bank MySQL and when this is changed I will display a message, however I am having doubts on how to monitor with C code#. I’ve managed to requisition the last row…
-
1
votes1
answer384
viewsThere is no mapping of the System.Windows.Forms.Toolstriptextbox object type to a native type managed provider
I’m having a problem trying to make an appointment at a Select and bring the information on TextBox. There is no mapping of the System.Windows.Forms.Toolstriptextbox object type to a native type…
-
1
votes1
answer93
viewsHow to control MDI forms through a general method?
I am developing a system with MDI forms. I have a menu that is the MdiParent and everyone else is allocated as your children. Originally, MDI allowed me to open the same form several times; then I…
-
1
votes1
answer46
viewsUpdate main form after closing the load form
What I’m trying to do is, I need to open another form in another thread where there is a Progress bar that is indeterminated, and in the main ui I need to update the datagrid with the data from the…
-
1
votes1
answer143
viewsPicturebox with round corners without serration?
What I need to do is a PictureBox that has rounded corners, but the problem is that I can’t make them round without serrations. One of the ways I found it was by using the property Region: Private…
-
1
votes1
answer241
viewsSendkeys does not work on the machine that will run
I am doing an automation that is necessary to give a Sendkeys but when I run it on the other machine that will run the automation it does not do the function. DirectoryInfo diretorio = new…
-
1
votes1
answer58
viewsCorrect way to bind a Datagridview
I’m bindando one DataGridView in a DataTable what a comeback from my comic book, but even with just 79 records in the DataTable my DataGridView is very slow to work and catching on the screen…
-
1
votes1
answer121
viewsSet existing value in combo box C#
I am passing a completed DTO object to an editing form, through the event click on a Change button. In this edition form, I want all fields to be filled out as soon as it is opened, but the fields…
-
1
votes1
answer28
viewsInsert combobox items using Entity Framework
I have a Windowsforms application and I’m trying to insert items from a combobox and save to the database using Entity Framework Core. The biggest problem is that it inserts only one combobox item,…
-
1
votes2
answers109
viewsAccess a Form method to another Form
I have a Method carregarLista() on form calling Funcionarios, and would like to access this method from another Form called Cancelar. The method is published in Form Funcionarios, I just can’t…
-
1
votes0
answers67
viewsimage and write to the sql database in the image field
Good afternoon. I have a little problem with my code, and I need some help. I am inserting an image in my form in an image field, now I need to take this image and write an image field in a field in…
-
1
votes2
answers241
viewsI cannot change font size in C# (Property or indexer 'Font.Size' cannot be Assigned to -- it is read only)
I did a Trackbar to change the font size in Visualstudio Express 2015,but when I try to change the font it returns the error "Property or indexer 'Font.Size' cannot be Assigned to -- it is read…