Questions tagged as 'winforms'

1
answer

How to plot routes in a C # Windows Forms application from latitude and longitude

Hello, I would like to know how best to display a route from the latitude and longitude that are in the database in a C # Windows Forms application. I've already searched the web and I've found something similar to what I need, link But I still...
asked by 12.02.2015 / 12:16
3
answers

Difficulty in popularizing GridView

I have a screen that I query clients and fills in a grid with the information that comes from the database, my project is layered up to where I'm working, but I can not fill in > grid with some information, I have the following situation insid...
asked by 09.02.2015 / 23:34
2
answers

Error when closing Forms

I have the following code snippet to close my application. private void frmAgent_FormClosing(object sender, FormClosingEventArgs e) { if (MessageBox.Show("Deseja realmente fechar o sistema?", "Atenção!", MessageBoxButtons.YesNo, Me...
asked by 22.01.2015 / 16:20
1
answer

How to save scrollbar position?

I would like to get the scrollbar position of DataGridView , so after giving a refresh , continue in the same position.     
asked by 26.02.2015 / 14:50
1
answer

How to capture file size of System.Drawing.Image?

I have a method to which I pass the parameter System.Drawing.Image and the percentage that that image will be after resize . public static Image ResizeImagem(Image imgFoto, int percentual) { float nPorcentagem = ((float)percentual / 1...
asked by 19.11.2014 / 14:11
2
answers

How to transform a DLL created in C # to VB6?

I've created a pretty basic C # DLL, just to test. It looks like this: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Runtime.InteropServices; namespace CriarD...
asked by 31.01.2014 / 01:59
1
answer

Where to put the connection string to the database?

I have the form: Thedatabaseandtheregistrationtablehavealreadybeencreated,IamusingwampserverandMySQLWorkbench.Myquestioniswheretoputtheconnectionstring:MySqlConnectionconn=newMySqlConnection("Persist Security Info=False;Server=localhost;Datab...
asked by 05.07.2014 / 23:13
1
answer

NullReferenceException in Winforms code

Ithinkit'sabugnotinthecode,butinthecompiler...WhenIeatthiscodearea,theerroralwaysgoestothenextvariable,ormethod.See: Partofthecode:grpBoxMDeck[i]=newSystem.Windows.Forms.GroupBox(){Location=newSystem.Drawing.Point(76,yG),Size=newSystem.Drawing....
asked by 29.04.2018 / 22:35
1
answer

Unrecognized element (File download)

I'm trying to make a code to download the file to a folder and it returns me this error Unrecognized element. Code: string pasta = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86) + @"\teste\"; download = new WebClient()...
asked by 31.05.2018 / 19:58
2
answers

How to close all forms I want in C #

Suppose I have 4 forms: form1 , form2 , form3 and form4 . Knowing that the form1 window will always open first and when I give .close() to form2 it, along with the others, should close. How do I achi...
asked by 04.06.2018 / 05:31