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
answer19
viewsChange Toolstripstatus value while typing in Richtextbox
I’m developing a little text editor just to practice. But I ran into a little problem, i wanted that while the user is typing, the value of Toolstripstatus that by default is 'READY', wanted to…
-
0
votes1
answer1615
viewsHow to insert control key in c#
Someone could help me, wanted to create a command with the keys CTRL + Z or something to save, edit or send data, as a shortcut to a button created on Form.…
-
0
votes1
answer702
viewsQuery image in a folder
I am creating a program in windows form and in this program I would like to select an option in the combobox and it load the image in the picturebox. This image will have the name that was selected…
-
0
votes1
answer84
viewsProblem with Combobox - Systemdatarowview
I have a problem. My software has an order registration screen and in it there are some Combo Box that pull certain information according to what is selected in the Product (Cake, Candy or Cupcake)…
-
0
votes1
answer119
viewsHow to remove a selected item in treeview c#
I am developing a new application but I have a final problem to solve and I have tried googlear and nothing I can not find any example. in fact I want to delete the item in treeview that was…
-
0
votes0
answers43
viewsLosing Data from Designer.Cs File While Opening Form - C# Windows Form Application
I have a custom editor that adds buttons to a collection. This procedure is working well, the data is serialized in the Designer file but when I reopen the form or build the project, the data that…
-
0
votes1
answer100
viewsComparison of database dates with system date
Hello! I need to compare the month of registration of information present in a database table with the current month provided by the system. In the database I register in a column the number for the…
-
0
votes0
answers543
viewsHow to transport information from datagridview to a textbox in another form?
I have the following question on my application. I have Form1 and in this Form1 I have two textbox, txt_cod.text and txt_fornec.text and a search button, when I click on the search button of this…
-
0
votes1
answer527
viewsHow to remove Windows BIP sound in c#?
I hope you guys are okay. I developed a C# application in Visual Studio, but when pressing the 'TAB' key to change textBox1 to textBox2, it makes the sound of Windows (which is actually the ENTER…
-
0
votes2
answers554
viewsHow to make the main form invisible c#
How do I make the main form created by Visual Studio invisible after opening another one? I tried to use the "Hide();" command, but I was unsuccessful. code : using System; using…
-
0
votes1
answer212
viewsPlay Values from one Datagridview to another Datagridview
Good evening guys, I’m having a problem. I have a datagridview that is connected to the bank. I Fis a filter on this normal grid. Now I want to take the filtered values of this grid and play in…
-
0
votes2
answers276
viewsAccepting null fields from a Texbox
When I click on "Save", the program does a check of Texbox with a deal that I did not let pass repeated numbers, the problem is that it error if any Textbox is blank. Below is the Code I made saving…
-
0
votes1
answer1275
viewsTransparent form with image C#
Next I’m making a tutorial screen for the program, I did not find a good solution to do. I created a screen over another with transparency, so far so good, but when I put an image on this screen, it…
-
0
votes2
answers414
viewsHow to reference an html button in C#
I have the following snippet of HTML code : This code belongs to a page of an Air OS radio (internet radio). I need to reference this button inside a program made in Windows Forms and do a function…
-
0
votes1
answer656
viewsIsession +Nhibernate (no Session or Session was closed)
In a Windowsforms project Using Repospository pattern, in a Generic class I have the following method: public IList<T> Listar() { using (ISession session =…
-
0
votes1
answer477
viewsHow to adjust the Form according to the size of the Picturebox?
How do I resize my form according to the size of the Picturebox component? In this case, the images in the Boxes may have different sizes. So I would like my Form to fit the size of the Picturebox.…
-
0
votes1
answer380
viewsConnectionstrings: Write to app.config or windows registry?
My question relates to what is the best way to maintain the ConnectionString of my system on disk to be read as needed, ie what is the best way to do this by writing it to the file app.config, or…
-
0
votes0
answers147
viewsX-axis time of graphics C#
I have the following chart in my Windows Form: I set the X axis to display Time, as shown below: Below the methods I call to draw the graph: private void funcaoQualquer() { while (true) {…
-
0
votes1
answer68
viewsRotating alternative in Azure
I use the rotary on my system, but when running the same on Azure as a Web Application because the Azure does not allow file execution .exe. So I need some other Framework which replaces the rotary…
-
0
votes1
answer75
viewsHow to change Backgroundimage location in windows Forms
I have a Picturebox object that has an image set and behind it I put a background but I can’t change the background position pb.ImageLocation = Directory.GetCurrentDirectory() +…
-
0
votes1
answer437
viewsHow to create this expression in C#
At first, the program I made the calculation using the following expression: valorComDescontos = valorTotal - (valorTotal * percentual); Where the valorTotal is a value assigned by the user (a…
-
0
votes2
answers1130
viewsWebservice consumption only runs in debugging under the Visual Studio IDE
My Winforms VB.NET application consumes a webservice to perform some queries. When running in debug or release mode under the Visual Studio IDE, it works perfectly, but once it’s distributed on the…
-
0
votes1
answer304
viewsDisable action on mouse move C#
I have a problem in my code, I have some actions on mouse moves in C# and would like to disable them. Whenever I drag the mouse to the listbox of my form, it already does the action, I would like to…
-
0
votes1
answer136
viewsError editing record more than once with Entityframework C#
When editing a record and saving for the first time entityframework performs the update successfully, but when I click again on edit and save the record I come across the following error: Error…
-
0
votes1
answer2285
viewsHow can I check if all textboxes are empty?
Code: if (string.IsNullOrWhiteSpace(txtNumero.Text) && string.IsNullOrWhiteSpace(txtTitle.Text)) { MessageBox.Show("Preencha todas as informações"); } I tried to do with && and it…
-
0
votes2
answers622
viewsConstructor method for calculating age
I am making a very simple client registration application I would like to know how to program a method that calculates and returns the age (in years) from the attribute Anonascimento. I know how to…
-
0
votes1
answer836
viewsWhen you click the form 2 button update form 1 label
How can I pull the label from Form1 to form2 to label. Refresh?
-
0
votes1
answer115
viewsProblem in Dialogresult having to press the button 3 times to open
I’m having a serious recurrence problem with Dialogresult. This is the Login screen, thanks to the use of Dialogresult, there is a strange error, you have to press Login twice. The first one picks…
-
0
votes2
answers504
viewsEditing Row by a textbox and receiving in the datatable
I have a class that has two methods that receive what is typed in textBox, all this stored in one dataTable (without database). When I click on a line (Row) of dataGridView I show the values saved…
-
0
votes0
answers195
viewsOpen contextmenustrip when right-clicking on the items displayed in the listbox
I tried this way: private void listBox1_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { contextMenuStrip1.Show(listBox1.PointToScreen(new Point(e.X, e.Y))); } }…
-
0
votes1
answer49
viewsInsert with Postgresql datatime and c#
I would like to ask a question, because the first date does not work? Cmd.Parameters.Addwithvalue("@dtUltAccess", "2017-01-01 01:01:01+09"); Error that returns: Error inserting user - Error: 42804:…
-
0
votes3
answers248
viewsUsing Cellclick to load data from a record
I’m doing a C# application in Visual Studio Windows Forms without using a database, I’m controlling everything for a class (Person) and two more classes (Personal and Personal) inherited from the…
-
0
votes0
answers296
viewsBlock Datagridview Changes
I’m creating a C# order screen with Windows Forms in which the user fills in the order item data and then clicks on an "Add" button, which instantiates a Pedidoitem object, adds it to a list and…
-
0
votes2
answers4220
viewsAdjust Form layout according to monitor resolution
I made a form in fullscreen, where the monitor I use is 23'' inches. But where the functionality will be deployed, they use 19". When I executed, the Form did not get the size of the smaller…
-
0
votes2
answers170
viewsHow to center panel within groupbox?
How can I center panel1 within groupbox ? Follows code: private void Form1_Load(object sender, EventArgs e) { // aqui defino novo size do panel1 panel1.Size = new Size(591, 423); } The problem is…
-
0
votes1
answer138
viewsError calling form screen
I’m having trouble loading a menu through another screen follows my code below. What would be a possible solution, for such error? public partial class frmMenu : Form { public frmMenu() {…
-
0
votes1
answer43
viewsDoubt - Project to the secondary screen and Form
Follow the event code click: //Estendido telaSecundaria = new SegundaTela(); Screen[] telas = Screen.AllScreens; Rectangle bounds = telas[1].Bounds; // pode ser outro índice.…
-
0
votes2
answers448
viewsThe "Color.Name" property or indexer cannot be assigned, as it is read-only
Follow code where I define SegundaTela: public partial class Form1 : Form { SegundaTela telaSecundaria; } Code: telaSecundaria = new SegundaTela(); telaSecundaria.label_segunda_tela.BackColor.Name =…
-
0
votes0
answers52
viewsHow do I access threadmain elements in other threads?
I’m with this mistake Threaded operation not valid: 'Lblcheck' control accessed to from a thread other than the thread where it was created. Task tarefa = Task.Run(() =>{ } .ContinueWith(t =>…
-
0
votes2
answers615
viewsHow to play something similar to CSS in Windows Form?
I would like to make a program with the same appearance/style as the site, but in Windows Form CSS does not work because it is a Web technology. So how could I do something like that?
-
0
votes1
answer664
viewsPush notifications
I am developing a program in which several users will use, and would like to develop a system with notification Push, for when some user performs a Insert in the database. I would like it to be, for…
-
0
votes1
answer118
viewsPrevent, confirm or Dismiss javascript Alerts in a VB.NET webbrowser object
I am facing problems with javascript alerts on my webbrowser. I’m creating an automation and after giving Ubmit on some pages in webbrowser, Javascript alerts appear with the protocol generated by…
-
0
votes1
answer144
viewsHow to highlight a word using REGEX
I need to colorize a text in Richtextbox before a string For example: "Highlight: normal highlight"
-
0
votes0
answers323
viewsC# Windows Forms - Integrated Database
I will develop a Desktop application, and this application will make access to Local Database, my question is: If I make an application that accesses SQL Server normally, when I generate the release…
-
0
votes1
answer687
viewsExchange "Web Browser" Vb.net
I want to change the default browser of visual studio, I would like to use another to run some scripts that are having problems in internet explorer. I would like suggestions and examples of how to…
-
0
votes0
answers1244
viewsPrint to the Elgin i7 c#
I am developing a PDV system and I need to print coupons! I am in possession of a non fiscal printer of the i7 model Elgin. I have been for hours looking for a way to print a coupon from a Report…
-
0
votes1
answer139
viewsIdentify two pressed modifier keys
How to identify which two keys are pressed inside a button click event? Example: Button btn = new Button(); btn.Click += Btn_Click; private void Btn_Click(object sender, EventArgs e) { // Assim…
-
0
votes1
answer38
viewsMask for variable size input field with windows Forms
How to make an email mask in a Windows Forms application ? To using Maskedtextbox that to validate fixed size fields, example: ZIP CODE and CPF the problem is when the mask is of varied size for…
-
0
votes1
answer44
viewsDoubt about looking for buttons
The idea is: In the field of "Fetch Game...", I look for the buttons, which are already named with their respective games: btnArcheAge, btnDiablo3, btnWoW, etc. The tags are also already named with…
-
0
votes1
answer2333
viewsHow to capture a key pressed in C#
I have an application with digit buttons and want to capture keystrokes and run the events of these buttons. I added an event of keypress in the window and tried to capture the typed key, but could…