Questions tagged as 'windows-forms'

0
answers

DataGridView with property ColumnHeadersVisible false does not allow selecting cell CheckBoxColumn c #

I have a DataGridView which has no DataSource associated, but it is filled manually. With two columns: Column 1: seleccion Column 2: descripcion . dgrid.Rows.Add(new object[] { true, "ADMINISTRACIÓN"}); d...
asked by 18.05.2018 / 21:18
1
answer

Problems with Graphics in C # VisualStudio

I'm trying to draw in C # with the graphics class, so I create a panel (to which I set width: 500 and height: 300) and execute it by printing the length and width of the panel by console and print to me that It is 375x244. Why does this happen?...
asked by 11.05.2018 / 23:45
0
answers

Running several times a task?

I have a method button_click which runs a task and another that cancels it. The problem is that when trying to run the task again it throws an exception: 'Start can not be invoked in a task that has been completed.' This is my code: pri...
asked by 13.05.2018 / 07:20
1
answer

Run powershell scripts from Windows Forms C #?

I need to run the following command that is in an auth.ps1 file $session = New-PSSession -ComputerName 'SRV2KDC.microsspr.local' -Credential (Get-Credential) Invoke-Command $session -Scriptblock { Import-Module ActiveDirectory } Import-PSSessi...
asked by 11.05.2018 / 18:58
0
answers

Datagridview Data to textbox error

Clicking on a selected row sends me the data in TextBox but sends me in each TextBox the text of DataGridViewTextBoxCell { ColumnIndex=2, RowIndex=2 } someone who can help me?     
asked by 10.05.2018 / 02:56
0
answers

Generate labels with C #

I am programming a system to generate labels, before I relayed it through code (with the ZXing library) and its labels as well. Example of how I currently print the tag: private void printDocument1_PrintPage(object sender,...
asked by 08.05.2018 / 20:34
1
answer

Can a checkbox be validated with errorprovider?

I have 2 checkboxes one to select "YES" and another to select "NO", I have validated some controls like textbox or combobox with the ErrorProvider control, I wonder if that validation can be done with a checkbox so that the symbol of error next...
asked by 19.04.2018 / 18:43
1
answer

Return Windows Forms value

I have an application that must return a value to the method that invokes it, I have been researching but most examples are of console applications and mine is of Forms. I have tried this way: Program.cs [STAThread] static string Ma...
asked by 20.04.2018 / 17:29
0
answers

Do the controls on my form move by just scrolling?

I need to add more controls to a form but when I try to scroll to go to the end of the form and put my controls, simply doing that already get messed up. I'm using the layout control of DevExpress. Any suggestions on how to avoid getting out of...
asked by 17.04.2018 / 00:33
0
answers

Link two checkbox controls in winforms?

I have 2 checkboxes that have text "Yes" and the other "No", they are an answer to a question, what I want to do is if a checkbox is automatically selected to deselect the other one. Is there any property that can be configured to do it without...
asked by 18.04.2018 / 00:13