FormatCode Code Formatter is based on serveral powerful syntax parser engines
so you can exactly control the appearance of your source code. Here is the code formatting demo of
FormatCode VB.NET Code Formatter to prove the ability of code
formatting functions of FormatCode:
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Imports System.IO
Public Class FCommand
Inherits System.Windows.Forms.Form
#Region "Encapsulation"
Private m_Actions As NActions
Private m_AcsRecent As NActions
Private m_Status As StatusBar
#End Region
#Region "Events, Handlers and Overrides"
Private Function HandleAction(ByVal action As CAction) As Boolean
m_Status.Text = Nothing
Return True
End Function
Private Sub HandleHint(ByVal action As CAction)
m_Status.Text = action.Hint
End Sub
Protected Overrides Sub OnMenuComplete(ByVal e As System.EventArgs)
m_Status.Text = Nothing
End Sub
Private Function HandleExit(ByVal action As CAction) As Boolean
Application.Exit
End Function
Private Function HandleUndo(ByVal action As CAction) As Boolean
With action
.Hint = "Can't undo right now"
.Enabled = False
End With
End Function
Private Function HandleCutCopy(ByVal action As CAction) As Boolean
With m_Actions("Paste")
.Enabled = True
End With
End Function
#End Region
End Class
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Imports System.IO
Public Class FCommand
Inherits System.Windows.Forms.Form
#Region "Encapsulation"
Private m_Actions As NActions
Private m_AcsRecent As NActions
Private m_Status As StatusBar
#End Region
#Region "Events, Handlers and Overrides"
Private Function HandleAction(ByVal action As CAction) As Boolean
m_Status.Text = Nothing
Return True
End Function
Private Sub HandleHint(ByVal action As CAction)
m_Status.Text = action.Hint
End Sub
Protected Overrides Sub OnMenuComplete(ByVal e As System.EventArgs)
m_Status.Text = Nothing
End Sub
Private Function HandleExit(ByVal action As CAction) As Boolean
Application.Exit
End Function
Private Function HandleUndo(ByVal action As CAction) As Boolean
With action
.Hint = "Can't undo right now"
.Enabled = False
End With
End Function
Private Function HandleCutCopy(ByVal action As CAction) As Boolean
With m_Actions("Paste")
.Enabled = True
End With
End Function
#End Region
End Class
Click here to preview the VB.NET Code Formatting Demo 1.
With FormatCode VB.NET Code Formatters, you can format and transform any foreign VB.NET source code to meet your preferred coding style or any common code convention in several seconds!
|