Questions tagged as 'windows-forms'

1
answer

I get an error when saving image: A generic error occurred in GDI +. C #

It turns out that I'm trying to save an image on my computer, but I get the following error:    A generic error occurred in GDI +. The code I have is the following: private static void StartBrowser(string source) { var t...
asked by 03.12.2017 / 20:09
1
answer

Read xml without path

What a good day, I've seen many examples of how to read xml files, but they do it from the path of the file. However, I want to search the xml files. with the OpenFileDialog (It should be noted that the xml have the same structure, the nodes do...
asked by 04.12.2017 / 22:31
2
answers

Collect the exception value in numericUpDown

I have several controls of type numericUpDown, the fact is that each of them has a minimum value and another maximum value by default. The user has a keypad where he presses a button with a number from 1 to 9 and a special button to erase the la...
asked by 03.01.2018 / 13:05
1
answer

When using CONCAT, I get an error saying "The input string does not have the correct format"

It turns out that data charges to DataTable in the following way: private void cargarempresas() { dt_hogar = new DataTable(); String sql = "SELECT CAST(CONCAT(nombre,'-',apellido)AS CHAR) AS nombre,fechacreacion FROM hogar";...
asked by 24.07.2017 / 07:34
1
answer

Save Dataset to table sql server in window form c #

good afternoon I'm making a datatable saved in a sql server table but I get the following error: this is my code: DataSet result; dataGridView1.DataSource = result.Tables[cboSheet.SelectedIndex]; //string valor = data...
asked by 30.08.2017 / 05:32
1
answer

Draw a picturebox, drawing lines and joining points

I have a form with winForms and c # where I have two pictureboxes and some textboxes that fill in these values generate a graphic joining the points x1 - > x2 ... then x2 - > x3 and so on. The code I have is this. In the textChanged e...
asked by 29.05.2017 / 10:08
1
answer

Error connecting to an Azure SQL database from a Vb.NET Winforms application

I have an application made in visual studio 2015 with winforms and visual basic which works with a database on a SQL Server 2008 R2 server that is located within the same local network of clients. I currently want to migrate the database so t...
asked by 25.07.2017 / 23:03
1
answer

Select the contents of a TextBox by taking the focus

Is there any way that when the focus is positioned on each type control TextBox contained in a form, select the text contained in these? I mean if there is any way to do this without having to program the ENTER event for each text box,...
asked by 20.04.2017 / 19:35
2
answers

Pass value from one combobox to another label of another form in visual basic

Hello good afternoon Family. a query how can I pass value from a combobox to another label of another form? I'm doing this code in my first form: Private Sub DtgImportar_CellDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handle...
asked by 11.05.2017 / 22:46
1
answer

Problems when closing my form in C # (the confirmation message is repeated)

My problem is that my form has an event to close and in fact it does it correctly as long as I do not return to where the event occurred, this means that while I browse through other windows except the initial one, it appears the message only on...
asked by 08.03.2017 / 19:41