SourceFormatX

Overview

Features

Why Use It

Formatting Show

Integration

Screenshots

Documentation

FAQs & Tips

Update History

Award Gallery

Testimonials

License Policy

CodeMorph

CodeToHtml

VB.NET / VB Dot Net Source Code Formatting Show


SourceFormatX code formatter bases on powerful syntax parse engines so it can beautify and format source code files with omnifarious styles, even these messy source code examples below:

C/C++ Java C# Delphi (Pascal)
PHP JSP ASP JavaScript
Visual Basic VB.NET VBScript HTML Components
80x86 ASM 8051 ASM CORBA IDL


This is an extreme VB.NET code formatting example, the purpose of it is to show the power of VB.NET / VB DotNet syntax parse engine powered by SourceFormatX VB.NET Code Formatter.

  '----- Before VB.NET Code Formatting -----

  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"
  ' Generics
  Private Function HandleAction(ByVal action As CAction) As Boolean
  'MsgBox(action.Caption)
  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
  ' Special
  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


  '----- After VB.NET Code Formatting -----

  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"
          ' Generics

          Private Function HandleAction(ByVal action As CAction) As Boolean
              'MsgBox(action.Caption)
              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

          ' Special
          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
  

  Don't waste time on formatting VB.NET code by hand any more!  Download SourceFormatX Free Trial Now!