Argh here we go again. For each user control in the form I want to get the data stored in it's textbox and listview.
Here's the code I'm using now:
[PHP] For Each meh In Tabs.Tabs
For Each ctrl In meh.AttachedControl.Controls
Select Case ctrl.GetType.ToString
Case "Instinct.Inner"
Try
MsgBox(ctrl.Controls.ProcessBox.Text)
Dim x As Integer = ctrl.tn + 1
If IO.File.Exists(Application.StartupPath + "\tab" + x.ToString + ".ini") Then
IO.File.Delete(Application.StartupPath + "\tab" + x.ToString + ".ini")
End If
Dim sw As IO.StreamWriter
sw = New IO.StreamWriter(Application.StartupPath + "\tab" + x.ToString + ".ini")
sw.WriteLine(ctrl.ProcessBox.Text)
For Each hack In ctrl.HackList.Items
sw.WriteLine(hack.ToString)
Next
sw.Close()
Catch ex As Exception
Dim x As Integer = ctrl.tn + 1
MsgBox("Error saving data for tab " + x.ToString + " of " + t.ToString + ". Error: " + ex.Message, MsgBoxStyle.Critical, "InjectPlz INSTINCT")
End Try
End Select
Next
Next[/PHP]
Definitions:
Tabs - DotNetBar SuperTabControl
"Instinct.Inner" - The usercontrol I'm trying to access
tn - A number used to find the tab's position
ProcessBox - the textbox I'm trying to get data from
HackList - the listview I'm trying to get data from
Now, I know why this is happening, it's because for some reason you can't access the UserControl's controls. So does anyone know a way you CAN access them so this code will work?
If I have forgotten to mention or explain anything just say, I will tell you.
Yes this is for InjectPlz.
Thanks in advance
