Click here to Skip to main content
15,912,756 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralPassing 1-d String Array to 3-d String Array Pin
Mtognetti30-Apr-05 8:20
Mtognetti30-Apr-05 8:20 
GeneralRe: Passing 1-d String Array to 3-d String Array Pin
Fernando Soto30-Apr-05 14:51
Fernando Soto30-Apr-05 14:51 
GeneralRe: Passing 1-d String Array to 3-d String Array Pin
Mtognetti2-May-05 3:13
Mtognetti2-May-05 3:13 
GeneralVB.Net - Menu process Pin
directred30-Apr-05 7:42
directred30-Apr-05 7:42 
GeneralRe: VB.Net - Menu process Pin
Dave Kreskowiak1-May-05 3:47
mveDave Kreskowiak1-May-05 3:47 
Generalcontrol Dev Pin
DanChin30-Apr-05 4:16
DanChin30-Apr-05 4:16 
GeneralRe: control Dev Pin
Mekong River30-Apr-05 6:33
Mekong River30-Apr-05 6:33 
GeneralVB.NET Solution Statistics - Tips Pin
GuruPandian30-Apr-05 2:59
GuruPandian30-Apr-05 2:59 
Hi all,

The follwoing code is used to display the statistics of the given '.NET Solution' File.

1. Form Name

2. Controls from Each Form, Etc.,

Design
------
1. Add RichTextBox , 2 Labels, Button, OpenFile, DataGrid class on Form.


Code
----
Imports System.Data.SqlClient

Private Dset As DataSet
Dim _Starts As Integer, _Path As String

Private Sub Button1_Click(...) Handles Button1.Click
Dset = New DataSet()
With OpenFile1
.InitialDirectory = "C:\"
.Filter = ".NET Solution(*.vbproj)|*.vbproj"

If .ShowDialog = DialogResult.OK Then
If Not .FileName.Length > 0 Then
MsgBox("Please Select File Name...!", MsgBoxStyle.Critical, "Warning")
Application.ExitThread()
Else
Label1.Text = .FileName
_Starts = Label1.Text.LastIndexOf("\")
_Path = Label1.Text.Substring(0, _Starts) & "\"
FileCopy(Label1.Text, Label1.Text & ".xml")
RichTextBox1.Clear()
Dset.ReadXml(Label1.Text & ".xml", XmlReadMode.Auto)
Dim i As Integer, strForms As String
For i = 0 To Dset.Tables("File").Rows.Count - 1
If Dset.Tables("File").Rows(i)(1).ToString().ToUpper = "FORM" Then
strForms = Dset.Tables("File").Rows(i)(0)
GetControls(strForms)
End If
Next
Dset.Dispose()
End If
End If
End With
End Sub

Private Function GetControls(ByVal strFormName As String) As String
Dim _FormName As String = strFormName.Substring(0, strFormName.Length - 3) & ".resx"
Dim R As Integer, strControls As String, intDot As Integer, strCtrlName As String
FileCopy(_Path & _FormName, _Path & _FormName & ".xml")
Dim Dset1 As New DataSet()
Dset1.ReadXml(_Path & _FormName & ".xml", XmlReadMode.Auto)
For R = 0 To Dset1.Tables("Data").Rows.Count - 1
intDot = Dset1.Tables("Data").Rows(R)(0).ToString().ToUpper.IndexOf(".")
strCtrlName = Dset1.Tables("Data").Rows(R)(0).ToString().ToUpper.Substring(intDot + 1)
If strCtrlName = "MODIFIERS" Then
strControls &= Dset1.Tables("Data").Rows(R)(0).ToString().Substring(0, intDot) & Chr(13)
End If
Next
Dim strFinal As String
strFinal = strFormName & Chr(13)
strFinal &= "---------------" & Chr(13)
strFinal &= strControls & Chr(13)
RichTextBox1.Text += strFinal
End Function

Notes:
------
- Run the code and select the Button.
- Open file dialog display.
- Select the .NET Solution file name.


I hope the code will help to make documentation of .NET Solutions.

With Regards,
PANDIAN S
pandians@ho.netaccess-india.com
Smile | :)

GeneralRe: VB.NET Solution Statistics - Tips Pin
Dave Kreskowiak30-Apr-05 3:31
mveDave Kreskowiak30-Apr-05 3:31 
QuestionHow to clear picturebox in vb.net Pin
meghadwivedi30-Apr-05 0:32
meghadwivedi30-Apr-05 0:32 
AnswerRe: How to clear picturebox in vb.net Pin
GuruPandian30-Apr-05 3:18
GuruPandian30-Apr-05 3:18 
AnswerRe: How to clear picturebox in vb.net Pin
Dave Kreskowiak30-Apr-05 3:26
mveDave Kreskowiak30-Apr-05 3:26 
GeneralRe: How to clear picturebox in vb.net Pin
GuruPandian30-Apr-05 3:31
GuruPandian30-Apr-05 3:31 
GeneralRe: How to clear picturebox in vb.net Pin
Dave Kreskowiak30-Apr-05 4:14
mveDave Kreskowiak30-Apr-05 4:14 
QuestionHow can we customize the crystal report design at run time? Pin
Madni Abbasi29-Apr-05 23:35
Madni Abbasi29-Apr-05 23:35 
Generalif Pin
Yulianto.29-Apr-05 17:46
Yulianto.29-Apr-05 17:46 
GeneralRe: if Pin
Fernando Soto29-Apr-05 19:06
Fernando Soto29-Apr-05 19:06 
GeneralGetSchemeTable problem - IsKeyColumn Pin
Len Miller29-Apr-05 16:06
Len Miller29-Apr-05 16:06 
GeneralRe: GetSchemeTable problem - IsKeyColumn Pin
Len Miller29-Apr-05 16:36
Len Miller29-Apr-05 16:36 
General0xFFFFB0FF Pin
John Shaw29-Apr-05 11:03
John Shaw29-Apr-05 11:03 
GeneralRe: 0xFFFFB0FF Pin
Scott Page24-May-05 4:07
professionalScott Page24-May-05 4:07 
GeneralShutdown in VB.NET Pin
Snaker29-Apr-05 10:34
Snaker29-Apr-05 10:34 
GeneralRe: Shutdown in VB.NET Pin
Fernando Soto29-Apr-05 12:43
Fernando Soto29-Apr-05 12:43 
GeneralRe: Shutdown in VB.NET Pin
vertig073029-Apr-05 16:11
vertig073029-Apr-05 16:11 
Generalparsing a multi-line text box Pin
zasskarMtnBiker29-Apr-05 8:49
zasskarMtnBiker29-Apr-05 8:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.