Questions tagged as 'winforms'

1
answer

Identify two modifier keys pressed

How to identify which two keys are pressed inside a click event of a button? Example: Button btn = new Button(); btn.Click += Btn_Click; private void Btn_Click(object sender, EventArgs e) { // Assim consigo identificar que uma tecla está...
asked by 05.02.2018 / 17:19
1
answer

How can I check if all textbox is empty? [closed]

Code: if (string.IsNullOrWhiteSpace(txtNumero.Text) && string.IsNullOrWhiteSpace(txtTitle.Text)) { MessageBox.Show("Preencha todas as informações"); } I tried to do with & and it does not work, how can I do it? I want to che...
asked by 26.09.2017 / 15:01
2
answers

How forms are opened - Visual Studio

Good morning, My problem is that when I start the program it looks like this: That is, the child form nor the scroll bar has there cut the other options Tosolve,Imaximizetheparentform,butitlooksvisuallystrange,see: HowcouldImakethechildfo...
asked by 21.09.2017 / 16:29
3
answers

Adding the data from a sql column C #

My problem is this: I need to add the total hours of the employee that are in the bank, already in a separate column. Just to make it clear, the hours that the employee worked on the day are ready, I want to add these total hours. Note: I think...
asked by 24.08.2017 / 04:55
1
answer

Disable action on the mouse moves C #

I have a problem in my code, I have some actions on mouse moves in C # and would like to disable them. Whenever I drag the mouse to the listbox of my form, it already does the action, I would like to leave it in the mouse click, but I am in diff...
asked by 25.09.2017 / 16:27
1
answer

Error editing registry more than once with EntityFramework C #

When editing a record and saving for the first time the entityframework performs the update successfully, however when I click again to edit and save the registry I encounter the following error:    Error saving record: Attaching an entity of...
asked by 25.09.2017 / 22:33
1
answer

How to encrypt a .txt file in Windows Forms C #?

I have a job to do where I need to save data from a list to text files. These data are for the most part, password , username , idade , nacionalidade and numeroCC . At work you are asked to encrypt username ;; pas...
asked by 06.09.2017 / 12:13
1
answer

How to insert command key in C #

Someone could help me, I wanted to create a command with the keys CTRL + Z or something like that to save, edit or send data as a shortcut to a button created in Form .     
asked by 30.06.2017 / 19:05
1
answer

Changing the ToolStripStatus value while typing in the RichTextBox

I'm developing a text editor just to practice. But I came across a little problem, I would like that while the user is typing, the value of the ToolStripStatus that by default is 'READY', wanted to change while typing 'READY' TO 'DIGITI...
asked by 27.06.2017 / 18:25
1
answer

Problem in leaving form as top C #

I have 2 forms. The main one contains a button that opens the second form inside the main. private void btnCalculadora_Click(object sender, EventArgs e) { Calculadora = new frmCalculadora(); Calculadora.TopLevel = false;...
asked by 22.06.2017 / 18:56