|
-
Aug 8th, 2008, 12:32 AM
#1
Thread Starter
Lively Member
Textbox
I have a form that has 24 textboxes in it, I am using the code below so that when the program is running, it will not show the border around the texbox.
Is there a easy way to make this code smaler (now 24 lines) .
Code:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' make border none
Me.txtTerminator_R.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.txtBig_Bang_R.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.txtChuck_R.BorderStyle = System.Windows.Forms.BorderStyle.None
......
......
.....
-
Aug 8th, 2008, 12:39 AM
#2
Re: Textbox
Why wouldn't you just set the BorderStyle property in the designer?
-
Aug 8th, 2008, 12:58 AM
#3
Thread Starter
Lively Member
Re: Textbox
I am going to work quit a lot on the designer and I want to see where the texboxes borders are, to work on them, when I run the program, i don't want to see the border of the texboxes
-
Aug 8th, 2008, 01:34 AM
#4
Re: Textbox
Hi,
Then you can do a For each loop to make your code smaler.
Wkr,
sparrow1
-
Aug 8th, 2008, 09:08 AM
#5
Re: Textbox
vb Code:
for each ctrl as control in me.controls
if ctrl.gettype = gettype(textbox) then
ctrl.BorderStyle = System.Windows.Forms.BorderStyle.None
end if
next
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|