Tips n Tracks

  • Increase font size
  • Default font size
  • Decrease font size
  • default color
  • black color

Reference

Sample image

Microsoft .NET Framework Get Details.

Sample image

Microsoft .NET Framework Get Details.

Reference

Sample image Microsoft .NET Framework Get Details.
Sample image

Microsoft .NET Framework Get Details.


Archive for May, 2009

Regular Expressions Hexadecimal RGB color code validation with .net


Regular Expressions Hexadecimal RGB color code validation with .net

Hexadecimal RGB color also known as Web colors are colors used in designing web pages. Authors of web pages have a variety of options available for specifying colors for elements of web documents. Colors may be specified as an RGB triplet in hexadecimal format (a hex triplet). A hex triplet is a six-digit, three-byte hexadecimal number used in HTML, CSS, SVG, and other computing applications, to represent colors. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or a through f) to represent values ten to fifteen.

We can also use three-digit hexadecimal representation of color in the form #RGB, where RGB is a a three-digit hexadecimal which is expanded to define the six-digit color where each digit is repeated once; thus #RGB defines to the color #RRGGBB.

Regular Expression Pattern

^\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$

A description of the regular expression:

Beginning of line or string
A numbered capture group. [[a-fA-F0-9]{6}|[a-fA-F0-9]{3}]
Select from 2 alternatives
Any character in this class: [a-fA-F0-9], exactly 6 repetitions
Any character in this class: [a-fA-F0-9], exactly 3 repetitions
End of line or string


Read the rest of this entry »

Regular Expressions Hexadecimal number validation with .net


Regular Expressions Hexadecimal number validation with .net

In mathematics and computer science, hexadecimal (also base-16, hexa, or hex) is a numeral system with a radix, or base, of 16. It uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or a through f) to represent values ten to fifteen.

Regular Expression Pattern

^[a-fA-F0-9]+$

A description of the regular expression:

Beginning of line or string
Any character in this class: [a-fA-F0-9], one or more repetitions
End of line or string


Read the rest of this entry »

Collection of useful command run on Command Prompt


Collection of useful command run on Command Prompt

Hello friends!, here i am going to introduce you with command line scripting All credit are dedicate to actual author. Here is a list of commands that you can run from the Run Command prompt (I have tested it on XP): You can run any program from command prompt whose reference is present in you systems32 folder. You must confirm it. Open you System32 folder. its location will be in WINDOWS\system32. Now right mouse click and arrange Icons by > Type and select Show in Groups. You will see Grouped items. And Max of item in Application category will be run directly on command prompt

Go to Start Menu > Run… or Windows+R and type in the command to run

Some of useful run commands are…


Read the rest of this entry »

How we open a File in its Associated Application ?


How we open a File in its Associated Application ?

To open a file in its associated application we have to add namespace to System.Diagnostics.Process to our application. The System.Diagnostics namespace provides classes that allow interacting with system processes, event logs, and performance counters.

Now add below piece of code to any event…

Try
Start(Filename)
Catch ex As Exception
MsgBox(”Trouble starting Application.”, MsgBoxStyle.Information, ” Application Alert”)
End Try

Here we have used Function Start () offer by System.Diagnostics namespace. It Starts a process resource by specifying the name of a document or application file and associates the resource with a new System.Diagnostics.Process component.

Syntax:

Start (ByVal fileName As String)

Parameters:

fileName: The name of a document or application file to run in the process.


Read the rest of this entry »

Browsing files in a folder using VB.NET


Browsing files in a folder using VB.NET

This small piece of code will give an idea to browse file in a given folder.

Start your VB.NET application and create a new project (Ctrl+Shift+N) in Windows Application and design your form as you like. I have design my form as below (Figure 1.):

Browsing files in a folder using VB.NET

Now drag a FolderBrowseDialog from Toolbox and name it FolderBrowserDialog1.

On click event of btnBrowse open FolderBrowserDialog1 to select folder and then assign that path to txtPath.


Read the rest of this entry »