Click here to Skip to main content
15,920,438 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: .inf file??? Pin
Dave Kreskowiak25-Jan-05 5:03
mveDave Kreskowiak25-Jan-05 5:03 
GeneralReading the form names form the project Pin
Thirumalaraj25-Jan-05 3:00
Thirumalaraj25-Jan-05 3:00 
GeneralRichTextBox Print Pin
Just Greeky Creek25-Jan-05 2:01
Just Greeky Creek25-Jan-05 2:01 
GeneralRe: RichTextBox Print Pin
Dave Kreskowiak25-Jan-05 5:06
mveDave Kreskowiak25-Jan-05 5:06 
Generalemail save help Pin
Mohammad Daba'an25-Jan-05 0:30
Mohammad Daba'an25-Jan-05 0:30 
GeneralControl needed Pin
Member 166542124-Jan-05 21:43
Member 166542124-Jan-05 21:43 
GeneralRe: Control needed Pin
Ritesh123424-Jan-05 22:40
Ritesh123424-Jan-05 22:40 
GeneralRe: Control needed Pin
GuruPandian24-Jan-05 23:46
GuruPandian24-Jan-05 23:46 
Hi,

I have listed a code with a suitable example for 'Panel Control'


Creating Repeated Controls :
----------------------------

1.Place a PANEL Control Class , Two BUTTON and Two LABEL on Form.

2.Set the AUTOSCROLL property of PANNEL is TRUE.

3.Write the following code within a FORM as follows…

'--- BEGINS
Dim txt As TextBox

Private Sub Button2_Click(…) Handles Button2.Click
Dim a, y As Integer
y = 10
Panel1.Controls.Clear()
For a = 1 To CInt(TextBox1.Text)
txt = New TextBox()
Dim Lbl As New Label()
Txt.Location = New Point(20, y)
Lbl.Location = New Point(2, y + 3)
Txt.Width = 75
Lbl.Width = 25
AddHandler txt.Enter, AddressOf CursorGotFocus
Panel1.Controls.Add(Txt)
Panel1.Controls.Add(Lbl)
txt.Tag = a
Lbl.Text = a
y += Txt.Height + 5
Next
End Sub

Private Sub CursorGotFocus(ByVal sender As Object, ByVal e As System.EventArgs)
Dim C As Control = sender
Label2.Text = "Cursor On " & C.Tag & " TextBox....! "
End Sub

Private Sub Button1_Click(…) Handles Button1.Click
Dim T As Control
Dim Result As String
For Each T In Panel1.Controls
If TypeOf T Is TextBox Then
Result &= T.Tag & "." & T.Text & vbCrLf
End If
Next
MsgBox(Result, MsgBoxStyle.Information, "")
End Sub

4.Run the above code and Enter TEXTBOX that How many TEXTBOXES to be Created .

5.Press the Browser BUTTON (…).

6.Enter the Data into Created TextBoxes within the Panel.

7.Press the Button Labeled Show, The Given data are displayed on MessageBox.

8.In Label which was placed under the Button Show, Displays that current cursor location. ('Enter Event raised).

9.In .NET , ENTER Event worked as GOTFOCUS Event on Classic VB.


With Regards,
PANDIAN S
GeneralAutomatic SMS Response System with VB.Net Pin
xponentbd24-Jan-05 20:16
xponentbd24-Jan-05 20:16 
GeneralSystem time Pin
a_david12324-Jan-05 20:06
a_david12324-Jan-05 20:06 
GeneralRe: System time Pin
Dave Kreskowiak25-Jan-05 3:40
mveDave Kreskowiak25-Jan-05 3:40 
GeneralExport Into Multiple File PDF/EXCEL/WORD Pin
bluechip_asia24-Jan-05 17:29
bluechip_asia24-Jan-05 17:29 
QuestionHow To Download then Save As Any Registered File Name Pin
bluechip_asia24-Jan-05 17:05
bluechip_asia24-Jan-05 17:05 
GeneralVB 2 VB.net Pin
cliffton24-Jan-05 15:24
cliffton24-Jan-05 15:24 
GeneralRe: VB 2 VB.net Pin
GuruPandian24-Jan-05 16:15
GuruPandian24-Jan-05 16:15 
QuestionHow to add data to combox box? Pin
viettho24-Jan-05 12:13
viettho24-Jan-05 12:13 
AnswerRe: How to add data to combox box? Pin
Syed Abdul Khader24-Jan-05 13:58
Syed Abdul Khader24-Jan-05 13:58 
GeneralVB.NET Listboxes Pin
Jaydeanster24-Jan-05 10:35
Jaydeanster24-Jan-05 10:35 
GeneralCan't use MessageBox.Show in Visual Studio Project Pin
fdstfgsdrtyreytryre24-Jan-05 10:23
fdstfgsdrtyreytryre24-Jan-05 10:23 
GeneralRe: Can't use MessageBox.Show in Visual Studio Project Pin
Tom John24-Jan-05 22:15
Tom John24-Jan-05 22:15 
GeneralRe: Can't use MessageBox.Show in Visual Studio Project Pin
mtone25-Jan-05 1:52
mtone25-Jan-05 1:52 
GeneralRe: Can't use MessageBox.Show in Visual Studio Project Pin
Anonymous25-Jan-05 2:52
Anonymous25-Jan-05 2:52 
GeneralRe: Can't use MessageBox.Show in Visual Studio Project Pin
mtone25-Jan-05 5:40
mtone25-Jan-05 5:40 
QuestionHow can I modify a cell value on Datagrid ? (VB.NET) Pin
rafavasbr24-Jan-05 8:10
rafavasbr24-Jan-05 8:10 
QuestionHow can I modify a cell value on Datagrid ? Pin
rafavasbr24-Jan-05 8:09
rafavasbr24-Jan-05 8:09 

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.