Questions tagged as 'winforms'

0
answers

Print on non-fiscal printer Elgin i7 c #

I'm developing a POS system and I need to do coupon printing! I am in possession of a non-fiscal printer from the i7 elgin model. I've been looking for a way to print a coupon from a Report (.rdlc) that I've been working on for a while, but I ca...
asked by 18.01.2018 / 18:38
2
answers

Accessing components from another Form

I have two Forms in my application. A Form for data from an engine that has the following fields: txtPotencia , txtTensao , and txtCorrente . I would like to access the values entered in these TextBox throu...
asked by 31.01.2017 / 13:54
1
answer

How to use DrawToBitmap in WPF to take print from screen?

Following is the functional code of WinForms : Bitmap pic = new Bitmap(label1.Width, label1.Height); Rectangle rect = new Rectangle(0, 0, label1.Width, label1.Height); rect = label1.ClientRectangle; label1.DrawToBitmap(pic, rect); // pic...
asked by 20.12.2017 / 00:19
0
answers

How can I access elements of the main thread in other threads? [duplicate]

I'm having this error    The operation between threads is not valid: 'LblCheck' control   from a thread other than the thread where it was created. Task tarefa = Task.Run(() =>{ } .ContinueWith(t => { LblC...
asked by 08.12.2017 / 16:30
0
answers

Why is the Activated event triggered more than once?

I need an event, which is triggered every time the user clicks the Form , I tried to use the Activated event but the event is triggered 8 times for the same click p> Would you like to understand why it is fired so often? Upon...
asked by 19.11.2017 / 14:26
1
answer

How to update listbox of another Form?

Follow the code below: Class: public class Louvor { public int Value { get; set; } public string Text { get; set; } } Form2: Form1 form = new Form1(); var data = new List<Louvor>(); var files = Directory.GetFiles($@...
asked by 30.11.2017 / 17:18
1
answer

Adding rows from an array to a list view Window Form

I am doing a project to solve the binomial of newton, this part is easy I was able to solve the problem in the console the way I wanted, I am now migrating to Windows Form and I have a problem to print the triangle of pascal in a listbox . I wan...
asked by 15.11.2017 / 18:23
2
answers

CellClick event, does not return DateTime value

I am writing some data in DataGridView and Event CellClick should fill DateTimePicker with the value already registered, but I am doing something wrong. Buttons: save, edit, delete, and cellclick event private void btnG...
asked by 30.10.2017 / 18:37
0
answers

Open contextmenustrip when you right-click the items displayed in the listbox

I tried this way: private void listBox1_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { contextMenuStrip1.Show(listBox1.PointToScreen(new Point(e.X, e.Y))); } }...
asked by 01.10.2017 / 16:24
1
answer

When clicking on the button of form 2 update label of form 1 [closed]

How can I pull the label from form1 to form2 to give label.Refresh?     
asked by 26.09.2017 / 20:26