|
-
November 25th, 2008, 04:51 AM
#1
Problem with TabControl
i create a button in TabControl1 with a name Button1
when i use
Button1.BackColor = System.Drawing.Color.MintCream
it is working fine but when i use (any of the following)
dim i as integer=1
Controls(String.Concat("Button", i)).BackColor = System.Drawing.Color.MintCream
(or)
Controls(String.Concat("Button"& i)).BackColor = System.Drawing.Color.MintCream
it gives "An unhandled exception of type 'System.NullReferenceException' occurred in xxxx.exe" error with Additional information: Object reference not set to an instance of an object
what is the problem i didnt understand :S
(i am using vb 2005)
Last edited by matatu; November 25th, 2008 at 06:00 AM.
Reason: version of my visual basic compiler
Tags for this Thread
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
|