Questions tagged as 'winforms'

1
answer

View PDF document windows forms

Is there any property of viewing a .PDF file from the Click event in PictureBox without having to create a new modal? Example: I have this PictureBox , where I created the code below, that as soon as it is clicked the option to print...
asked by 04.01.2018 / 18:52
1
answer

System.ArgumentException: 'Invalid parameter.'

I created a button with button24_Click_1 to take printscreen of Form1: private void button24_Click_1(object sender, EventArgs e) { var frm = new Form1(); using (var bmp = new Bitmap(frm.Width, frm.Height)) { frm.Draw...
asked by 02.12.2017 / 20:24
1
answer

Doubt - Design on the secondary screen and Form

The following event code click: //Estendido telaSecundaria = new SegundaTela(); Screen[] telas = Screen.AllScreens; Rectangle bounds = telas[1].Bounds; // pode ser outro índice. telaSecundaria.SetBounds(bounds.X, bounds.Y, bounds.Width, bounds...
asked by 02.12.2017 / 18:06
2
answers

How to center panel inside groupbox?

How can I centralize panel1 in groupbox ? Follow the code below: private void Form1_Load(object sender, EventArgs e) { // aqui defino novo size do panel1 panel1.Size = new Size(591, 423); } The problem is that pan...
asked by 24.11.2017 / 00:34
1
answer

Create a list with a Model and an Int in C #

I have the following class: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Dynamic; namespace Model { class PromocaoQtdeVendidaModel { private int idPromocaoQtdeVendida;...
asked by 24.10.2017 / 16:59
1
answer

Redeem button through id

Good evening, I am developing a graph, academic work .. .. The idea is to do a "maze", so I generate the same at runtime, and I keep a "reference" of each button in a list, but I got to a point where I need to change the color of a button and...
asked by 25.10.2017 / 00:25
1
answer

Calculate ProgressBar Circular Time C # (Windows Forms)

I have the following ProgressBar circular, the idea is that it be decremented second by second, so far so good. However, I need the bar to start always full (circling 100%) and the value will be given by the user, so it can be 120 minutes, 90 mi...
asked by 04.11.2017 / 15:55
1
answer

Error trying to save information to the database through the Entity Framework

My project has the following classes: public class Manifestacao { public long Id { get; set; } public string NumeroChamado { get; set; } public virtual Cliente Cliente { get; set; } public virtual List<Conteudo> Conteudo...
asked by 04.10.2017 / 16:12
1
answer

Error loading database information into a datagridview through the Entity Framework

My project has four classes: public class Manifestacao { public long Id { get; set; } public string NumeroChamado { get; set; } public string DataHoraReg { get; set; } public Cliente Cliente { get; set; }...
asked by 30.08.2017 / 20:16
1
answer

Open 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 (with a button) to open this form directly in the consult tab.     
asked by 28.07.2017 / 20:26