- MSDN Subscribers: Get Visual Studio 2008 Now
- Download Trial Editions of Visual Studio 2008
- Download Visual Studio 2008 Express Editions
- Download the .NET Framework 3.5
Thursday, December 27, 2007
Download Visual Studio 2008 and the .NET Framework 3.5
Sunday, December 23, 2007
Split Function in Visual Basic .Net
Split Function returns a zero-based, one-dimensional array containing a specified number of substrings.
Function DND_Split_Example()
Dim arTempVB2005() As String
Dim arTempVB6() As String
Dim arTempSpace() As String
Dim sSplitString As String
sSplitString = "MyName||MyAge||MySex"
arTempVB2005 = sSplitString.Split("||")
arTempVB6 = Microsoft.VisualBasic.Split(sSplitString, "||")
arTempSpace = Split("Split By Spaces”)
End Function
Here are the overloaded examples of Split Function
Split Call | Return Value |
| {"42," , "12," , "19"} |
| {"42", "12", "19"} |
| {"42", "12, 19"} |
| {"192", "168", "0", "1"} |
| {"Alice and Bob"} |
| {"Alice", "Bob"} |
| {"someone@example.com"} |
| {"someone", "example.com"} |
Visual Studio Immediate Window
Immediate and Command window in Visual Studio
The Command window is used to execute commands or aliases directly in the Visual Studio integrated development environment (IDE). You can execute both menu commands and commands that do not appear on any menu. To display the Command window, choose Other Windows from the View menu, and select Command Window
The Immediate window is used to debug and evaluate expressions, execute statements, print variable values, and so forth. It allows you to enter expressions to be evaluated or executed by the development language during debugging. To display the Immediate window, open a project for editing, then choose Windows from the Debug menu and select Immediate.
You can use this window to issue individual Visual Studio commands. The available commands include EvaluateStatement
, which can be used to assign values to variables. The Immediate window also supports IntelliSense.
The table below contains a list of the pre-defined aliases that come with Visual Studio 2005
Command Name | Alias | Complete Name |
? | Debug.Print | |
?? | Debug.Quickwatch | |
Add New Project | AddProj | File.AddNewProject |
Alias | Tools.Alias | |
Autos window | Autos | Debug.Autos |
Breakpoints window | bl | Debug.Breakpoints |
Toggle Breakpoint | bp | Debug.ToggleBreakPoint |
Call Stack window | CallStack | Debug.CallStack |
Clear Bookmarks | ClearBook | Edit.ClearBookmarks |
Close | Close | File.Close |
Close All Documents | CloseAll | Window.CloseAllDocuments |
Clear All | cls | Edit.ClearAll |
Command mode | cmd | View.CommandWindow |
View Code | code | View.ViewCode |
d | Debug.ListMemory | |
List Memory as ANSI | da | Debug.ListMemory /Ansi |
List Memory One Byte format | db | Debug.ListMemory /Format:OneByte |
List Memory as ANSI with Four Byte format | dc | Debug.ListMemory /Format:FourBytes /Ansi |
List Memory Four Byte format | dd | Debug.ListMemory /Format:FourBytes |
Delete to BOL | DelBOL | Edit.DeleteToBOL |
Delete to EOL | DelEOL | Edit.DeleteToEOL |
Delete Horizontal Whitespace | DelHSp | Edit.DeleteHorizontalWhitespace |
View Designer | designer | View.ViewDesigner |
List Memory Float format | df | Debug.ListMemory/Format:Float |
Disassembly window | disasm | Debug.Disassembly |
List Memory Eight Byte format | dq | Debug.ListMemory /Format:EightBytes |
List Memory as Unicode | du | Debug.ListMemory /Unicode |
eval | Debug.EvaluateStatement | |
Exit | Exit | File.Exit |
Format Selection | format | Edit.FormatSelection |
Full Screen | FullScreen | View.FullScreen |
g | Debug.Start | |
GotoLn | Edit.GoTo | |
Go to Brace | GotoBrace | Edit.GotoBrace |
Help | Help.F1Help | |
Immediate Mode | immed | Tools.ImmediateMode |
Insert File as Text | InsertFile | Edit.InsertFileAsText |
kb | Debug.ListCallStack | |
Make Lower Case | Lcase | Edit.MakeLowercase |
Cut Line | LineCut | Edit.LineCut |
Delete Line | LineDel | Edit.LineDelete |
List Members | ListMembers | Edit.ListMembers |
Locals window | Locals | Debug.Locals |
Log | Tools.LogCommandWindowOutput | |
Command Window Mark Mode | mark | Tools.CommandWindowMarkMode |
Memory window | Memory Memory1 | Debug.Memory1 |
Memory Window 2 | Memory2 | Debug.Memory2 |
Memory Window 3 | Memory3 | Debug.Memory3 |
Memory Window 4 | Memory4 | Debug.Memory4 |
n | Debug.SetRadix | |
nav navigate | View.ShowWebBrowser | |
Next Bookmark | NextBook | Edit.NextBookmark |
nf | File.NewFile | |
New Project | np NewProj | File.NewProject |
of Open | File.OpenFile | |
op | File.OpenProject | |
Collapse to Definitions/Stop Outlining | OutlineDefs StopOutlining | Edit.CollapsetoDefinitions |
Step Over | p | Debug.StepOver |
Parameter Information | ParamInfo | Edit.ParameterInfo |
Step Out | pr | Debug.StepOut |
Previous Bookmark | PrevBook | Edit.PreviousBookmark |
Print File | print | File.Print |
Properties Window | props | View.PropertiesWindow |
Stop | q | Debug.StopDebugging |
Redo | redo | Edit.Redo |
Registers window | registers | Debug.Registers |
Run to Cursor | rtc | Debug.RunToCursor |
Save Selected Items | save | File.SaveSelectedItems |
Save All | SaveAll | File.SaveAll |
Save As | SaveAs | File.SaveSelectedItemsAs |
Script Only View | ScriptOnly | View.ShowScriptOnly |
shell | Tools.Shell | |
Stop Find In Files | StopFind | Edit.FindInFiles /stop |
Swap Anchor | SwapAnchor | Edit.SwapAnchor |
Step Into | t | Debug.StepInto |
Tabify Selection | tabify | Edit.TabifySelection |
Tasklist window | TaskList | View.TaskList |
Threads window | Threads | Debug.Threads |
Tile Horizontally | TileH | Window.TileHorizontally |
Tile Vertically | TileV | Window.TileVertically |
Toggle Bookmark | ToggleBook | Edit.ToggleBookmark |
Toolbox window | toolbox | View.Toolbox |
u | Debug.ListDisassembly | |
Make Uppercase | Ucase | Edit.MakeUppercase |
Undo | undo | Edit.Undo |
Untabify Selection | Untabify | Edit.UntabifySelection |
Watch window | Watch | Debug.WatchN |
Toggle Word Wrap | WordWrap | Edit.ToggleWordWrap |
~ | Debug.ListThreads |
Microsoft XP Style Buttons and Controls on Form in .Net
Change style of Buttons to Microsoft XP Standard using .Net
Visual style is the user-modifiable appearance of the user interface of an application or operating system. By default, Windows XP provides a new visual style. The scroll bars and title bar of a Windows Form will automatically use the new visual style when the form is run on Windows XP. If your application calls the EnableVisualStyles method, most of your Windows Forms controls will automatically use the visual style when your application is run on Windows XP
Private Sub frmDND1Main_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Application.EnableVisualStyles()
End Sub
The same can be achieved in the designer :
Preventing multiple instances of .Net Application
If you were creating a Windows application, most often you would be doing some database initialization or some network validation before you show up the form to the user.
The patient user might wait few seconds to let the form show, others might launch the application again. To avoid user launch multiple instances of the application, select the Make single instance application check box to prevent users from running multiple instances of your application. The default setting for this check box is cleared, allowing multiple instances of the application to be run.
You can do this from Projectà Propertiesà Application tab