Click here to Skip to main content
15,167,925 members

Articles by Anshul R (Articles: 5, Tip/Tricks: 37)

Articles: 5, Tip/Tricks: 37

RSS Feed

Average article rating: 3.70

Programming Languages
C
Posted: 1 Oct 2009   Updated: 1 Oct 2009   Views: 115,357   Rating: 4.67/5    Votes: 15   Popularity: 5.20
Licence: The Code Project Open License (CPOL)      Bookmarked: 16   Downloaded: 2,259
Please Sign up or sign in to vote.
Solves linear equation in one variable, 2 linear equations in 2 variables, quadratic equations and cubic equations
Visual Basic
Posted: 13 Jun 2010   Updated: 15 Jun 2010   Views: 77,841   Rating: 4.00/5    Votes: 17   Popularity: 4.70
Licence: The Code Project Open License (CPOL)      Bookmarked: 15   Downloaded: 0
Please Sign up or sign in to vote.
How ARGB works
Posted: 26 Apr 2008   Updated: 4 May 2008   Views: 121,847   Rating: 2.57/5    Votes: 21   Popularity: 3.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 39   Downloaded: 14,357
Please Sign up or sign in to vote.
Creating a clone of notepad in Visual Basic
Posted: 20 Jul 2007   Updated: 22 Aug 2007   Views: 41,341   Rating: 3.47/5    Votes: 17   Popularity: 4.27
Licence: The Code Project Open License (CPOL)      Bookmarked: 22   Downloaded: 1,859
Please Sign up or sign in to vote.
New functions added to the calculator , Now currency converter included
Posted: 25 May 2010   Updated: 25 May 2010   Views: 15,251   Rating: 3.80/5    Votes: 9   Popularity: 3.63
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 218
Please Sign up or sign in to vote.
An expression evaluator that doesn't support parantheses at the beginning.

Average blogs rating:

No blogs have been submitted.

Average tips rating: 3.96

