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
answers274
viewsPlaysound function
I am programming a game for school work in C++, and I have a game that during its execution starts a song, then when I click on the space key to fire the music stops and only hear the shot of the…
-
1
votes0
answers370
viewsDynamic input reading in C#
I am developing a solution in Winforms C# that receives a text file via network, via HttpWebRequest: HttpWebRequest request = (HttpWebRequest)WebRequest.Create(conexao + "/piece.txt");…
-
1
votes1
answer404
viewsClear Panel from a Usercontrol
I’m developing an application where several Usercontrols will be shown in a Panel from the code below: UserControl1 u1 = new UserControl1(); panel1.Controls.Add(u1); And remove them from this code:…
-
1
votes1
answer379
viewsDo not go to another FORM1 while open FORM2 esiver
Suppose you have two Forms, the first Form1 is the main screen to which you give an option to open any other form, when any form is open, the user cannot go to the main form until you close/close…
-
1
votes2
answers221
viewsSaving checkbox information in TXT files
I’m developing an O.S. software where I’ve divided the main problems into several checkboxes. All data populated on the screen will be sent to a text file, which soon after will be viewed by the…
-
1
votes1
answer294
viewsRising Counter in a Texbox
I am developing a software that every time the user clicks on the button salvage, it needs to add the +1 value in a TextBox. Ex: Box = 1 -> Save -> Box = 2. Every time the user clicks salvage,…
-
1
votes1
answer328
viewsGenerating a New File with an Excel template when Saving
Good morning, My software works with barcode reading for generation of printed labels. It has several Texbox , each receiving a different code from the reader. By clicking on Save it sends these…
-
1
votes2
answers582
viewsPass information between C#RMS
Hello, I have a problem to pass information between windows forms Forms with C#, the problem is as follows. I have a MAIN FORM, from this I call the a SUB FORM, which happens to be the son of the…
-
1
votes0
answers389
viewsError when connecting to Mysql database using C# application in Visual Studio
Hello, I created the registration form and at the time I will save the text box items in the database of the following error 'Host 'DESKTOP_R70LLO is not allowed to connect to this Mysql server'. By…
-
1
votes2
answers1072
viewsOpen Form in tabcontrol specifies
Command to open a form in a specific tabcontrol. Example: in a form I have a tabcontrol with two tabs: register and consult. Then I wanted to (with a button) open this form right in the tab consult.…
-
1
votes1
answer783
viewsPopulate chart with mysql data
I am developing an application in C# and need to fill a graph with the amount of data registered in 3 Mysql tables. It is as follows: The graphic should inform the user in different columns how many…
-
1
votes2
answers128
viewsVisual Studio Installer Projects with Postgresql
I am starting a Windows Form C#project, a commercial application that the user downloads, installs and uses, without complications. It is possible to configure Visual Studio Installer Projects to…
-
1
votes1
answer84
viewsChange Tabindex
How do I get back the TabIndex of a Form for a given position? I tried to use the this.ActiveControl.TabIndex = 0;, but it didn’t work out.…
-
1
votes2
answers1520
viewsParameter in bold C#
I have the following string: string frase = string.Format("A data de hoje é: {0}", DateTime.Now.Date); Is there any way to make the parameter bold?
-
1
votes2
answers1587
viewsCreate line chart windows form
Hello, I need to create graphics in windows form of dynamic forms, this working correctly, however I would like the graph to be of line, and this generating of bars, anyone could help me? Code:…
-
1
votes1
answer77
viewsHow to put a form inside a tab?
I want to add a form inside a tab, I have tried using the command "this.tabPage1.Controls.Add(new Form1);" and it did not work, how to proceed?
-
1
votes1
answer234
viewsDatabinding for JSON.NET objects: how to implement?
My application handles a lot of HTTP requests that return JSON data. I use the JSON.NET library to manipulate them. Here is a simulated and quite summary example of the information (there are…
-
1
votes1
answer36
viewsRelease of the datagridi dviewr gridi on the change button
Good morning, I have a question, I have a datagridviwer, I unchecked the option to change the fields, and I need to do that when the user clicks the change button I free the grid for change, how can…
-
1
votes1
answer186
viewsProblem when displaying one form within another
I’m having trouble displaying one form inside another through a panel. The point is that by modifying the state of the main form of WindowState == FormWindowState.Normal for WindowState ==…
-
1
votes0
answers568
viewsUI and desktop development . NET
I am at the beginning of the development of a commercial application in C#, however, I have my doubts about how I will do the visual part of the application (UI). I’ve worked with Windows Forms and…
-
1
votes1
answer205
viewsSecurity Certificate error in Webbrowser
I’m working on a winforms program that basically uses the WebBrowser to access the website of the federal revenue using the digital certificate. My problem is the following, first of all, I got this…
-
1
votes0
answers1111
viewsUnable to load file or Assembly 'Interop.Micropoint_ip_realtime'
I’m with the ERROR below when running the project in Debug(in Release works normally): An unhandled Exception of type 'System.IO.Filenotfoundexception' occurred in Slim.exe Additional information:…
-
1
votes1
answer147
viewsAccess Restriction, in Design of Visual Studio,com C#!
During my computer technical course, in the Programming module, I did a project with Windows Form! This project is linked to a database created by myself in SQL Server! It would be a "software" for…
-
1
votes1
answer73
viewsHide form using F1 key C#
I have form more precisely a menu of options and wanted to hide that form when I press the key F1 and show when to squeeze F1 again. I tried to follow this tutorial of the link that uses hook…
-
1
votes2
answers730
viewsClass with method to change a parameter
I have a User class with private attributes like Nome, Endereco and Telefone. This class has a constructor method that takes parameters such as nome, endereco and telefone. I would like to use a…
-
1
votes1
answer102
viewsUpgrade from many to many with EF 6
My problem is when I try to update an entity that has a child class that in turn has other children. The structure is this: public class Diagrama { [Key] public int Numero_Diagrama { get; set; }…
-
1
votes1
answer378
viewsForce user to select Radio Button inside the Groupbox
How do I force user to select a Radio Button inside the Groupbox. Example of the image below…
-
1
votes1
answer122
viewsProblem to save content C#
I’m trying to make a replica of the notepad, in the part of saving content in richTextBox1.Text I’m having the problem: System.IO.Ioexception:"Process cannot access file 'file path' because it is…
-
1
votes1
answer1391
viewsSave data from a textbox to a class and display on a datagrid
I am making a program for simple registration, without using database, only with array. The program was already functional when I noticed that the most important part was wrong because I had not…
-
1
votes1
answer53
viewsData query in a datagrid (registration program)
The problem I’m having is that I don’t how to display in datagrid only the name of the users to be possible to query each registration in this database when selected, and then displaying all that…
-
1
votes1
answer102
viewsClick event does not work in custom control
I created a button (Usercontrol), until then ok, but when I put an event Click in it, does not work, already tried with the event Mousedown, also did not work. I don’t think this is it, but this…
-
1
votes0
answers120
viewsWindows Media Player
So I’m creating a media player in Visual Studio, and the only way I could find to get the video to go was through the Windows Media Player component. I also found that to remove the bars where the…
-
1
votes3
answers341
viewsSetting Focus() in Usercontrol Textbox
I have the following Usercontrol : public partial class SliderChrome : UserControl { private int _min; public int Min { get { return _min; } set { txtmin.Text = _min.ToString(); } } } I use this…
-
1
votes1
answer648
viewsImport MS Access data to Sql Server via code
I need to import data that is in an Access database via Sql Server code. My software that is made in C# for many years has been integrated into an Access database. From now on we are migrating to…
-
1
votes1
answer1211
viewsc# layer development (BBL, DAL, Model, GUI)
In my project I am developing in C# using windows Form Application with the pattern of development in Layers I am in doubt if this form is correct? because I’ve researched a lot about layers, but I…
-
1
votes2
answers1505
viewsSearch file path C#?
I need to find a file path .wav in C#. I can find and execute the .wav with the complete path "c: caminhox...", however, I need the application to find the file in any directory that he is. I tried…
-
1
votes2
answers223
viewsScroll through buttons and text box with tab
Good afternoon everyone, inside windows form I put several text boxes and buttons, but when I navigate between with tab they are disordered, I know that if I do one by one will be in order, but it…
-
1
votes2
answers328
viewsFilling out a form’s textbox with information from a datagridview
I have a datagrideview in a form, and I need that when I click the datagridview cell it fill two fields in another form. As I show in the image below. also follows my code public partial class…
-
1
votes1
answer154
viewsHow to simulate mouse clicks in a background program
I’m like a problem to use the functions SendMessage and PostMessage in C# to simulate clicks mouse in a minimized program (in the background). I used this code but it didn’t work, I believe it’s the…
-
1
votes1
answer51
viewsTest Expression as user type
I’m having problems trying to test an expression as the user type. I have a TreeList where the user will enter a code, this code has the model: XXXX-XXXX-XXX I mean, it could be anything like:…
-
1
votes1
answer53
viewsHow to inhibit textbox but display ID data
I would like the Textbox ID to be inhibited (I don’t want to be invisible) but to display ID data that is saved (autoincrement) in the database. I’m using Visual Studio 2015 Community. Example: I…
-
1
votes1
answer323
viewsHow to handle different combobox data at runtime
I have a textfield and a combobox next to it... Follow the image I want to make sure, given the value in the field textfield, I want you to click on other item of the combobox, the value is…
-
1
votes1
answer849
viewsNumber of lines in Datagridview
I have a Datagridview and I need it to show me in a textbox the total number of lines that we have Datagridview. how can I do this. Below follows my code private void ListaGrid() { string strSQL =…
-
1
votes2
answers173
viewsHow to read only one line from a file in c#
I know how to read the whole file but how can I read only one line EX: read line 3 only
-
1
votes1
answer340
viewsTo return multiple rows with sql Server byte array
I need to perform a query, in a table, where the data is of the type varbinary(max), then created the method below: public List<byte[]> preenche_fotos(string nCrm) { consql.bd_string();…
-
1
votes2
answers952
viewsHow to center text in a Messagebox?
Right now I have this code: MessageBox.Show("Verificação da password incorreta \n Insira novamente"); And the output gets like this: Verificação da password incorreta Insira novamente How do I make…
-
1
votes1
answer59
viewsHow to detect when the mouse is pointing to a button
I have a form where certain actions will be executed only when a button btn have the mouse cursor on it, which button event I use ?
-
1
votes1
answer365
viewsHow to locate an object by name only?
I’m 6 PictureBox, then, when saving the photo in the database, save together in which PictureBox she was. So when uploading the photos in a view, I need each photo to be displayed in its respective…
-
1
votes1
answer50
viewsForearch loop how to use with controler
I’m 6 PictureEdit in a PanelControl, and I need to make a run at all the PictureEdit then I made the following code: foreach (PictureEdit Pic in panel1.Controls) { //habilita o meno de zoom…
-
1
votes1
answer492
viewsC# BD . mdf connection string
Good evening, you guys, I have a database . mdf in a Windows Forms and want to make the connection string of it, can anyone help me? My version of Visual Studio is 2015 and the file is: C:Documents…