Click here to Skip to main content

Articles by OriginalGriff (Articles: 6, Tip/Tricks: 60)

Articles: 6, Tip/Tricks: 60

RSS Feed

Average article rating: 4.95

Miscellaneous
General
Posted: 10 Jun 2012   Updated: 10 Jun 2012   Views: 8,159   Rating: 4.98/5    Votes: 13   Popularity: 5.54
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 298
A Generic Abstract class providing a true Pop-up control, implemented in a multiple selection drop down list.
C#
General
Posted: 8 Jun 2012   Updated: 8 Jun 2012   Views: 7,239   Rating: 4.94/5    Votes: 23   Popularity: 6.72
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 112
Adding an event to your class is simple, but it needs a bit of typing. I'm lazy, so I'd rather Visual Studio did the work. This snippet works in the same way as the "prop" snippet.
Posted: 23 Feb 2014   Updated: 23 Feb 2014   Views: 21,680   Rating: 4.93/5    Votes: 100   Popularity: 9.85
Licence: The Code Project Open License (CPOL)      Bookmarked: 76   Downloaded: 0
What is the difference between a struct and a class? And which should I use?
Date and Time
General
Posted: 9 Mar 2012   Updated: 6 Jun 2012   Views: 10,053   Rating: 4.90/5    Votes: 14   Popularity: 5.62
Licence: The Code Project Open License (CPOL)      Bookmarked: 17   Downloaded: 0
Sometimes, you want to insert a date into a database as the start of the day, or you need to work out when the last Tuesday of the month is. These aren't difficult tasks, but the code can be difficult to follow. These extensions provide an easy-to-read way to do it.
DLLs & Assemblies
General
Posted: 27 Apr 2012   Updated: 27 Apr 2012   Views: 12,094   Rating: 4.98/5    Votes: 12   Popularity: 5.37
Licence: The Code Project Open License (CPOL)      Bookmarked: 19   Downloaded: 184
It surprised me to find that there is no simple way to find out when a .NET assembly was built. You can work it out from the revision number (provided you only use the "standard" numbering scheme) but it's not obvious. This provides a simple way to timestamp individual assemblies at build time.
Interviews
General
Posted: 21 Sep 2011   Updated: 21 Sep 2011   Views: 21,353   Rating: 4.95/5    Votes: 53   Popularity: 8.54
Licence: The Code Project Open License (CPOL)      Bookmarked: 12   Downloaded: 0
Welcome to our continuing series of Code Project interviews in which we talk to developers about their backgrounds, projects, interests and pet peeves. In this installment we track down Code Project member Paul Griffin.
No blogs have been submitted.

Average tips rating: 4.84

