Questions tagged as 'winforms'

1
answer

Is it possible to create a class from a routine to open forms? As?

I have several forms that I 'instantiate' by the click event in the toolstrip, however it seems that it is getting polluted since all codes do the same routine changing only the parameters. Event to open and check if the Registration - Clients...
asked by 26.09.2017 / 14:10
1
answer

How to make the computer choose between two characters

Well, I'm not sure if this is the case, but I'm not sure how to do this. class random, but I found some problems, as I'm working with string.     
asked by 01.06.2017 / 23:28
2
answers

Checking fields ComboBox, TextBox MaskedTextBox [closed]

How to create a method to check if all fields "ComboBox, TextBox, MaskedTextBox" are populated? Mine does not work public bool CampoVazio() { bool ok = false; foreach(Control ctrl in this.Controls) { if(ctrl is TextBox)...
asked by 24.05.2017 / 21:29
2
answers

Search only WEB date

I need to search the date acts from the Internet, in the code below the return is the date, time, minutes and seconds. public static DateTime GetNistTime() { var myHttpWebRequest = (HttpWebRequest)WebRequest.Create("http://www.micr...
asked by 31.05.2017 / 00:00
2
answers

CheckBox concatenating string several times

Iwantedtoclickonthecheckboxandthenontheregister,savethealreadypredefinedvalueandservicename(description)inthedatabase.However,thedescriptionisaproblemforme,becausewhentheusermarksandunchecksthecheckboxseveraltimes,itendsupconcatenatingmorethanex...
asked by 28.02.2015 / 03:51
2
answers

Error populating combobox - An unhandled exception of type 'System.InvalidOperationException' occurred in mscorlib.dll

This is a cod. to populate a combobox with a list that will populate through the insert event that will retrieve a value from a textbox, and will cause the selected name in combobox1 not to appear in combobox 2 and so on respectively. I'm hav...
asked by 21.05.2014 / 01:15
1
answer

MVC project in C # throwing Exception System.InvalidCastExecption

Dear colleagues, I am trying to learn to develop a project in MVC. But I'm having some difficulties. When executing the program, it executes normally, however when I want to record a product entry note it throws this exception according to the i...
asked by 17.07.2018 / 15:35
1
answer

Decode string encoded by javascript in C #

Hello, this is the following .. In the site I am building, I record an information in the database, this information is a json, to be able to send this data to the database, I code them by javascript like this: p> encodeURI(dados); After tha...
asked by 15.05.2018 / 21:47
1
answer

The method or operation is not implemented C #

I can not identify the reason for this error, and I made other developments with this logic and it worked.    The method or operation is not implemented. Follow the code below: Method that starts values: private void linkLblStatus_L...
asked by 04.01.2018 / 13:32
2
answers

Find out how many are older in Windows Forms application

I'm trying to do an exercise in C # using Windows Forms that are over 18 years old. The algorithm should read the age of 10 people. But when I run the program it lets me just type an age. public partial class idade : Form { int qtd...
asked by 12.06.2018 / 19:20