473,835 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating a Label in Code [VB.NET VS 2005]

I have a Windows Form and I would like to place a code generated label on
the form, but would like it in my TabControl. I don't know how to do that.

I have a tab control called TabControl1. It has 2 Tabs, Tab1 and Tab2.

How can I place the label on Tab1
Dim lbltest As New System.Windows. Forms.Label

With lbltest
.AutoSize = True
.Top = 122
.Left = 122
.Text = "Text Goes Here"
.Visible = True
.Font = New System.Drawing. Font("Arial", 10,
FontStyle.Bold)
.BackColor = Color.Transpare nt
End With
Me.Controls.Add (lbltest)
Thanks alot.

Mar 5 '07 #1
1 1205
Just figured it out.

Tab1.Controls.A dd(lbltest)


"Zim Babwe"
<zi******@ifyou thinkiamgoingto putmyrealemaila ddresshereyouar ecrazy.com>
wrote in message news:Oz******** ******@TK2MSFTN GP02.phx.gbl...
>I have a Windows Form and I would like to place a code generated label on
the form, but would like it in my TabControl. I don't know how to do that.

I have a tab control called TabControl1. It has 2 Tabs, Tab1 and Tab2.

How can I place the label on Tab1
Dim lbltest As New System.Windows. Forms.Label

With lbltest
.AutoSize = True
.Top = 122
.Left = 122
.Text = "Text Goes Here"
.Visible = True
.Font = New System.Drawing. Font("Arial", 10,
FontStyle.Bold)
.BackColor = Color.Transpare nt
End With
Me.Controls.Add (lbltest)
Thanks alot.

Mar 5 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3881
by: Luurs | last post by:
Hi All, I've been using a asp-label in the HTML <headsection for quite some time in order to dynamically generate meta-keywords,-description, css and js references. Though the actual HTML-output isn't that pretty (<span>'s in the head-section...) it works fine with browsers, crawlers. It never REALLY was an issue...
0
1473
by: jeroen.luursema | last post by:
Hi All, I've been using a asp-label in the HTML <headsection for quite some time in order to dynamically generate meta-keywords,-description, css and js references. Though the actual HTML-output isn't that pretty (<span>'s in the head-section...) it works fine with browsers, crawlers. It never REALLY was an issue...
0
370
by: Luurs | last post by:
Hi All, I've been using a asp-label in the HTML <headsection for quite some time in order to dynamically generate meta-keywords,-description, css and js references. Though the actual HTML-output isn't that pretty (<span>'s in the head-section...) it works fine with browsers, crawlers. It never REALLY was an issue...
0
1193
by: imranabdulaziz | last post by:
Hi all, I am using asp.net and C# Visual studio 2005. Let me explain the scenario. I have stored procedure which return very no of column based on condition. Becoz I have to show columnwise record I used datalist. And becoz of query return different no of column based on condtion I created template class for design and itembinding at run time . I manage to create template column() but confuse over how to bind data. As no of column...
1
2900
by: cnixuser | last post by:
Hello, I am having a problem that I believe is related to the way a stream reader object looks for a text file by default. What I am doing is using a StreamReader object to read the text of a text file which includes some html code to populate html formatted content as the text of an asp:label (<asp:label>). The reading of the text file itself goes just fine ;however, this only occurs when I use an absolute file path which will not work of...
0
9653
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10526
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10237
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9348
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7770
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5640
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5808
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3999
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3094
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.