Questions tagged as 'winforms'

3
answers

How do I log in to a desktop application via a web application?

I have a web application developed with ASP.NET MVC and login by storing the data in the Session. I have another application, but desktop, which does some tasks that can not be done on the web, but this application needs to be authenticated w...
asked by 18.02.2016 / 14:24
3
answers

How to format the name of an item in a listbox?

I'm having a project where I have to upload files over a network to a server. WhenIclickthe"add" button it opens a box for the person to select the files they want to send and adds them to a list that stores objects of type "File". So far...
asked by 19.05.2016 / 00:45
2
answers

Monetize Windows Forms C #?

Hello, sorry for not being a question directly linked to a language, but I searched a lot and did not find it, does anyone know of any library like Ad Mediator to use in Windows Forms? How do I monetize / place ads in my forms software? Can you...
asked by 18.09.2015 / 22:57
2
answers

Customize MessageBox in C #

I have the following MessageBox MessageBox.Show("Deseja iniciar a forma automática?", "Atenção", MessageBoxButtons.YesNo, MessageBoxIcon.Question) Can I customize it? Instead of being the YesNo buttons, put...
asked by 04.11.2016 / 17:35
2
answers

How do I remove white space from text?

I was trying to get whitespace from a string , but .Trim() does not work, this still displays whitespaces: var teste = texto.Trim(); txtConteudo.Text = teste; For example, if it receives: "text text", it continues: "text text" eve...
asked by 07.10.2015 / 14:12
3
answers

How to catch a NullReferenceException?

When I test my application, it returns some specific data, but when the requested data is null, this unhandled exception error appears ItriedtocapturehimbutIthinkI'mwrong.HowcanIleaveatreatmentthatwarnsinatextboxthattherequesteddatawasnotfou...
asked by 26.11.2015 / 01:24
3
answers

"Clean" way to modify the "visible" attribute of a PictureBox

I have 5 background images for my application that will be visible to the user's taste. What is the simplest (clean code) way to make the user choose? private void radioButton1_CheckedChanged(object sender, EventArgs e) { pictu...
asked by 29.05.2014 / 01:47
3
answers

How to reuse event code?

I have events that when pressing different keys perform some actions but I need to use this thing in more than one form , how can I do this? I found the issue of inheritance in C # Windows Forms a little complicated. An example that I use...
asked by 16.07.2016 / 22:04
2
answers

Foreach in a CheckList in C #

private void Checked() { foreach (ListViewItem listItem in listView.Items) { if (cb_selectAll.Checked == true) { listItem.Checked = true; } if (cb_selectAll.Checked == false) {...
asked by 04.05.2017 / 17:22
1
answer

How do I put a Password field in a MessageBox?

How to insert a field so that I can put a password in a MessageBox . I could call a form , but wanted something simpler and faster, I would like that when I clicked on a button it would provide a field to put a password that will be se...
asked by 30.12.2014 / 15:25