Click here to Skip to main content
15,888,802 members
Everything / Forms

Forms

forms

Great Reads

by Member 4206974
FormGen, a JavaScript Form Generator
by Cristian Moldovan
jQuery unobtrusive validation plugin with Twitter Bootstrap 3 showing error messages as tooltips
by Jean Carlo S. Passos
CRUD over Association Entity that maps to association tables
by SREENATH GANGA
Auto updating the exe if the latest exe is available in the network share

Latest Articles

by Member 4206974
FormGen, a JavaScript Form Generator
by Ev Uklad
Developing applications based on Flows, Forms, and Rules using type-safe advantages of C#
by Ev Uklad
Developing applications based on Flows, Forms, and Rules using type-safe advantages of C#
by Ev Uklad
Developing applications based on Flows, Forms, and Rules using type-safe advantages of C#

All Articles

Sort by Updated

Forms 

27 Mar 2010 by #realJSOP
Make sure you've specifically set your tab order on all controls in the form and see if it fixes it.It might be that you've written some code for the control to prevent the tab key from working.
10 Apr 2010 by #realJSOP
Just instantiate the child form like you would any other object:MyForm form = new MyForm();form.ShowDlg();[EDIT - Removed unclosed bold tag which was making rest of the page bold]
24 May 2010 by #realJSOP
Send an email. I personally hate popup messages because you usually have to dismiss them before doing anything else.
9 Aug 2010 by #realJSOP
There are many approaches to doing what you need to do. This is where you use that skill you haven't developed yet - analysis. The XML you've provided is simple in its content, and it isn't that hard to work out what you need to do. Beyond that, nobody here is going to actually write the...
23 Nov 2010 by #realJSOP
Set the Width and Height properties.
4 Jan 2011 by #realJSOP
Part of being a programmer is being able to analyze the problem, and then design and implement the solution. If you ask someone else what *they* would do, then it becomes that person's solution instead of yours. How are going to learn from doing what someone else would do?Lastly, you should...
5 Jan 2011 by #realJSOP
If I remember correctly...User-scope settings are stored in the user's appdata folder. Application-scope settings are stored in C:\Users\My Name\AppData\Local\My_Company\. If your settings file doesn't contain any Application-scope settings, you won't have a company folder.
19 Jan 2011 by #realJSOP
Here's a handy guide:http://www.akadia.com/services/dotnet_inherited_forms.html[^]
9 Feb 2011 by #realJSOP
Try this (no guarantees):public class MyParentForm:Form{ private Command_Form Command_Form1 = null; private void commToolStripMenuItem_Click(object sender, EventArgs e) { Command_Form1 = new Command_Form(); Command_Form1.Disposed += new...
10 Feb 2011 by #realJSOP
They handle the various drag events:DragEnterDragLeaveDragDropDragOverItemDragGiveFeedbackYou can handle those events on any control you want. Here's a decent...
10 Mar 2011 by #realJSOP
Just make the array global to the form and get on with it. In fact, I would use a List instead of an array because a List can grow/shrink on demand.
23 Mar 2011 by #realJSOP
Are all of the properties for both FileSystemWatchers the same? That's the only reason I can think of as to why the same events won't fire.
28 Mar 2011 by #realJSOP
If you have controls (like textboxes and radio buttons) that are used in the same format/arrangment in multiple forms, you can create a UserControl that contains those controls, and then include the user control in any form that needs those controls.If you want to dynamically crerate...
29 Mar 2011 by #realJSOP
Try this CodeProject article:User Login For WinForm Applications[^]
21 Apr 2011 by #realJSOP
This is really not the appropriate place to post something that would lead to a threaded discussion on the topic. Use the appropriate forum for this.
6 May 2011 by #realJSOP
I think your goal is impractical. It's difficult/impossible to determine *why* a task is consuming 100% CPU, and even more diffcult to determine how long it's been at 100%. Just indiscriminately shutting down 100% tasks is - well - pointless.
23 May 2011 by #realJSOP
First, you're using the wrong terminology - you're not "invoking" the main thread because it's already running. Second, you should learn how to use google:Google results for "C# update ui from thread"[^]
27 May 2011 by #realJSOP
Nobody here is going to to your homework for you. It's not because we feel like we're superior or elite or anything like that, but because YOU won't learn anything if we do it for you. It seems to me that the hard part of your project is done - you've implemented your data layer, and you've...
27 Jun 2011 by #realJSOP
There are two types of forms modal and modeless. As long as a modal form is open, the form that opened it (if it's in the same apploication) cannot be used, so there's no point in checking to see if the 2nd form is already open.If the 2nd form is modeless, you simply need to see if it's...
14 Jul 2011 by #realJSOP
Use the asynchronous reader execute methods (BeginExecuteReader/EndExecuteReader instead of ExecuteReader, for instance).
24 Dec 2011 by #realJSOP
Part of the assignment was to see if you could come up with something *on your own*.
29 Feb 2012 by #realJSOP
No, not if the monitors are connected to the same machine.
30 Sep 2016 by #realJSOP
I haven't done WinForms in a long time, but try FormBorderStyle.FixedSingle instead.EDIT =============================You can always use interop and use the Win32 API to set the window style. It's kind of involved, but it's entirely possible do do. Keep in mind that once you take off the...
8 Oct 2016 by #realJSOP
It's called "click-once deployment":Click-Once Deployment Overview[^]Google is your friend.
14 Feb 2017 by #realJSOP
I think what you want might be to call this.Hide() when it loses focus. There's no need to set the TopMost property.
8 Apr 2018 by #realJSOP
Well first, there aren't always 30 days in a month, there are 7 days in a week, 24 hours in a day, and 60 minutes in an hour. How you came up with your "windows" of time is kinda - well - absurd. Second, you're trying to predict when a dog will bark based on past performance. A dog just doesn't...
27 Nov 2019 by #realJSOP
0) Start a new MVC5 project, and make sure it includes user authentication. 1) Update all of the nuget packages in your new project. 1) That's all you have to do to include user authentication/authorization in a MVC app, unless you want to modify the views that the user is presented with to...
26 Feb 2021 by #realJSOP
Instead of using form.ShowDialog(), use form.Show(). HOWEVER, if you start using modeless forms, you have to know about all currently open forms so you can make sure they're closed when the app is closed. FWIW, if the app you're updating is...
6 Dec 2014 by /\jmot
Repost..Call a Method in one form to another from in winform App using c#[^]
10 Dec 2014 by /\jmot
See the links.it may help.http://stackoverflow.com/questions/3546016/how-to-copy-data-to-clipboard-in-c-sharp[^]http://stackoverflow.com/questions/2243241/how-do-i-save-a-copy-of-the-clipboard-and-then-revert-back-to-it[^]
28 Jun 2013 by 09lolo
hellohope you all are doing well ! i have two tables - bookcontain book idand - sscontain book id and SnumberI want the user to get the form from the book id when he insert the Snumber in textBox1this is the code private void button1_Click(object sender,...
30 Jun 2015 by 1sumitanand
This tip is for newbie developers.
1 Jul 2015 by 1sumitanand
Sorting of simple ListView Elements in Ascending/Descending Order
21 Jun 2011 by 2irfanshaikh
why don't you try this in a store procedure???
9 Oct 2014 by 2irfanshaikh
please check the below linkhttp://stackoverflow.com/questions/7200443/asp-net-webforms-how-to-avoid-several-page-load-events-when-a-link-is-clicke[^]http://stackoverflow.com/questions/8092554/asp-net-page-load-event[^]
30 Jun 2014 by 7045Jeegnesh
here is My Master page forms:-----------
18 Jun 2013 by 7774tlas
Hi, I would like to display a video thumbnail in a picturebox. I've been searching for answers, but most of what I've found (.GetThumbnailImage, System.Drawing.Image, etc.) seem to only work for images, not video. All I want to do is display the same thumbnail as windows file explorer. I have...
23 May 2011 by 94HellGate
whats the best way to make a simple erase brush / pen to erase parts of a transparency bitmap (with erase opacity)?
24 May 2011 by 94HellGate
i found another solutioncreate a texture brush based on the texture you are drawing with opacity (using a ColorMatrix) and set the graphics option CompositingMode to SourceCopy and draw your circle or whatever.some code:float[][] matrixItems ={ new...
3 Jun 2013 by _Amy
Modify your connection string like this:Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;If you are using a tcp port then:Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword;--Amit
14 May 2014 by _Maxxx_
Is it a good idea? Only your customers can tell you that!I have implemented similar things in the past - generally for reasonably large collections where users usually knew a code or number, and so would just type it in, but occasionally needed to look up the value.For small collections,...
16 Sep 2015 by _Plutonix
Helper class to add, change and delete Registry based Explorer Context Menus from your app
14 Feb 2016 by _Q12_
My current Form1 is invisible when I start it.When I start my application,I want my Form1 being visiblethen, label4 with the announcement being displayedthen, a StartPage() method that takes 5seconds to load.and then, the label4 to dissapear.I tried with Application.DoEvents();...
19 Jun 2012 by A. Ganzer
Validation of input made as easy as possible for Windows.Forms, WPF, console-applications or any other purposes
14 Oct 2013 by A.Girish
Hello Every one I would like to know how to biuld a setup from windows form projectI need a proper sequential answer because i founded some data in internet which is not proper some given two to three screen shots,in other site they given step wise instruction which is very hard to get...
4 Nov 2013 by A.Girish
Hello GuysI have problem in design Datagridview i want to design the datagrid with image and text as column header and image as status of that column in row cells.
6 Apr 2018 by Aa20
I already have a generic winforms application project. But i want to create a special case project adding specialized features on top of the old one. But at the same time, i want all enhancements/versioning done on the old project to be used by the new project. I still want the develop and...
24 Jul 2013 by aamirsajjad
You can set this things in registry for local machine. Set Value in registry when status is the user login on first time on current date. If you code for this let me know
20 May 2014 by aamitsengar
Use Tooltip Or a user control instead of grid..
4 Nov 2014 by Aaron Espinosa
Hey everyone, wanna thank you in advance for taking the time to even read this!I have 2 troubles with my form so far, I have the navigation so that it is set up to be like excel, but I want to navigate to the textbox that's beneath when pressing enter, key 13 seems to do it, but when I do...
15 Nov 2012 by aaron1312
Hi all! First off, I'd like to say thanks for any help in advance, it's much appreciated!So basically i have this form, I've got everything good so far as textboxes go, but this is what the html code looks like on the page: Yes...
11 Aug 2012 by Aarti Meswania
pass controls/variables while create instance of new formeg.public class formDest{ public formDest(string c) { //something to do }}now, pass value from source form to destination formpublic class formSource{ public void btn_click(...) { formDest fd = new...
29 Aug 2012 by Aarti Meswania
there are two ways,1.runtime change form borderstyle this.controlbox=true;this.FormBorderstyle=fixedSingle;2.create 3 buttons & code it like below1. maximize put this line in click eventthis.Maximized();2. minimize put this line in click eventthis.Minimized();3. close put...
26 Sep 2012 by Aarti Meswania
In short,simple Conclusion of Comparison is,1. Presentation layer (User Interface, Application Look) Winform WPF (WinForm are better than WPF)It is Conclusion onlyfor...
1 Oct 2012 by Aarti Meswania
it is strange check you have done some paint event that is conflicting or some dynamic control which you are adjusting runtime...if you want to not show flickermeans below code will show your form after it complete paintingput this property in your form and check effectprotected...
8 Oct 2012 by Aarti Meswania
e.gsuppose in grid this columns,Mon1Mon2tues1tues2wed1wed2Private Sub dataGridView1_Paint(ByVal sender As Object, ByVal e As PaintEventArgs) Handles DataGridView1.Paint Try Dim colList ="Mon,tues,wed" Dim clst As String() =...
20 Dec 2012 by Aarti Meswania
as this...Dim varRbtnNm = "Radiobutton1"select case(varRbtnNm)case "Radiobutton1" Radiobutton1.checked = truecase "Radiobutton2" Radiobutton2.checked = trueend selectORDim varRbtnNm =...
28 Apr 2013 by Aarti Meswania
Copy report ".rldc" file on client pc On proper locationHappy Coding!:)
10 Jun 2013 by Aarti Meswania
here in example if checkbox cell of particular row is cecked then I am changing color of row ...Use CurrentCellDirtyStateChanged event put color changing code stuff inside Private void dgv1_CurrentCellDirtyStateChanged(Object sender, System.EventArgs e) { If...
27 Dec 2013 by Aarti Meswania
simply do this create form level variableint FormLevelcmbbox1LastValue = 0;now in combox's selection value changecmbbox1_selectedValueChange(...){ ConvertFrom = FormLevelcmbbox1LastValue ; ConvertTo = cmbbox1.selectedValue ; //write stuff to change value of textbox //set...
29 Mar 2014 by Aarti Meswania
hi, try this...protected void dataGridView1_CellClick (object sender, DataGridViewCellEventArgs e){ int orderno = 0; Int32.TryParse(dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString(), out orderno); v_orderno = orderno;}Happy Coding!:)
3 Jul 2013 by Aatif Ali from Bangalore
You can refer following linkshttp://webcheatsheet.com/javascript/form_validation.php[^]http://www.w3schools.com/js/js_form_validation.asp[^]Aatif Bangalore
11 Mar 2012 by Abbath1349
Hello can u say me how i can decide one problem with ListBox In WPF.I have data in XML i loaded them in List then i used binding listBox1.DataContext = wordNow; i'd like to change value in listbox when i'm clicking on it, for instanse it displays "word1" when i click on it then it will...
28 Jun 2011 by abdugo
private void ClearForm(){ foreach(Control c in this.Controls) { if(c is TextBox || c is ComboBox) c.Text = ""; else if (c is CheckBox) ((CheckBox)c).Checked = false; else if (c is RadioButton) ...
20 Nov 2013 by Abdul Gafar
Hi,I need help in implementing this below:I have a list view containing students courseworks, one column holding the barcode IDs, one column holding subject code, one holding the coursework title and one holding the due dates.I want to have a button click event where by it checks the...
18 Apr 2011 by Abdul Rahman Hamidy
you can also use WebBrowser Control of .Net
6 Sep 2012 by Abed AlSayed
Hi, I want to make a bordless form but with shadows, docking ability, win7 effects, (ex. photoshop custom style, zune custom style....) I've found this project but it contains many bugs (Metro UI (Zune like) Interface (form)[^]) like on minimizing and maximizing it automatically resized, and...
23 Feb 2012 by Abhi KA
try this linkhttp://webcache.googleusercontent.com/search?q=cache:http://www.csharpaspnetarticles.com/2009/01/winforms-autocomplete-textbox-using-c.html[^]
10 May 2010 by Abhinav S
niravsahayata wrote:how can i send mails outside the domain??Are you getting any errors? Using SmtpClient you should be able to send mails anywhere ....so long as your mail server is correctly configured.You probably need to check your email configuration.
2 Oct 2010 by Abhinav S
This[^] may help.
23 Oct 2010 by Abhinav S
private void Form2_FormClosing(object sender, FormClosingEventArgs e) { e.Cancel = true; this.Hide(); }This code appears to be in form2 rather than form 1. This is creating the error. You need to place this code in form1 and set form2 to null from...
15 Nov 2010 by Abhinav S
See here[^].
2 Jan 2011 by Abhinav S
This[^] or This[^] should pretty much solve your problem!
28 Jan 2011 by Abhinav S
This[^] thread may provide a solution to you.
14 Feb 2011 by Abhinav S
I think you need to look at why this data is copied when you hide and then show the form again.Try moving that logic out of its current position into some other place.
26 Mar 2011 by Abhinav S
You can start by making sure any third party your child form uses are installed.Try to open the form in design mode and post the error that occurs here and maybe someone can help you.
7 Apr 2011 by Abhinav S
Yes its possible. Essentially what you are doing is creating the user control via code (rather than dragging and dropping from the toolbox).
5 Jun 2011 by Abhinav S
Have a look at -http://msdn.microsoft.com/en-us/library/system.windows.forms.screen.aspx[^]http://msdn.microsoft.com/en-us/library/ms229605.aspx[^]
9 Jun 2011 by Abhinav S
It is difficult to change the styles for labels in Windows Forms. Try using WPF if possible.You can do lots of fantastic styling in WPF.
19 Jun 2011 by Abhinav S
See this [^] - this explains how to use parameters with Data Adapters quite accurately.
22 Jun 2011 by Abhinav S
I found this[^] to be an interesting read on the README file.
24 Jun 2011 by Abhinav S
It should be as simple as this.[^], so unless you post some code here it will be hard for anyone to detect what could be going wrong.
18 Jul 2011 by Abhinav S
One way to do this would be to use Net TCP Binding in WCF. See here[^].
8 Nov 2011 by Abhinav S
These discussions[^] may help you.
26 Apr 2012 by Abhinav S
No there is no session support in Windows forms. Yuu can build your own support though by storing information in a database / file.Not fool proof but could work.
21 Jan 2013 by Abhinav S
You can use a number of third party reporting tools like Active reports etc to generate a report.You can also consider using Crystal reports.
21 Jan 2013 by Abhinav S
In this case you can look at MSAccess (or even Excel) as an option.If the parameters you want to store on the client are very few, you can consider an xml configuration or an ini file.
25 Jan 2013 by Abhinav S
The code and sample available at Crop the image from Windows Forms [^] should easily help you.There are a couple of articles / discussions available here as well -...
30 Jan 2013 by Abhinav S
This could be possible to do in a number of interesting ways.The simplest would be to handle the the keydown event on the grid (capture Ctrl + V).Here are some articles that might help you...
30 Jan 2013 by Abhinav S
This discussion [^] might give you an idea of how you need to proceed towards a solution.
12 Apr 2013 by Abhinav S
You probably need to go through Deploying Reports and ReportViewer Controls [^]. Make sure you follow the steps correctly.
27 May 2013 by Abhinav S
Should'nt the select part be Select p.Department.Department_Name?In general, debugging and stepping through your code will help you get an idea on the error.Code will break on the line you have an error.
14 Jun 2013 by Abhinav S
A Response.Redirect will fire a page refresh. You could try it - but dont know if a user will be happy with the web page doing refresh all of a sudden.
25 Jan 2014 by Abhinav S
Try and go through SQL Serer notification services - http://technet.microsoft.com/en-us/library/ms172483%28v=sql.90%29.aspx[^].
8 Mar 2014 by Abhinav S
These articles might help youMath Equation Editor in C#[^]Converting math equations to C#[^]
22 Mar 2014 by Abhinav S
Here is a video that might help you - [^].
3 Apr 2014 by Abhinav S
Some more links on the same topic -Making Your Application UAC Aware[^]Add a manifest to control your application Vista UAC behavior[^]
5 Apr 2014 by Abhinav S
You cannot use JavaScript code in windows forms - at least not directly.You can run JavaScript in an html control.