borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Printing to different trays)Next Topic (Printing from MySQL) New Topic New Poll Post Reply
AndreaVB Forum : Printing : vb printing of code
Poster Message
richcg
Level: Guest


icon vb printing of code

Does anyone know of a way to print out the control names when your programming? VB lets you printout code and pictures of the forms or text of the forms, but I would like to print out the control names from each form, with or without properties.

Thanks in advance,

richcg

06-11-2002 at 06:26 PM
| Quote Reply
Harrism
Level: Guest

icon Re: vb printing of code


Dim Frm as Form

Dim Crt as Control

For each Frm in Froms

    For each Crt in Frm.Controls

        Debug.Print Frm.Name & " " & Crt.Name

    Next Crt

next Frm

This is only avalible at runtime but if you put this code in a Procedure and allow it to run at runtime then as you can see it will find each form in the forms collection then each control in that form and print out to the immediate window the form name followed by each individual control name.

You could output to a file rather than the immediate window if you want that code just ask.

If you just want the controls for the current form you are in the

Dim Crt as Control

For each Crt in Me.Controls

    Debug.Print Crt.Name

Next Crt



07-11-2002 at 10:54 AM
| Quote Reply
richcg
Level: Guest

icon Re: vb printing of code

Harrism

Thanks
I will try this.


richcg

07-11-2002 at 12:50 PM
| Quote Reply
AndreaVB Forum : Printing : vb printing of code
Previous Topic (Printing to different trays)Next Topic (Printing from MySQL) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder