zoukankan      html  css  js  c++  java
  • vs2010 仿XCode风格的头注释宏

    Sub DocumentFileHeader()

    Dim star As String
    star = "//******************************************************************************"

    ' 将添加焦点定位在文件首部
    DTE.ActiveDocument.Selection.StartOfDocument()

    ' 添加一个版权说明
    'DTE.ActiveDocument.Selection.Text = star
    DTE.ActiveDocument.Selection.NewLine()
    DTE.ActiveDocument.Selection.Text = "// "
    DTE.ActiveDocument.Selection.NewLine()
    DTE.ActiveDocument.Selection.Text = "// " + DTE.ActiveDocument.Name
    DTE.ActiveDocument.Selection.NewLine()
    DTE.ActiveDocument.Selection.Text = "// "
    DTE.ActiveDocument.Selection.NewLine()
    DTE.ActiveDocument.Selection.Text = "// " + String.Format("Created by {0} on {1:D}.", "***", Date.Now.ToString("yy-MM-dd"))
    DTE.ActiveDocument.Selection.NewLine()
    DTE.ActiveDocument.Selection.Text = "// " + String.Format("Copyright (c) {0}年 {1}. All rights reserved.", Date.Now.Year,"***")
    DTE.ActiveDocument.Selection.NewLine()
    DTE.ActiveDocument.Selection.Text = "// "
    DTE.ActiveDocument.Selection.NewLine()
    'DTE.ActiveDocument.Selection.Text = star
    DTE.ActiveDocument.Selection.NewLine()
    End Sub

  • 相关阅读:
    SQL FORMAT() 函数
    SQL ROUND() 函数
    SQL NOW() 函数
    SQL LEN() 函数
    SQL LCASE() 函数
    SQL MID() 函数
    SQL HAVING 子句
    UCASE() 函数
    SQL GROUP BY 语句
    SQL MAX() 函数
  • 原文地址:https://www.cnblogs.com/msdynax/p/3615936.html
Copyright © 2011-2022 走看看