.NET
.NET4
Posted: 13 Jun 2010   Updated: 13 Jun 2010   Views: 21,231   Rating: 3.33/5    Votes: 8   Popularity: 3.01
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
Instead, you can create a new project in VS2008 and add the source code files to it.
All Topics
Posted: 10 Jun 2010   Updated: 8 Apr 2013   Views: 63,416   Rating: 4.98/5    Votes: 27   Popularity: 6.96
Licence: The Code Project Open License (CPOL)      Bookmarked: 20   Downloaded: 0
Please Sign up or sign in to vote.
Syntax coloring for tip/trick
CodeProject
Posted: 12 Jun 2010   Updated: 12 Jun 2010   Views: 11,790   Rating: 4.00/5    Votes: 2   Popularity: 1.20
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
Useful Add-on for Editors
Desktop Programming
Windows Forms
Posted: 23 Sep 2011   Updated: 2 Oct 2011   Views: 10,440   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
You can use BackgroundWorker to do the work and report the progress using:private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e){ this.progressBar1.Value = e.ProgressPercentage;}
Posted: 12 Jun 2010   Updated: 12 Jun 2010   Views: 6,300   Rating: 4.60/5    Votes: 5   Popularity: 3.22
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
The original snippet I made is in VB.NETProtected Overrides Sub WndProc(ByRef e As Message) MyBase.WndProc(e) If e.Msg = &H84 AndAlso e.Result = &H1 Then e.Result = &H2 End SubI used Reflector to translate it to C#protected override void WndProc(ref Message...
WPF
Posted: 28 May 2011   Updated: 28 May 2011   Views: 18,242   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
For the souls confused about WPF.
Posted: 28 May 2011   Updated: 30 May 2011   Views: 14,271   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 5   Downloaded: 0
Please Sign up or sign in to vote.
Controls will have the Aero Theme (WPF)
Operating Systems
Windows
Posted: 12 Jun 2010   Updated: 12 Jun 2010   Views: 7,470   Rating: 1.40/5    Votes: 3   Popularity: 0.67
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
API Guide[^] is also a really good resource
Programming Languages
C
Posted: 10 Jun 2010   Updated: 11 Feb 2012   Views: 36,150   Rating: 4.74/5    Votes: 17   Popularity: 5.58
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 109
Please Sign up or sign in to vote.
Prime Number Testing
Posted: 10 Jun 2010   Updated: 10 Jun 2010   Views: 16,722   Rating: 4.80/5    Votes: 5   Popularity: 3.36
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
Tests For a Prime Number
C#
Posted: 23 Sep 2011   Updated: 2 Oct 2011   Views: 4,710   Rating: 4.67/5    Votes: 2   Popularity: 1.40
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
[Browsable(fal...
Posted: 28 Jun 2010   Updated: 28 Jun 2010   Views: 7,451   Rating: 1.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
string mobileNumber = "00054 675 286"mobileNumber = Replace(mobileNumber," ","/");Dim mobileNumber As String = "00054 675 286&quotmobileNumber = Replace(mobileNumber," ","/")
Posted: 27 May 2011   Updated: 27 May 2011   Views: 10,860   Rating: 4.90/5    Votes: 6   Popularity: 3.81
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
For Control Panel:Process.Start("control.exe");For My Computer:Process.Start("explorer.exe", Environment.GetFolderPath(Environment.SpecialFolder.MyComputer));For the rest, we can use GUID just like the original.For Recycle...
Posted: 3 Jun 2011   Updated: 3 Jun 2011   Views: 6,980   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
public static bool IsNullEmptyOrWhitespace(this string value){ return string.IsNullOrEmpty(value) || string.IsNullOrEmpty(value.Trim());}In C# 4.0, you already have such a function.string.IsNullOrWhiteSpace(value)
Posted: 15 Jun 2011   Updated: 15 Jun 2011   Views: 10,261   Rating: 3.29/5    Votes: 6   Popularity: 2.56
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
Even simpler.form1.opacity=0;
Posted: 23 Sep 2011   Updated: 23 Sep 2011   Views: 10,482   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
using Microsoft.VisualBasic;// Codebool result = Information.IsNumeric("123");
Posted: 23 Sep 2011   Updated: 23 Sep 2011   Views: 4,530   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
See this for implementing Singletonhttp://msdn.microsoft.com/en-us/library/ff650316.aspx[^]
Posted: 21 Sep 2011   Updated: 2 Oct 2011   Views: 9,370   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
Rnd() For Red, Green, Blue values. Then convert to ARGB.
Posted: 3 Oct 2011   Updated: 3 Oct 2011   Views: 15,030   Rating: 2.25/5    Votes: 6   Popularity: 1.75
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
Use Recursion.int factorial(int n){ if(n<0) return -1; if(n==0 || n==1) return 1; return n * factorial(n-1);}
C++
Posted: 10 Jun 2010   Updated: 10 Jun 2010   Views: 11,680   Rating: 4.40/5    Votes: 5   Popularity: 3.08
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
You can simply use the sleep() function in dos.h in a loop and print it!
Posted: 10 Jun 2010   Updated: 8 Nov 2010   Views: 35,491   Rating: 4.00/5    Votes: 7   Popularity: 3.38
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
Simple and prints imaginary roots too!float a,b,c,x1,x2,d,dsq;printf("ax^2 + bx + c = 0");printf("\nEnter a,b,c separated by commas : \n");scanf("%f,%f,%f",&a,&b,&c);d = b*b-(4*a*c);if(d>=0){dsq=sqrt(d);x1 = (-b+dsq)/(2*a);x2 = (-b-(dsq))/(2*a);printf("\nRoot 1 : %f\nRoot 2...
Visual Basic
Posted: 10 Jun 2010   Updated: 10 Jun 2010   Views: 32,353   Rating: 3.38/5    Votes: 10   Popularity: 3.38
Licence: The Code Project Open License (CPOL)      Bookmarked: 4   Downloaded: 0
Please Sign up or sign in to vote.
Label1.Paren...
Posted: 21 Sep 2011   Updated: 21 Sep 2011   Views: 5,620   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
Private Sub GetIPAddress()Dim strHostName As StringDim strIPAddress As StringstrHostName = System.Net.Dns.GetHostName()strIPAddress = System.Net.Dns.Resolve(strHostName).AddressList(0).ToString()MessageBox.Show("Host Name: " & strHostName & "; IP Address: " &...
Posted: 14 Mar 2013   Updated: 14 Mar 2013   Views: 8,690   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
Quick way to read RSS
Visual Basic 10
Posted: 10 Jun 2010   Updated: 10 Jun 2010   Views: 9,870   Rating: 4.86/5    Votes: 7   Popularity: 4.10
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 146
Please Sign up or sign in to vote.
A class for N-Digit Arithmetic
Posted: 10 Jun 2010   Updated: 10 Jun 2010   Views: 14,936   Rating: 4.67/5    Votes: 6   Popularity: 3.63
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
Converts a given decimal number to fraction
Posted: 10 Jun 2010   Updated: 10 Jun 2010   Views: 11,080   Rating: 4.33/5    Votes: 6   Popularity: 3.37
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
Shortcut for Commenting
Posted: 10 Jun 2010   Updated: 10 Jun 2010   Views: 17,050   Rating: 4.00/5    Votes: 4   Popularity: 2.41
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 0
Please Sign up or sign in to vote.
The Perfect Translation/Conversion of Code
Posted: 14 Jun 2010   Updated: 21 Jun 2010   Views: 10,642   Rating: 2.60/5    Votes: 4   Popularity: 1.57
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
Saving a form's settings
Posted: 24 May 2011   Updated: 24 May 2011   Views: 10,820   Rating: 1.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
Handle code redundancy for many controls in one subroutine
Visual Studio
Posted: 10 Jun 2010   Updated: 10 Jun 2010   Views: 27,881   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
A solution for Visual Studio 2010 black-out
Posted: 23 Sep 2011   Updated: 23 Sep 2011   Views: 5,240   Rating: 0.00/5    Votes: 0   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0
Please Sign up or sign in to vote.
Open the project file in notepad. .vbproj or .csproj.Change the VS version.
Posted: 8 Jun 2010   Updated: 8 Jun 2010   Views: 11,530   Rating: 4.73/5    Votes: 7   Popularity: 4.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
Please Sign up or sign in to vote.
MRU Locations and other locations in the Registry
Web Development
ASP.NET
Posted: 23 Sep 2011   Updated: 2 Oct 2011   Views: 19,860   Rating: 4.71/5    Votes: 6   Popularity: 3.67
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 0
Please Sign up or sign in to vote.
Prefix, Length, and Check Digit CriteriaHere is a table outlining the major credit cards that you might want to validate.CARD TYPE Prefix Length Check digit algorithmMASTERCARD 51-55 16 mod 10VISA 4 13, 16 mod 10AMEX 3437 15 mod 10Diners Club/Carte...
Posted: 25 May 2011   Updated: 27 May 2011   Views: 9,460   Rating: 4.53/5    Votes: 9   Popularity: 4.32
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
Dim value As Boolean = My.Computer.Network.IsAvailable can be used in a situation where the only network a system will be connected to is the Internet.Dim value As Boolean = My.Computer.Network.Ping(hostNameOrAddress ,timeout) hostNameOrAddress can be any valid website -...
HTML
Posted: 25 May 2011   Updated: 25 May 2011   Views: 10,560   Rating: 2.67/5    Votes: 3   Popularity: 1.27
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
Please Sign up or sign in to vote.
Use a web service?http://www.webservicex.net/country.asmx[^]http://www.siliconllama.com/services/wsdl/ISOcodesService.wsdl[^]
Posted: 11 Mar 2013   Updated: 11 Mar 2013   Views: 9,670   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
Please Sign up or sign in to vote.
Increase text box length as you type

Average reference rating:

No reference articles have been posted.

Average project rating:

No projects have been posted.

Anshul R
Student
India India
No Biography provided