Questions tagged as 'winforms'

1
answer

Get Variable from one Config directly to another Config

A doubt. Is it possible to get the value of a variable from a config directly inside the other config? Example possible below. Config1.config: <add key="webservice" value="http.teste.com" /> Config2.config: <add key="webservic...
asked by 18.10.2016 / 19:34
2
answers

Download all files from a folder in FTP?

Good morning, I'm developing a system that exchanges .txt files via FTP. I need to download all the files that are in a certain folder. Today I can download one file at a time, in case I pass the connection credentials, folder name and fil...
asked by 19.07.2016 / 15:37
1
answer

Tcp Server stops responding

This is the following I have been watching 2 tutorial of how to do a tcp Server and a tcp Client . I had to follow everything step by step but for some reason when I start the server it stops responding, but when the client connects it from a...
asked by 26.08.2016 / 11:21
1
answer

C # DataGridView align header in center

I'm suffering to get the DataGridView header aligned. I want the text to be centered in the center. Here is the code: dg.EnableHeadersVisualStyles = false; // Desabilita formatação padrão dg.ColumnHeadersDefaultCellStyle.Fon...
asked by 05.06.2016 / 16:55
1
answer

Catch file size through OpenFileDialog and save to a ListAttachment

I'm doing a WindowsForms application to send email, within that application I have an OpenDialog that selects the files and saves them inside a: List<Attachment> AttachmentList = new List<System.Net.Mail.Attachment>(); As...
asked by 28.05.2016 / 02:11
1
answer

The angles are crazy!

I am creating a simple orbit system, where you have the earth and the sun, created based on a UserControl , the problem is that I do not know why the angle gets wacky when placing an angle in the Angle property. The control is thi...
asked by 15.07.2016 / 08:24
1
answer

include decimal places 1500 and leave it as 1500.00 without comma!

I have an integer value of 1500 in the variable valuemonetary and I want to send it to another valuevalue variable like 1500.00. How to do in C #. I've tried conversions and nothing happens ... In the end, the variable ValueDecimal should be fil...
asked by 21.09.2016 / 20:31
3
answers

Bringing winform window to front

There are some parts of my application that need the user's feedback, such as asking about whether to update, or the system activation screen, but sometimes these screens, or messagebox, are left unselected, and are behind the window chain. I ne...
asked by 19.05.2016 / 14:52
2
answers

How to Popular a TreeView with Directories and System Files in C #

In my application (Windows Forms) I have to make a directory tree for the user to search for one (or more) file (s) within his system. I saw on the Web how to make this tree in a Microsoft tutorial, but in their example the TreeView only disp...
asked by 18.03.2016 / 15:27
1
answer

Parameters in Query

When assembling a Query using AddWithValue. Even if it's right, the return is not as expected. In the example below, the return is Zero var query = "SELECT nome,usuario,email,administrador FROM GSCUsuarios WHERE @parametroWhere = @parametro...
asked by 16.12.2015 / 21:26