sábado, 20 de fevereiro de 2016

Formatar código fonte para colocar em postagens

http://formatmysourcecode.blogspot.com.br/

Public Class Form1

    Const WM_NCHITTEST As Integer = &H84
    Const HTCLIENT As Integer = &H1
    Const HTCAPTION As Integer = &H2

    Protected Overrides Sub WndProc(ByRef m As Message)
        Select Case m.Msg
            Case WM_NCHITTEST
                MyBase.WndProc(m)
                If m.Result = HTCLIENT Then m.Result = HTCAPTION
            Case Else
                MyBase.WndProc(m)
        End Select
    End Sub
End Class

http://codeformatter.blogspot.com.br/2009/06/about-code-formatter.html

1:  Public Class Form1  
2:    Const WM_NCHITTEST As Integer = &H84  
3:    Const HTCLIENT As Integer = &H1  
4:    Const HTCAPTION As Integer = &H2  
5:    Protected Overrides Sub WndProc(ByRef m As Message)  
6:      Select Case m.Msg  
7:        Case WM_NCHITTEST  
8:          MyBase.WndProc(m)  
9:          If m.Result = HTCLIENT Then m.Result = HTCAPTION  
10:        Case Else  
11:          MyBase.WndProc(m)  
12:      End Select  
13:    End Sub  
14:  end class  

http://hilite.me/


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
Imports System
Imports System.IO
Imports System.Text

Module Module1

    Sub Main()
        Dim path As String = "c:\temp\MyTest.txt"

        ' Create or overwrite the file.
        Dim fs As FileStream = File.Create(path)

        ' Add text to the file.
        Dim info As Byte() = New UTF8Encoding(True).GetBytes("This is some text in the file.")
        fs.Write(info, 0, info.Length)
        fs.Close()
    End Sub

End Module

Nenhum comentário :

Postar um comentário

Related Posts Plugin for WordPress, Blogger...