473,387 Members | 3,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,387 developers and data experts.

.NET Tips and Tricks

Frinavale
9,735 Expert Mod 8TB
Edit
Many times we spend hours and hours trying to solve a problem. When we finally figure it out, we want to share it to keep others from suffering the same way!

That's why we have this "Tips and Tricks" thread. Post your solutions and tricks that you think will help someone down the road here.

If the tip is complex or long, you might want to consider making an article out of it and posting it in the Insights forum.

Looking forward to all the helpful tips!

--insertAlias

Note: The following was the old thread in the answers forum. I am merging it here for convenience.
/Edit

Frinny's Tip O' The Week
Many of us find our way to Bytes.com seeking help while we're facing a programming problem. Sometimes we just need a pointer to get us going in the right direction.

I've started this thread to provide tips and "how-tos" on common problems that everyone faces. Some of these posts will be provided by me (Frinny) but other's will be selected according to how important and informative the posts are.

I hope you'll find something useful here!

---------------------------------------------------------------------------------------------------------------

The 3rd Week of April 2007:
How To Use Databases:
.................................................. .........................................

The 2nd Week of May 2007:
Sessions:
The 3rd Week of May 2007:
Send E-mails: The 4th Week of May 2007:
Faxes:The 5th Week of May 2007:
Checking TextBoxes for a Number:.................................................. .........................................

The 1st Week of August 2007:
The.Net Framework:
The 3rd Week of August 2007:
Reports:
The 4th Week of August 2007:
Connection Pooling:.................................................. .........................................


The 1st Week of September 2007:
Master Pages:

The 3rd Week of September 2007:
GridViews:
.................................................. .........................................

The 4th Week of May 2009:
Asp.NET Life Cycle: .................................................. .........................................
Apr 21 '07 #1
8 5881
sashi
1,754 Expert 1GB
Hi Frinny,

Great work, keep it up. Good luck & Take care.
Jun 27 '07 #2
Curtis Rutland
3,256 Expert 2GB
I've moved this thread here and resurrected it so we can start posting our helpful tips and tricks. Anything that you figure out that you think may help someone else is welcome here.

Just add a comment with your tip!

Thanks
--insertAlias
Dec 12 '08 #3
balabaster
797 Expert 512MB
Ben's Tip o' the day:

Always save your work before you go home at night and don't expect that your computer won't have rebooted itself by the time you come into work the next morning!
Dec 12 '08 #4
Curtis Rutland
3,256 Expert 2GB
Well, I've recently discovered how to hide the caret (cursor) in a textbox.

Expand|Select|Wrap|Line Numbers
  1. [DllImport("user32")]
  2. private static extern bool HideCaret(IntPtr hWnd);
Then, write an event handler for the "Enter" event for the textbox, and use the handle of the textbox. Like this:
Expand|Select|Wrap|Line Numbers
  1. private void tbOutput_Enter(object sender, EventArgs e)
  2. {
  3.     HideCaret(tbOutput.Handle);
  4. }
Jan 11 '09 #5
An elegant way to parse Enums in C#: http://ko-sw.blogspot.com/2009/03/el...e-c-enums.html
Mar 26 '09 #6
Frinavale
9,735 Expert Mod 8TB
Conversion Chart for C# to VB scope modifiers:
Expand|Select|Wrap|Line Numbers
  1. -------------------------------------------------------
  2.    C#               |    VB
  3. -------------------------------------------------------
  4. public              |  Public
  5. protected           |  Protected
  6. private             |  Private
  7. internal            |  Friend
  8. internal protected  |  Protected Friend
  9. static              |  Shared
  10. const               |  Const
  11. -------------------------------------------------------
Jul 1 '09 #7
Frinavale
9,735 Expert Mod 8TB
A website that helps compare/translate VB.NET -> C#:

VB.NET and C# Comparison
Oct 20 '09 #8
Vertical progress bar
------------------------------------------------------------
Derive your class as shown below
Expand|Select|Wrap|Line Numbers
  1. class VertProgress : ProgressBar
  2. {
  3.       override CreateParams CreateParams
  4.       {
  5.            get
  6.            {
  7.                  CreateParams crParam = base.CreateParams;
  8.                  crParam.Style |= 0x04;
  9.                  return crParam; 
  10.            }
  11.        }
  12. }
Once you build your application, in the toolbar you will see VertProgress. Drag and drop it in the windows form. Strech it vertically.
Oct 30 '09 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mark Moeykens | last post by:
Does anyone know of a place that has a collection of tips and tricks or hard-won knowledge in regards to .NET. You know what I'm talking about, that kind of knowledge where once you learn it you...
2
by: Panchi51 | last post by:
Hi, Below is a collection of tips/tricks/caveats for LP64 c coding, full text is at http://www.cs.albany.edu/~mosh/Text/c-ref.txt. Hope it helps, corrections welkome. --...
0
by: travolta003 | last post by:
Windows XP tips and tricks. Learn how to bypass very common windows problems, speed up your system and make it more reliable with useful tips and tricks. http://windowsxpsp2pro.blogspot.com
0
by: travolta004 | last post by:
Windows XP tips and tricks. Learn how to bypass very common windows problems, speed up your system and make it more reliable with useful tips and tricks. http://windowsxpsp2pro.blogspot.com
68
bartonc
by: bartonc | last post by:
I've decide to compile a bunch of your favorite tips and tricks for the Articles section. I found a post yesterday by Chrisjc that is a perfect example. I copied his post over to create Dealing with...
2
bartonc
by: bartonc | last post by:
I've decide to compile a bunch of your favorite tips and tricks for the Articles section. Post your favorite tips and tricks here, in this thread, and I'll copy the best ones to a Tips and Tricks...
0
by: smartfix | last post by:
Windows XP tips and tricks. Learn how to bypass very common windows problems, to speed up your system and make it more reliable with useful tips and tricks. http://windowsxpsp2pro.blogspot.com
0
by: kamalpp | last post by:
hi check http://aspnet-tips-tricks.blogspot.com/ for tips and tricks Thanks
20
Nepomuk
by: Nepomuk | last post by:
As Linux and the various flavours of Unix are slowly spreading into the world of personal computers, I thought we could collect a few Tips and Tricks here to help each other making the best out of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.