Dialogs and Windows
Dialogs
Posted: 28 Jul 2013   Updated: 28 Jul 2013   Views: 1,924   Rating: 4.83/5    Votes: 6   Popularity: 3.75
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 105
The MessageBox class works, but...why is it in the middle of the screen? Why does it expand to stupid sizes? Why can't the user copy and paste from it? So, I brewed my own.
Form Views
Posted: 10 Feb 2013   Updated: 11 Feb 2013   Views: 9,036   Rating: 4.95/5    Votes: 12   Popularity: 5.34
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 0
It's one of those things that annoys me - and probably you - you set up five or so windows so they are in the right place on your desktop, and it lovely. Then you open them again tomorrow...and one of them always opens too big, and in the middle of the screen...
Files and Folders
File System
Posted: 20 Apr 2012   Updated: 20 Apr 2012   Views: 8,040   Rating: 5.00/5    Votes: 11   Popularity: 5.21
Licence: The Code Project Open License (CPOL)      Bookmarked: 20   Downloaded: 0
There is a common theme in development: storing data files in the application folder. This is bad, and wrong, and should be stamped on!
Files
Posted: 29 Jun 2013   Updated: 30 Jun 2013   Views: 4,490   Rating: 4.75/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 0
One of the tasks we often have to do is rename a file before creating a new version. But when we want to keep multiple versions, how do we find out which ones already exist?
Miscellaneous
General
Posted: 16 May 2012   Updated: 16 May 2012   Views: 4,686   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 0
Loading an image from a database isn't difficult, but it can waste time. If you are loading a large list of Images (or even thumbnails) from a DB but not using them immediately, then it can take some considerable time. Why not load them on demand instead?
Windows Forms
Posted: 19 Feb 2013   Updated: 3 Apr 2013   Views: 5,291   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 174
Questions here quite often ask "how do I send data from one form to another?" and I must have answered this a dozen times. So, a series of three tips to cover the process.
Posted: 18 Feb 2013   Updated: 3 Apr 2013   Views: 5,583   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 187
Questions here quite often ask "how do I send data from one form to another?" and I must have answered this a dozen times. So, a series of three tips to cover the process.
Posted: 18 Feb 2013   Updated: 3 Apr 2013   Views: 6,436   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 235
Questions here quite often ask "how do I send data from one form to another?" and I must have answered this a dozen times. So, a series of three tips to cover the process.
Posted: 8 Aug 2013   Updated: 8 Aug 2013   Views: 2,961   Rating: 4.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 0
If (like me) you use the Assembly version of your EXE to handle versioning, and you (like me) use the Settings.Settings for configuration items, then you've probably noticed the config is lost when the version is changed.
ASP.NET
General
Posted: 5 Jan 2011   Updated: 7 Jan 2011   Views: 11,919   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 0
Supporting Development and Release web.config in ASP.NET
Posted: 7 Feb 2011   Updated: 8 Feb 2011   Views: 6,419   Rating: 4.86/5    Votes: 9   Popularity: 4.61
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 0
When I add a log reader, the size of the log can be huge, and get very slow to view. This makes the GridView do all the work of paging the data for you.
Posted: 14 Aug 2011   Updated: 14 Aug 2011   Views: 11,057   Rating: 4.83/5    Votes: 5   Popularity: 3.32
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 0
Getting an image from a database and displaying it in an ASP.NET page is something we have to do quite often. Here is a generic class which does the job for you.
Android
General
Posted: 10 Oct 2012   Updated: 10 Oct 2012   Views: 4,678   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
If you are trying to follow the instructions on how to get your system up and running with Eclipse, you may get an error when installing ADT
Database
General
Posted: 23 Sep 2012   Updated: 23 Sep 2012   Views: 7,047   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 0
Inserting a number of rows in a database isn't difficult, but how do you do it in a single command without concatenating strings?
Posted: 26 Sep 2012   Updated: 27 Sep 2012   Views: 8,641   Rating: 4.97/5    Votes: 10   Popularity: 4.97
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 0
Why? Normally, it's because you stored it wrong...
SQL
Posted: 18 Dec 2013   Updated: 18 Dec 2013   Views: 2,010   Rating: 4.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 0
Getting totals for a specific period: this week, this month, this year. And last week, last month, and last year.
SQL Server
Posted: 18 Sep 2012   Updated: 18 Sep 2012   Views: 21,575   Rating: 4.96/5    Votes: 15   Popularity: 5.84
Licence: The Code Project Open License (CPOL)      Bookmarked: 25   Downloaded: 2,456
One of the things that it seems far to hard to find is a reliable way of backing up a database, and restoring it again later. Particularly for development, where the SQL server instance and the database are likely to be on your development machine, and very likely to be damaged by code.
Posted: 27 Apr 2013   Updated: 7 May 2013   Views: 30,846   Rating: 5.00/5    Votes: 11   Popularity: 5.21
Licence: The Code Project Open License (CPOL)      Bookmarked: 12   Downloaded: 75
Passing a comma separated list of values to an SQL query is all very well, but you can't just use them in an "IN" clause. This helps.
Posted: 14 Jul 2013   Updated: 14 Jul 2013   Views: 2,405   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
If you have two (or more) tables which are interrelated, you sometimes need to update the rows of one table, selected from information in a different table. This isn't difficult, but is can take a little think about.
Posted: 24 Feb 2014   Updated: 24 Feb 2014   Views: 3,408   Rating: 4.86/5    Votes: 4   Popularity: 2.81
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 0
If you have an SQL column which contains a comma separated list of names, you may have wondered how to return it as individual rows in a SELECT statement. It's not too bad, really!
C#
Applications
Posted: 25 Jun 2012   Updated: 25 Jun 2012   Views: 6,679   Rating: 4.83/5    Votes: 6   Popularity: 3.74
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 87
When you search for matching substrings, you may have noticed that Google matches accented characters to unaccented. If you are searching strings which may contain accented characters, you should consider doing the same.
Enumerations
Posted: 28 Mar 2014   Updated: 28 Mar 2014   Views: 2,971   Rating: 4.83/5    Votes: 9   Popularity: 4.61
Licence: The Code Project Open License (CPOL)      Bookmarked: 12   Downloaded: 0
Want to use Linq, or Linq methods with the results from your Regex? Yes, so did I...annoying isn't it? So...a solution.
General
Posted: 1 Feb 2010   Updated: 2 Oct 2011   Views: 18,493   Rating: 4.76/5    Votes: 25   Popularity: 6.66
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 0
When you create a custom control (or any class), you inherit a lot of properties from the base class, most of which are fine. However, particularly in the case of a control derived from UserControl this brings a lot of properties which may not be relevant to the new control.
Posted: 12 Apr 2012   Updated: 12 Apr 2012   Views: 3,313   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
If you haven't heard of AI Memo 239, then you need to have a look at it. It is an MIT memo from 1972 containing "clever code" and such like. Some of it is absolutely beautiful!
Posted: 13 Jun 2012   Updated: 13 Jun 2012   Views: 3,000   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 41
It's very easy to work out the center of a rectangle, but it's messy as inline code. Hence these simple extension methods to provide the five centers.
Posted: 29 Oct 2013   Updated: 29 Oct 2013   Views: 2,988   Rating: 4.80/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 0
Abstract base classes are a very good idea - but when that base class is a UserControl, Visual studio gets very unfriendly. It is possible, and it's not difficult: you just have to know how to do it.
Posted: 13 Apr 2014   Updated: 13 Apr 2014   Views: 3,674   Rating: 4.92/5    Votes: 18   Popularity: 6.23
Licence: The Code Project Open License (CPOL)      Bookmarked: 22   Downloaded: 0
Sometimes, I need to create files or folders directly, and use existing data to provide the file name - and then my app throws an exception because there are "illegal characters in the file name" - so this is a simple way to remove them.
How To
Posted: 8 Feb 2014   Updated: 8 Feb 2014   Views: 3,396   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 0
Reading a sheet into a database isn't difficult - it's just I keep forgetting how... :sigh: So I abstracted this from my working code so I wouldn't lose it again.
Utilities
Posted: 2 Jul 2012   Updated: 2 Jul 2012   Views: 3,023   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 44
Converting a value to an SI unit string.
Windows Forms
Posted: 14 Jun 2012   Updated: 14 Jun 2012   Views: 5,827   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
Having the property "Text" be available for almost everything in .NET that interacts with the user makes life very simple. But when you create a new UserControl, the Text property doesn't appear in the Properties pane.
.NET Framework
General
Posted: 28 Apr 2011   Updated: 29 Apr 2011   Views: 10,956   Rating: 4.50/5    Votes: 6   Popularity: 3.50
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 0
Sometimes, it is helpful to find out if the .NET framework is installed on a machine, or get a user to check over the phone. But, some people should not be allowed near Regedit or the windows folder, so here is a safe way to get them to check.
Posted: 14 Jul 2011   Updated: 14 Jul 2011   Views: 21,109   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 0
Strangely, the .NET DateTime does not provide a Week Number. This extension rectifies this.
Posted: 15 Jul 2011   Updated: 18 Jul 2011   Views: 23,204   Rating: 4.97/5    Votes: 17   Popularity: 6.11
Licence: The Code Project Open License (CPOL)      Bookmarked: 16   Downloaded: 0
I wrote this because I was interested in a Q&A question which asked for exactly that. Since I quite often use DataTables to transfer data, and to display it for debugging I knocked up an extension method to do it.
Posted: 9 Jan 2012   Updated: 18 Jun 2012   Views: 86,997   Rating: 4.85/5    Votes: 28   Popularity: 7.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 27   Downloaded: 115
It seems like an obvious requirement, but the .NET framework will not count occurrences of a character in a string. It's easy to do, but which way is the quickest?
Posted: 30 Mar 2013   Updated: 30 Mar 2013   Views: 4,214   Rating: 5.00/5    Votes: 11   Popularity: 5.21
Licence: The Code Project Open License (CPOL)      Bookmarked: 14   Downloaded: 80
Working with an Age (as in a persons age) is not the same as a Timespan, and there is no simple way to return an age. This provides a class to solve this.
Utilities
Posted: 26 Oct 2013   Updated: 26 Oct 2013   Views: 5,428   Rating: 4.90/5    Votes: 8   Popularity: 4.41
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 75
StringBuilder is a very useful and memory efficient way to concatenate strings, but there is no obvious similar class for byte arrays. This class adds that, and provides a flexible binary data storage medium at the same time
Internet / Network
Network
Posted: 2 Apr 2012   Updated: 2 Apr 2012   Views: 15,648   Rating: 4.63/5    Votes: 9   Popularity: 4.27
Licence: The Code Project Open License (CPOL)      Bookmarked: 14   Downloaded: 0
Getting the IP and MAC for your PC is pretty simple, but what if you need those on your local network? It's not as simple as it sounds...
Macros and Add-ins
General
Posted: 10 Feb 2011   Updated: 12 Feb 2011   Views: 21,574   Rating: 5.00/5    Votes: 49   Popularity: 8.45
Licence: The Code Project Open License (CPOL)      Bookmarked: 31   Downloaded: 0
F1 in Visual Studio takes forever, and rarely comes up with anything useful. Replace it with a Google MSDN search!
Programming Tips
General
Posted: 5 Jul 2010   Updated: 5 Jul 2010   Views: 9,559   Rating: 5.00/5    Votes: 15   Popularity: 5.88
Licence: The Code Project Open License (CPOL)      Bookmarked: 8   Downloaded: 0
Marking code you need to return to later
Posted: 20 Jul 2010   Updated: 23 Jul 2010   Views: 6,413   Rating: 4.29/5    Votes: 7   Popularity: 3.62
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 0
Sometimes, it helps to know the complete inheritance of an object or type in order to understand what can be done with it. This Tip presents a simple C# class to access the information
Posted: 12 Aug 2010   Updated: 12 Aug 2010   Views: 5,544   Rating: 4.78/5    Votes: 8   Popularity: 4.26
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 0
Using enum really helps readability, but the values within the enum must understandably conform to the rules for variables names. This is fine until you need to display enum values to the user. This tip shows you how to associate and access a human readable string with each enum element.
Posted: 26 Aug 2010   Updated: 26 Aug 2010   Views: 5,080   Rating: 4.67/5    Votes: 3   Popularity: 2.23
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
If your tutor asks you to convert years to the Roman equivalent, (e.g. 2010 to MMX) then you are not alone! Here is the simplest, most foolproof way to do it!
Posted: 3 Jan 2011   Updated: 5 Jan 2011   Views: 9,046   Rating: 4.33/5    Votes: 3   Popularity: 2.07
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
When you provide a custom error handler page, it is useful to be able to log what caused the problem, so that you can fix it. Server.GetLastError() will not return anything in the page, though...
Posted: 2 Mar 2011   Updated: 3 Mar 2011   Views: 33,296   Rating: 4.90/5    Votes: 41   Popularity: 7.90
Licence: The Code Project Open License (CPOL)      Bookmarked: 45   Downloaded: 0
Sending an email is not a real problem, but I am fed up with answering the question "How do I do it?" in Q&A . So, here is the generic routine I use to send an email, with or without attachments, so I can just point people at it!
Posted: 25 Apr 2011   Updated: 29 Apr 2011   Views: 37,301   Rating: 4.89/5    Votes: 77   Popularity: 9.22
Licence: The Code Project Open License (CPOL)      Bookmarked: 91   Downloaded: 0
A lot of people are asking how to encrypt passwords, and I have answered "Don't do it" too many times. This Tip describes how to store a password in your database, and why.
Posted: 8 May 2011   Updated: 8 May 2011   Views: 11,650   Rating: 4.09/5    Votes: 10   Popularity: 4.10
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 0
The Visual Studio Property pane is a control, which can be used in WinForms like any other, and it provides a simple, easy to use property editor for your classes. However, it is not obvious how to get it to open a browse dialog for a file path property.
Posted: 31 Jul 2011   Updated: 31 Jul 2011   Views: 9,319   Rating: 4.44/5    Votes: 7   Popularity: 3.70
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 0
Sometimes, you want to only run a single instance of an application - this makes it very simple to do. An Extension method that checks, switches and kills as necessary.
Posted: 16 Sep 2011   Updated: 18 Sep 2011   Views: 10,580   Rating: 4.85/5    Votes: 8   Popularity: 4.36
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Recently, I had to write a quick app to load images into a database, and wanted to restrict the file type to just images. You can do this with the OpenFileDialog.Filter property, but it is a pain working out what file extensions to permit.
Posted: 17 Jul 2010   Updated: 9 Oct 2011   Views: 9,628   Rating: 4.95/5    Votes: 17   Popularity: 6.09
Licence: The Code Project Open License (CPOL)      Bookmarked: 12   Downloaded: 0
Adding your items to Visual Studio default files
Posted: 10 Oct 2011   Updated: 10 Oct 2011   Views: 9,792   Rating: 5.00/5    Votes: 4   Popularity: 3.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 0
Originally, I was going to create a simple Web Service using an ASMX file, but that appears to have been removed from Visual Studio 2010 - or at least I couldn't find it easily. So, WCF it is! I love the way technology lasts, don't you? Right, so I know nothing about WCF, tutorials here I come...
Posted: 4 Jan 2012   Updated: 7 Jan 2012   Views: 43,474   Rating: 4.82/5    Votes: 13   Popularity: 5.57
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 0
One of the things missing from C# is the ability to set a default value of auto-implemented properties. You can set a default for variable backed properties, and you can set them for the designer. This does it for you.
Posted: 12 Jan 2012   Updated: 13 Jan 2012   Views: 18,621   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
XmlSerializer complains if you try to serialize anything which implements IDictionary. This provides a way of serialising them which (if not capable of restoring the exact dictionary content) restores the actual field contents in a new dictionary.
Posted: 14 Jan 2012   Updated: 14 Jan 2012   Views: 17,702   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Visual Studio has a Server Explorer built in to handle database access - it can lalso generate database connection strings ready for saving in application config files.
Posted: 24 Jan 2012   Updated: 31 Jan 2012   Views: 25,366   Rating: 4.89/5    Votes: 15   Popularity: 5.75
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 0
Sometimes, all I want is a control which allows the user to select one of several options, and tell me which one - ideally as a handy enum value. This shows a simple method which allows this.
Posted: 19 Aug 2010   Updated: 12 May 2013   Views: 31,902   Rating: 4.95/5    Votes: 69   Popularity: 9.10
Licence: The Code Project Open License (CPOL)      Bookmarked: 11   Downloaded: 0
If your tutor asks you to convert numbers to words (i.e. 565 to a string "Five hundred and sixty-five") then you are not alone! Here is the simplest, most foolproof way to do it.
Tools and IDE
General
Posted: 16 Nov 2011   Updated: 20 Nov 2011   Views: 9,272   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 0
It is really easy to do once you get the idea how, but the Microsoft documentation could be a lot clearer - so here is a simple sample with full instructions.
Uncategorised Quick Answers
General
Posted: 26 Jan 2010   Updated: 26 Jan 2010   Views: 12,784   Rating: 4.92/5    Votes: 10   Popularity: 4.90
Licence: The Code Project Open License (CPOL)      Bookmarked: 6   Downloaded: 0
Normally I keep information like this in a text file, in a folder called "How To Do It", as it is handy to have around, and too much work to search for each time I need it, but too much detail for me to remember if I don't use it often. Formatting a DateTime for display:DateTime.ToString()...
Posted: 26 Jan 2010   Updated: 18 Feb 2012   Views: 34,821   Rating: 4.93/5    Votes: 21   Popularity: 6.52
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 0
Disable the Close box on a form
Code Generation
General
Posted: 8 Jan 2012   Updated: 8 Jan 2012   Views: 10,719   Rating: 4.67/5    Votes: 9   Popularity: 4.41
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 0
Quite often, when I create a new form, the first thing I need to add is an OK and a Cancel button. Recently, I realized that I could create templates for these in Visual Studio and save some time.
Debug Tips
General
Posted: 31 Oct 2013   Updated: 31 Oct 2013   Views: 2,817   Rating: 4.80/5    Votes: 2   Popularity: 1.44
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Sometimes (far too often, I find) you will try to open a form in the Visual Studio designer, and it won't open it because "the type X declared in Project X is not the same as the type X declared in Project X". This is annoying, as well as being blatantly untrue. Stop laughing at the back there!
No reference articles have been posted.

OriginalGriff
CEO
Wales Wales
Born at an early age, he grew older. At the same time, his hair grew longer, and was tied up behind his head.
Has problems spelling the word "the".
Invented the portable cat-flap.
Currently, has not died yet. Or has he?
Follow on   Google+


Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 21 Apr 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid