Questions tagged as 'windows-forms'

1
answer

SendKeys does not work in C # in Visual Studio

I want an application that when pressing a button, the keys Alt + F4 are automatically pressed to close for example the form (it would be easier to close it by code and not having two keys pressed, but it is an example). In short, SendKeys do...
asked by 28.11.2018 / 13:26
2
answers

Does not show the form when compiling

I have this code below. It is only a Form and a Label . You have to alter the colors over time of% co_of% seconds, in this example I put% co_of% ms to see the change. As long as 0.05 is white, 500 has to be black, then...
asked by 08.06.2018 / 04:43
1
answer

Problem C # winforms LinQ

I am working CodeFirst and I have the following table in my DB and when I want to show it the query in a DataGridView brings all fields, but I want to show only 2, exactly the name and the price. What should I modify in the Linq query? var pro...
asked by 20.06.2018 / 18:30
0
answers

Get the text of an element knowing its class

This is what I find on the web: <span class="class1">30</span> How can I get 30 if I already know the value class1 automatically ? (without having to wait for him to load to give him the order) It works once an...
asked by 02.04.2018 / 10:35
2
answers

ProgressBar progress according to the data sent

I am trying to make my ProgressBar advance according to the data sent to the service. Everything works very well the problem is to let the user know the progress of the data sent using ProgressBar . private void Enviar() { Ole...
asked by 14.03.2018 / 17:26
0
answers

How to print multiple pages with PrintDocument in C # using a cycle?

Here what I tried: private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { try { string reporte = ""; if (checkBox1.Chec...
asked by 20.04.2018 / 13:16
0
answers

Error "Root element is missing" and "Unavaiable project" in Windows Forms C #

Today I had an error, I went to the visual studio, I went to my application and it showed me an error, I did not want to upload the project, it shows me a window which says    The project file could not be loaded. Root element is missing...
asked by 16.03.2018 / 02:54
0
answers

send RadioButton with SendKeys.Send ();

I am sending information from a windows form to a form. The problem I have is that the How to send Radio buttons? method: private void button2_Click(object sender, EventArgs e) { DateTime fecha = Convert.ToDateTime(txtFecha.Text);...
asked by 21.02.2018 / 12:24
1
answer

Error in System.Windows.Forms.Control.inCrossThreadSafeCall

Good morning, I have an application that in a given moment throws a Thread, inside that Thread it is called a user control where an image is put in a button inside the user control. The user control has a list of Tuples composed of a TextBox...
asked by 31.01.2018 / 11:10
2
answers

Copy and Paste into DataGridView Cells, C #

I am trying to copy the value of a celda or several and to paste it to another (%) celda(s) . I currently have this basic method that works. myDataGrid.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText;...
asked by 04.01.2018 / 22:49