Questions tagged as 'winforms'

2
answers

How to access the print screen image?

When we press the Print Screen key on our keyboard, the screen image is saved in some memory cache, somewhere, because when we give Ctrl V after, in Paint for example it apararece, how to access the location and "catch" the image from ther...
asked by 05.05.2014 / 14:04
3
answers

Design Pattern for Filters

First, filter in my current context is a list of objects to be used in ComboBox type controls so that the user can choose from the options. My scenery: Screen 1 - It has filters of companies, stocks, customers, forms of payment. Screen 2 - It...
asked by 04.08.2015 / 18:52
2
answers

Is there a way to save types not listed in Settings.Default?

In a Windows Forms application I can create configuration properties. HoweverthereisnotypeList<T>orDictionary<TKey,TValue>.Clicking"Browse" and searching mscorelib > System.Collections.Generics I see only the type KeyNotFoun...
asked by 01.01.2014 / 18:05
3
answers

Disable maximizing and minimizing of windows form

I need a solution to disable the maximize and minimize buttons in a windows form. Using WPF these two attributes would solve: WindowStartupLocation="CenterScreen" ResizeMode="NoResize" But now I need it to be in a windows form. Here is the...
asked by 14.04.2015 / 15:19
1
answer

Fill Data Grid View with property of objects

I have a form where I need to fill a DataGridView with the data of a list of users. To generate this data, I used 3 classes: User Class namespace TesteDataGridView { public class Usuario { public int id { get; set; }...
asked by 13.05.2014 / 13:43
1
answer

How to drag form without border?

I'm trying to implement a way to drag my form without a border when I click and hold the left mouse button on it, but I did not succeed. Here is an example of my attempt to implement. 1 ° I created the% and%% variables as global within the%...
asked by 06.11.2015 / 01:59
4
answers

LIKE SQL clause does not work with SqlParameter

Following the recommendation that @bigown did in this question I decided to parameterize the SQL queries of my program. See: private void btnConsulta_Click(object sender, EventArgs e) { if (optID.Checked) //Consulta por ID...
asked by 20.12.2015 / 17:13
1
answer

Can you use a dialog to open both folders and files?

Well, I'm using openfiledialog to open files, but the software needs to receive files or folders, because it compresses and zips ( .zip ) to then make a symmetric cipher. I searched through a number of sites and the like, and I d...
asked by 21.12.2015 / 14:22
1
answer

Export report from ReportViewer to CSV

In ReportViewer using Winforms , when I create the report I only have the option to export to PDF, Excel and Word and I need to add the export option in CSV.     
asked by 26.11.2014 / 11:32
2
answers

Trigger event only once

I'm doing an interface in Visual Studio 2015, how do I perform an event only once? For example: private void textBox5_Click(object sender, EventArgs e) { textBox5.ForeColor = Color.Black; textBox5.SelectAll(); textBox5.Text =...
asked by 08.04.2016 / 19:31