Can VB.NET Build Comment Web Pages 
Author Message
 Can VB.NET Build Comment Web Pages

I've been trying to figure out how to comment my VB .NET
in such a way as to allow me to use the VS .NET feture
under the Tools - Build Comment Web Pages.  From all the
MSDN library help I've read, it looks like the only
laguages that support this is C#.  J# looks like it has
its own documentation generator that work with the javadoc
stadards of documenting code.  Does VB .NET have this
capablility?  Will it in the future?  We have used a tool
called VBDox to generate Web based documentation from our
code documentation for VB 6.0 programs.  This is an
important feature that I wish VB .NET had


Tue, 26 Apr 2005 23:19:59 GMT  
 Can VB.NET Build Comment Web Pages
You mean something like this?

        'this is entirely new syntax for wmi
        'instead of having to dim a locator and services object, we call the
managementobjectsearcher
        'totally cool

        Dim mos As System.Management.ManagementObjectSearcher
        Dim moc As System.Management.ManagementObjectCollection
        Dim mo As System.Management.ManagementObject
        Dim prop As System.Management.PropertyData

        Dim FSO As Object
        Dim txtstream As Object
        Dim MyString As String

        mos = New System.Management.ManagementObjectSearcher("SELECT * FROM
Win32_BIOS")
        moc = mos.Get()
        For Each mo In moc
            FSO = CreateObject("Scripting.filesystemobject")
            txtstream = FSO.OpenTextFile("Win32_BIOS.htm", 2, True, -2)
            txtstream.writeline("<HTML>")
            txtstream.writeline("<HEAD>")
            txtstream.writeline("<TITLE>Win32_BIOS</TITLE>")
            txtstream.writeline("</HEAD>")
            txtstream.writeline("<XML ID=""RS"">")
            txtstream.writeline("<?xml version=""1.0""
encoding=""iso-8859-1""?>")
            txtstream.writeline("<Data>")
            txtstream.writeline("<Win32_BIOS>")
            For Each prop In mo.Properties
                On Error Resume Next
                If IsNothing(prop.Value) = True Then
                    txtstream.writeline("<" + prop.Name + "></" + prop.Name
+ ">")
                Else
                    txtstream.writeline("<" + prop.Name + ">" +
Trim(prop.Value) + "</" + prop.Name + ">")
                    Err.Clear()
                End If
            Next
            txtstream.writeline("</Win32_BIOS>")
            txtstream.writeline("</Data>")
            txtstream.writeline("</XML>")
            txtstream.writeline("<BODY BGCOLOR=""Darkblue""
Text=""White"">")
            txtstream.writeline("<Table Border=""1"" colspacing=""10"">")
            For Each prop In mo.Properties
                txtstream.writeline("<TR>")
                txtstream.writeline("<TH Align=Center Nowrap=True
STYLE=""Border:None;Background-color:Silver;Font-Family:Tahoma;Font-Size:14;
Font-Weight:bold;Color:Yellow;filter:ProgID:DXImageTransform.Microsoft.Gradi
ent(gradientType=0, StartColorStr='Silver', endColorstr='Black')"">" +
prop.Name + "</TH>")
                txtstream.writeline("<TD Align=Center Nowrap=True
STYLE=""Border:none;Color:white;Font-Family:Tahoma;Font-Size:12;Font-weight:
Bold;width:100%;filter:ProgID:DXImageTransform.Microsoft.Gradient(gradientTy
pe=0, StartColorStr='Red', endColorstr='Black')""><SPAN datasrc=#RS
datafld=" + Chr(34) + prop.Name + Chr(34) + "></SPAN></TD>")
                txtstream.write("</TR>")
            Next
            txtstream.write("</TABLE>")
            txtstream.write("</BODY>")
            txtstream.write("</HTML>")
            txtstream.close()
            Exit For
        Next
        txtstream = Nothing
        FSO = Nothing

    End Sub


Quote:
> I've been trying to figure out how to comment my VB .NET
> in such a way as to allow me to use the VS .NET feture
> under the Tools - Build Comment Web Pages.  From all the
> MSDN library help I've read, it looks like the only
> laguages that support this is C#.  J# looks like it has
> its own documentation generator that work with the javadoc
> stadards of documenting code.  Does VB .NET have this
> capablility?  Will it in the future?  We have used a tool
> called VBDox to generate Web based documentation from our
> code documentation for VB 6.0 programs.  This is an
> important feature that I wish VB .NET had



Tue, 26 Apr 2005 23:31:44 GMT  
 Can VB.NET Build Comment Web Pages
I guess I did not explain this very well.  I don't thing
your example addresses what I'm talking about.  Here is an
example of what I mean.  I write the following Function in
VB.NET:

Public Sub MyFunction(strMyString as String) as Boolean

     If Len(Trim(strMyString)) = 0 then
         return True
     End If

End Function

Now, if I add the following comments to this function:

' <summary> This function checks the incoming string to
' see if it contains any characters </summary>
'
' <param name="strMyString">Incoming string to check for
' characters</param>
' <return>When True, indicates the incomine string
' is empty</return>
' <remarks>This is an example of using XML code commenting
' to be recognized by the Code Comment Web Reporter
' </remarks>
Public Sub MyFunction(strMyString as String) as Boolean

     If Len(Trim(strMyString)) = 0 then
         return True
     End If

End Function

Then I select Tools - Build Comment Web Pages in Visual
Studio .NET, I want a HTML report generated from the
comments inserted in my code, in order to generate
documentation for my function for other programmers to use
who might maintain or use this function.

Quote:
>-----Original Message-----
>You mean something like this?

>        'this is entirely new syntax for wmi
>        'instead of having to dim a locator and services
object, we call the
>managementobjectsearcher
>        'totally cool

>        Dim mos As

System.Management.ManagementObjectSearcher
Quote:
>        Dim moc As

System.Management.ManagementObjectCollection
Quote:
>        Dim mo As System.Management.ManagementObject
>        Dim prop As System.Management.PropertyData

>        Dim FSO As Object
>        Dim txtstream As Object
>        Dim MyString As String

>        mos = New

System.Management.ManagementObjectSearcher("SELECT * FROM
Quote:
>Win32_BIOS")
>        moc = mos.Get()
>        For Each mo In moc
>            FSO = CreateObject

("Scripting.filesystemobject")
Quote:
>            txtstream = FSO.OpenTextFile

("Win32_BIOS.htm", 2, True, -2)
Quote:
>            txtstream.writeline("<HTML>")
>            txtstream.writeline("<HEAD>")
>            txtstream.writeline

("<TITLE>Win32_BIOS</TITLE>")
Quote:
>            txtstream.writeline("</HEAD>")
>            txtstream.writeline("<XML ID=""RS"">")
>            txtstream.writeline("<?xml version=""1.0""
>encoding=""iso-8859-1""?>")
>            txtstream.writeline("<Data>")
>            txtstream.writeline("<Win32_BIOS>")
>            For Each prop In mo.Properties
>                On Error Resume Next
>                If IsNothing(prop.Value) = True Then
>                    txtstream.writeline("<" + prop.Name
+ "></" + prop.Name
>+ ">")
>                Else
>                    txtstream.writeline("<" + prop.Name
+ ">" +
>Trim(prop.Value) + "</" + prop.Name + ">")
>                    Err.Clear()
>                End If
>            Next
>            txtstream.writeline("</Win32_BIOS>")
>            txtstream.writeline("</Data>")
>            txtstream.writeline("</XML>")
>            txtstream.writeline("<BODY

BGCOLOR=""Darkblue""
Quote:
>Text=""White"">")
>            txtstream.writeline("<Table Border=""1""

colspacing=""10"">")
Quote:
>            For Each prop In mo.Properties
>                txtstream.writeline("<TR>")
>                txtstream.writeline("<TH Align=Center
Nowrap=True
>STYLE=""Border:None;Background-color:Silver;Font-

Family:Tahoma;Font-Size:14;
Quote:
>Font-

Weight:bold;Color:Yellow;filter:ProgID:DXImageTransform.Mic
rosoft.Gradi
Quote:
>ent(gradientType=0, StartColorStr='Silver',

endColorstr='Black')"">" +
Quote:
>prop.Name + "</TH>")
>                txtstream.writeline("<TD Align=Center
Nowrap=True
>STYLE=""Border:none;Color:white;Font-Family:Tahoma;Font-

Size:12;Font-weight:

- Show quoted text -

Quote:
>Bold;width:100%;filter:ProgID:DXImageTransform.Microsoft.G
radient(gradientTy
>pe=0, StartColorStr='Red', endColorstr='Black')""><SPAN
datasrc=#RS
>datafld=" + Chr(34) + prop.Name + Chr(34)
+ "></SPAN></TD>")
>                txtstream.write("</TR>")
>            Next
>            txtstream.write("</TABLE>")
>            txtstream.write("</BODY>")
>            txtstream.write("</HTML>")
>            txtstream.close()
>            Exit For
>        Next
>        txtstream = Nothing
>        FSO = Nothing

>    End Sub


message

>> I've been trying to figure out how to comment my VB .NET
>> in such a way as to allow me to use the VS .NET feture
>> under the Tools - Build Comment Web Pages.  From all the
>> MSDN library help I've read, it looks like the only
>> laguages that support this is C#.  J# looks like it has
>> its own documentation generator that work with the
javadoc
>> stadards of documenting code.  Does VB .NET have this
>> capablility?  Will it in the future?  We have used a
tool
>> called VBDox to generate Web based documentation from
our
>> code documentation for VB 6.0 programs.  This is an
>> important feature that I wish VB .NET had

>.



Wed, 27 Apr 2005 00:06:15 GMT  
 Can VB.NET Build Comment Web Pages
Well, first of all, I was using my sample as a means to show you how its
possible to do something like what you're tring to accomplish---since its
not built in.

System.Attributes is what I believe your looking for with respect to your
comments.With respect to making the web page, My personal choice is XML
simply because it renders much better:

<?xml version='1.0' encoding='iso-8859-1'?>
<DATA>
    <summary> This function checks the incoming string to  see if it
contains any characters </summary>
    <param name="strMyString">Incoming string to check for
characters</param>
    <return>When True, indicates the incomine string is empty</return>
    <remarks>This is an example of using XML code commenting to be
recognized by the Code Comment Web Reporter</remarks>

<![CDATA[

    Public Function MyFunction(ByVal strMyString As String) As Boolean

        If Len(Trim(strMyString)) = 0 Then
            Return True
        End If

]]>
</DATA>

Sorry, I can't be of more help..


Quote:
> I guess I did not explain this very well.  I don't thing
> your example addresses what I'm talking about.  Here is an
> example of what I mean.  I write the following Function in
> VB.NET:

> Public Sub MyFunction(strMyString as String) as Boolean

>      If Len(Trim(strMyString)) = 0 then
>          return True
>      End If

> End Function

> Now, if I add the following comments to this function:

> ' <summary> This function checks the incoming string to
> ' see if it contains any characters </summary>
> '
> ' <param name="strMyString">Incoming string to check for
> ' characters</param>
> ' <return>When True, indicates the incomine string
> ' is empty</return>
> ' <remarks>This is an example of using XML code commenting
> ' to be recognized by the Code Comment Web Reporter
> ' </remarks>
> Public Sub MyFunction(strMyString as String) as Boolean

>      If Len(Trim(strMyString)) = 0 then
>          return True
>      End If

> End Function

> Then I select Tools - Build Comment Web Pages in Visual
> Studio .NET, I want a HTML report generated from the
> comments inserted in my code, in order to generate
> documentation for my function for other programmers to use
> who might maintain or use this function.

> >-----Original Message-----
> >You mean something like this?

> >        'this is entirely new syntax for wmi
> >        'instead of having to dim a locator and services
> object, we call the
> >managementobjectsearcher
> >        'totally cool

> >        Dim mos As
> System.Management.ManagementObjectSearcher
> >        Dim moc As
> System.Management.ManagementObjectCollection
> >        Dim mo As System.Management.ManagementObject
> >        Dim prop As System.Management.PropertyData

> >        Dim FSO As Object
> >        Dim txtstream As Object
> >        Dim MyString As String

> >        mos = New
> System.Management.ManagementObjectSearcher("SELECT * FROM
> >Win32_BIOS")
> >        moc = mos.Get()
> >        For Each mo In moc
> >            FSO = CreateObject
> ("Scripting.filesystemobject")
> >            txtstream = FSO.OpenTextFile
> ("Win32_BIOS.htm", 2, True, -2)
> >            txtstream.writeline("<HTML>")
> >            txtstream.writeline("<HEAD>")
> >            txtstream.writeline
> ("<TITLE>Win32_BIOS</TITLE>")
> >            txtstream.writeline("</HEAD>")
> >            txtstream.writeline("<XML ID=""RS"">")
> >            txtstream.writeline("<?xml version=""1.0""
> >encoding=""iso-8859-1""?>")
> >            txtstream.writeline("<Data>")
> >            txtstream.writeline("<Win32_BIOS>")
> >            For Each prop In mo.Properties
> >                On Error Resume Next
> >                If IsNothing(prop.Value) = True Then
> >                    txtstream.writeline("<" + prop.Name
> + "></" + prop.Name
> >+ ">")
> >                Else
> >                    txtstream.writeline("<" + prop.Name
> + ">" +
> >Trim(prop.Value) + "</" + prop.Name + ">")
> >                    Err.Clear()
> >                End If
> >            Next
> >            txtstream.writeline("</Win32_BIOS>")
> >            txtstream.writeline("</Data>")
> >            txtstream.writeline("</XML>")
> >            txtstream.writeline("<BODY
> BGCOLOR=""Darkblue""
> >Text=""White"">")
> >            txtstream.writeline("<Table Border=""1""
> colspacing=""10"">")
> >            For Each prop In mo.Properties
> >                txtstream.writeline("<TR>")
> >                txtstream.writeline("<TH Align=Center
> Nowrap=True
> >STYLE=""Border:None;Background-color:Silver;Font-
> Family:Tahoma;Font-Size:14;
> >Font-
> Weight:bold;Color:Yellow;filter:ProgID:DXImageTransform.Mic
> rosoft.Gradi
> >ent(gradientType=0, StartColorStr='Silver',
> endColorstr='Black')"">" +
> >prop.Name + "</TH>")
> >                txtstream.writeline("<TD Align=Center
> Nowrap=True
> >STYLE=""Border:none;Color:white;Font-Family:Tahoma;Font-
> Size:12;Font-weight:
> >Bold;width:100%;filter:ProgID:DXImageTransform.Microsoft.G
> radient(gradientTy
> >pe=0, StartColorStr='Red', endColorstr='Black')""><SPAN
> datasrc=#RS
> >datafld=" + Chr(34) + prop.Name + Chr(34)
> + "></SPAN></TD>")
> >                txtstream.write("</TR>")
> >            Next
> >            txtstream.write("</TABLE>")
> >            txtstream.write("</BODY>")
> >            txtstream.write("</HTML>")
> >            txtstream.close()
> >            Exit For
> >        Next
> >        txtstream = Nothing
> >        FSO = Nothing

> >    End Sub


> message

> >> I've been trying to figure out how to comment my VB .NET
> >> in such a way as to allow me to use the VS .NET feture
> >> under the Tools - Build Comment Web Pages.  From all the
> >> MSDN library help I've read, it looks like the only
> >> laguages that support this is C#.  J# looks like it has
> >> its own documentation generator that work with the
> javadoc
> >> stadards of documenting code.  Does VB .NET have this
> >> capablility?  Will it in the future?  We have used a
> tool
> >> called VBDox to generate Web based documentation from
> our
> >> code documentation for VB 6.0 programs.  This is an
> >> important feature that I wish VB .NET had

> >.



Wed, 27 Apr 2005 01:24:43 GMT  
 Can VB.NET Build Comment Web Pages
Dave,
See "XML Documentation" at http://www.gotdotnet.com/team/vb/

Hope this helps
Jay


Quote:
> I've been trying to figure out how to comment my VB .NET
> in such a way as to allow me to use the VS .NET feture
> under the Tools - Build Comment Web Pages.  From all the
> MSDN library help I've read, it looks like the only
> laguages that support this is C#.  J# looks like it has
> its own documentation generator that work with the javadoc
> stadards of documenting code.  Does VB .NET have this
> capablility?  Will it in the future?  We have used a tool
> called VBDox to generate Web based documentation from our
> code documentation for VB 6.0 programs.  This is an
> important feature that I wish VB .NET had



Wed, 27 Apr 2005 13:58:52 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Revisited - VB.NET Build Comment Web Pages

2. Build comment Web Pages ... in VB.NET

3. Build Comment Web Pages Feature under VB.NET

4. create a VB.NET Comment Web Page

5. Build Comment Web Pages

6. Build Web Page in Vb.net Application

7. how i fill the description Field in the Web Comment Page

8. Parsing a web page with VB.net

9. Vb.net web page sql server access question

10. Client Side VB.Net Control for Web Page

11. VB.NET: Steps for Converting a Windows .NET Application to a Web .NET Application

12. VB.DOC 0.25 has been released - XML comments for VB.NET

 

 
Powered by phpBB® Forum Software