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
-
0
votes1
answer127
viewsApplication sent twice the same message
I’m having a new problem with the skype library (skype4com). Actually there are two problems. I’m doing my application in WindowsForm (C#). I made an app to send automatic reply in skype. private…
-
0
votes1
answer8384
viewsCalculate age from date of birth
Create a program where the user can enter his name and date of birth. Then click on a button that should display a message containing your age.
-
0
votes1
answer93
viewsPass data from a Datagridview to Textboxes in C#
Hi, I’m having a problem and I’ve even asked a similar question before, but now I’m being more specific. I have two Forms, one form has a Datagridview connected to a Database and the other form will…
-
0
votes1
answer106
viewsHide form by pressing key
I created a form, I do not want to use minimize or maximize button, I want to use for example when pressing "F1" my form stay hidden and press F1 again it comes back to. I tried this, but to no…
-
0
votes1
answer1417
viewsHow to write and block the textbox by clicking the button
I wanted to know how to write a number in the textbox and block when the button is clicked private void button6_Click(object sender, EventArgs e) { textBox4.Enabled = false; } I managed to make it…
-
0
votes1
answer61
viewsHow to create guides inside a window?
I need to create a program that displays the Forms that I call by Menustrip, inside the main form, as if they were part of it, and that can be left more than one open. I believe the image I made…
-
0
votes2
answers87
viewsHow to list last 7-day birthdays with Crystal Reports and c# winforms
I’m developing a church management system, and I need to get all the faithful registered in the system, whose birthday is in the last seven days, counting the current date. I have created the…
-
0
votes1
answer89
viewsHow do I view an image hosted in my App?
I would like to display a promotional image within a PicutreBox in my app, but this image will vary according to the promotion that the Company will make. Is there any code that PictureBox show a…
-
0
votes1
answer902
viewsTake variable value in another basic visual form
I’m having a problem getting the value of a variável other’s form. I tried to follow some tutorials of macoratti but none of the 3 that had there worked. In case, I have the form1 and the form2, the…
-
0
votes1
answer77
viewsSet variable in form designer
How can I set a variable in a form designer? Today I set the variable for my parameter, but when I see the form it gives this warning (even with the warning, it normally runs): The variable…
-
0
votes1
answer967
viewsOpen or Form1 or form2 on winform program startup
I have a program in vb6 and has two buttons - A scanner and another for scanning images. I created a program in c# winform where the project has 2 Forms - a Form1 for the scanner and another form2…
-
0
votes1
answer198
viewsWhen using the constructor when using load
Good night, how are you? I have a question, when to use the constructor and when to use the load of a form to call some method or etc. Example: public partial class Manutenção_cliente :…
-
0
votes1
answer101
viewsHow to identify which Tabpage is being closed
Good morning, how are you? I am working with Xtratabcontrol, and when I close a tab, I need to know which tab was closed. today at the event xtraTabControl1_CloseButtonClick, I’m doing it this way:…
-
0
votes1
answer139
viewsSearch/select database with C#
I have a form with a button and a simple datagridView, but my problem is that I have to search my file in ". mdb" (Access database) on the computer, so it will be shown in the datagridView then the…
-
0
votes1
answer234
viewsargument out of range Exception was unhandled
I am beginner in VB.NET and I am creating a simple simulation game, have hunger, thirst etc, in the hunger progressibar the maximum that arrives is 100. When you eat something restores 5, if I’m 98…
-
0
votes2
answers3339
viewsSave image in directory without Savefiledialog
I am developing a stock control application and in this application there is a product registration screen: The images of the products are being saved in the Mysql database. I received some tips and…
-
0
votes0
answers546
views -
0
votes3
answers2316
viewsC# Make Enter key jump to either textbox or combobox field
How can I do in a function, that when the person der enter , he jumps to the bottom field , which can be both a combobox and a textbox? I currently have this function , but it jumps to the last…
-
0
votes1
answer639
viewsHow to take the path of the directory
I’m using Winform and trying to save a string with Savefiledialog but I can’t pass the chosen directory in Savefiledialog to the System.IO File function.Writealllines; private void…
-
0
votes1
answer228
viewsError in API Rest POST - Windows Forms
I’m trying to register (POST) this endpoint https://geradornf-prod.herokuapp.com/ (is a Simple API I made with Django Rest) I’m using Windows Forms C# Follow the call: using (var client = new…
-
0
votes1
answer65
viewsEdit . txt using stream and a button
I have a form in c# and winforms, and I need that, when I click a button, it edits a . txt and add a line of text. Follow the commented code: using System; using System.Collections.Generic; using…
-
0
votes1
answer723
viewsFind the dataRow index
I’m walking a DataTable with a foreach using a variable of type DataRow, but I need to recover the content of DataRow that I’m walking through. foreach(DataRow row in DataTable.Rows) { string…
-
0
votes2
answers1129
viewsPermission Control in c# and Windows Form
I would like to create in C# with Windows Forms ( basically equal Windows folder permission), access levels for users, but not as level 1, 2 and 3, but for example: User A can only view a customer…
-
0
votes2
answers71
viewsData query file Settings
I have some projects in my Solution and in one of them I will have the Settings configured with some parameters. My question is: If I reference this project in others, I can read these parameters in…
-
0
votes1
answer2646
viewsConsume REST windows Forms
I’m trying to consume a REST JSON, I’m developing a module for a legacy system in Windows Forms, it’s not working, nothing returns. Follows the code: var client = new…
-
0
votes0
answers85
viewsDate notice in the app
I’m developing a C# application in Visual Studio. In this application there is a screen that informs the amount of events that the user has today, tomorrow and the day after tomorrow (table with…
-
0
votes1
answer193
viewsArduino + C# + RFID?
I can get the id of tag with this snippet of code and play in a Textbox, but, it would take information from which reader RFID she was read? serialPort1.Open(); string entrada =…
-
0
votes1
answer769
viewsDatabase connection in Windows Form?
How to make/call the database connection in Windows Form? Knowing that the database configuration is in the app.config
-
0
votes2
answers179
viewsUse Progressbar to copy folders and their contents
I have an application in C# Winforms that when you click on a button, you should start copying several folders and their respective contents. As this process is time consuming, I would like the user…
-
0
votes1
answer44
viewsError while moving directory
I have a folderBrowserDialog that when we selected the folder it would move it to a particular directory. I’m making the following mistake: Cannot create a file when that file already exists. but…
-
0
votes1
answer183
viewsSolver does not calculate solution for model
I have implemented a routine that makes calculation of the appropriate percentage of ingredients that is required to formulate a feed. To make this calculation I’m using the Solver Foundation of MS.…
-
0
votes4
answers7923
viewsHow do I give Enter and Run my SEARCH button
I created a program that has the Client Search field that loads the Clients in listview.. I want to search by filling in the Textbox and Pressing the Enter Key
-
0
votes1
answer157
viewsInheritance of abstract form
I have a standard form, with a textbox, a search button and a grid; as I intend to use it for several searches, I left an abstract Search() method and at the same time the form as abstract... When…
-
0
votes1
answer368
viewsFramework for Windows Forms or WPF
Guys, I wonder if there is any framework for Windows Forms or WPF, to facilitate development. framework that facilitated UI creation, and data access .
-
0
votes1
answer272
viewsDynamic filters using lambda
I have a table Errosproducao_records linked to another table called Errosproducao_tipos. I need to perform dynamic filters in the table Errors_records using lambda expressions. if I perform the…
-
0
votes2
answers487
viewsInvisible speakers in Listview
I have a listview with a series of columns, but I’d like to hide a few, how do I do that?
-
0
votes1
answer90
viewsWhy doesn’t it work on my user control?
I have a code that would like to put it in the user control of my windows Forms, but it does not make changes to Form1, what is the reason? Code: private void button5_Click(object sender, EventArgs…
-
0
votes1
answer77
viewsWrite a value at a certain display position outside the form
I’m developing an application in Windows Forms, with C#. For example: I want to write a text in the youtube search field, as seen through:http://prntscr.com/ck0vo2 Can anyone tell me how to send a…
-
0
votes2
answers52
viewsHelp with Windowsforms
I’m having a hard time showing it on Form. I have a main form (fmrPrincipal) and another form for registering a client (fmrCadastraClient). Inside fmrPrincipal has a menu with the "Client" field and…
-
0
votes1
answer51
viewsVB.NET Datagridview error
Error: There is no Row at position 0 Someone can solve me or explain what this mistake is?!…
-
0
votes2
answers1339
viewsField check Combobox, Textbox Maskedtextbox
How to create a method to check that all "Combobox, Textbox Maskedtextbox" fields are filled in? Mine does not work public bool CampoVazio() { bool ok = false; foreach(Control ctrl in this.Controls)…
-
0
votes1
answer67
viewsHow to stop a windows Forms application until a form is closed?
I want when Form1 is opened, the whole program stops, and only comes back when it is closed. How can I do this? Code that opens Form1: if (x == DialogResult.Yes) { Form1 f1 = new Form1(); f1.Show();…
-
0
votes0
answers216
viewsDoes reportviewer display no object value?
I am trying to generate a report with Reportviewer about the items of a sale, the report is displayed but in the product column instead of appearing the product appears #Erro. My classes are all…
-
0
votes1
answer73
viewsHow to make the computer choose between two Characters
Guys, I’m doing an old game in winforms in C#, however, I have a problem, is the following with me pressing the first button I want the computer to choose between "O" or "X", I tried to use the…
-
0
votes1
answer356
viewsVisual Heritage of Windows Form
I am making a base form with all the components I need to perform a CRUD, and for example, when I create the customer registration form, I will inherit the base class and so show up all the basic…
-
0
votes1
answer304
viewsObject List(with some objects as attributes) for Datagridview - C#
How do I show the Street or Zip Code of the list below in Datagridview. People’s List (to display in datagridview) List<Pessoa> Pessoas; Classe Pessoa using System; public class Pessoa {…
-
0
votes1
answer328
viewsHow to have more than one column shown in a Combobox?
The question is the same as the title, I have a ComboBox called txtProfissional and set up the same way: txtProfissional.DataSource = modelOff.profissionals.Where(p => p.idUnidade ==…
-
0
votes1
answer207
viewsInsert data into a real-time text box with Timer
I’m using timer as follows: System.Timers.Timer aTimer = new System.Timers.Timer(); aTimer.Elapsed += new ElapsedEventHandler(OnTimedEvent); aTimer.Interval = 1000; aTimer.Enabled = true; In the…
-
0
votes0
answers70
viewsC# - Is it possible to place a Scrollbar inside a Menustrip through the code, without touching the design?
Hello! I am using Windows Forms and created a menu with many items: In order to view all the items I have to use these arrows that are on the menu ends. I wish I could add a Scrollbar or something…
-
0
votes1
answer1507
viewsUndefined object reference for an instance of a Visual Studio object
I have a problem with the id variable of my dataGridView, it is giving the following error: "Object reference not defined for an instance of a Visual Studio object". I am using Windows Form, Mysql…