admin 管理员组

文章数量: 1086019


2024年3月27日发(作者:sql unique可以为空吗)

(1) 在..Microsoft Visual StudioCommon-MSDEV98-MACROS文件夹下生成文件

(2) 用文本编辑器打开该文件,将以下所附的代码贴在其中,保存(注意保留.dsm后

缀)

(3) 启动CVF,选Tools=>Customize=>Add-ins and Macro Files

(4) 在GrpComment前打勾,去掉其他的勾

(5) 在同一对话框中选Commands=>Macros,此时在右边可以看见CommentDel

和CommentOut

(6) 选中CommentOut,拖到CVF的工具栏上去(添加工具钮),会弹出Button

Appearance对话框

(7) 选Image and text,在下边Button text框中输入名称(默认是CommentOut),

如“加注释”

(8) 类似的方法再将CommentDel命令以工具钮的形式添加到工具栏上,名称可取为

“去注释”

这时,工具栏上应该多了两个工具钮:“加注释”和“去注释”。

用法:

加注释:选择要加注释的多行代码,点击“加注释”按钮即可;

去注释:选择已经注释的多行代码,点击“去注释”按钮即可。

适用:后缀为f90或f77的代码文件。

Enjoy

VBscript代码:

Function FileType (ByVal doc)

ext =

FileType = 0

pos = Instr(ext, ".")

if pos > 0 then

Do While pos <> 1

ext = Mid(ext, pos, Len(ext) - pos + 1)

pos = Instr(ext, ".")


本文标签: 注释 工具栏 工具 文件 添加