블로그 이미지
fiadot_old

칼퇴근을 위한 게임 서버 개발 방법론에 대한 심도있는 고찰 및 성찰을 위한 블로그!

Rss feed Tistory
Technical Article/펌 2005. 4. 4. 13:43

VS6 주석 달기 매크로

1. Tools->Macro-> MacroName에 Comment넣고 Edit~
밑에꺼 다 추가!

'------------------------------------------------------------------------------
'FILE DESCRIPTION: New Macro File
'------------------------------------------------------------------------------


Sub Comment()
'DESCRIPTION: A description was not provided.
Dim win
set win = ActiveWindow
if win.type <> "Text" Then
MsgBox "This macro can only be run when a text editor window is active."
else
if InStr( ActiveDocument.Selection, vbCr ) > 0 then
ActiveDocument.Selection.ReplaceText "^", "//", dsMatchRegExp
Else
'ActiveDocument.Selection = "/* " + ActiveDocument.Selection + " */"
ActiveDocument.Selection = "//" + ActiveDocument.Selection
End If
End If
End Sub

Sub UnComment()
'DESCRIPTION: 주석 해제
Dim win
set win = ActiveWindow
if win.type <> "Text" Then
MsgBox "This macro can only be run when a text editor window is active."
else
ActiveDocument.Selection.ReplaceText "^//", "", dsMatchRegExp
End If
End Sub


2. Options->KeyStrokes 에 다음 할당~

주석 : CTRL+/
주석해제 : CTRL+SHIFT+/

셋팅완료!
,
TOTAL TODAY