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

Visual Basic

 
QuestionHelp Pin
Evalee23-Oct-06 23:07
Evalee23-Oct-06 23:07 
AnswerRe: Help Pin
Dave Sexton24-Oct-06 2:11
Dave Sexton24-Oct-06 2:11 
GeneralRe: Help Pin
nlarson1124-Oct-06 4:23
nlarson1124-Oct-06 4:23 
GeneralRe: Help Pin
Evalee24-Oct-06 4:58
Evalee24-Oct-06 4:58 
QuestionSubstraction in Date datatype [modified] Pin
Newbie_dydy8523-Oct-06 9:54
Newbie_dydy8523-Oct-06 9:54 
AnswerRe: Substraction in Date datatype Pin
Guffa23-Oct-06 10:08
Guffa23-Oct-06 10:08 
AnswerRe: Substraction in Date datatype Pin
Are Jay23-Oct-06 16:03
Are Jay23-Oct-06 16:03 
Questionusercontrols Pin
jon-8023-Oct-06 8:48
professionaljon-8023-Oct-06 8:48 
I have created a simple user control consisting of a label and a text box (is a similar dialog already available?). I would like to include for example a public property in the 'Appearance' category and a 'Description'.

In order to add this meta data within the cbf, I remember I have to write for example

<Category("Appearance)> _
Public Property BackColor
...
implemenentation
...
End Property

Do I have to import some namespace or add something so that I can view, for example, <Appearance, <Description, etc...?

I hope I was clear.

Code:

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class LabelAndTextBox
Inherits System.Windows.Forms.UserControl


'UserControl overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.labelName = New System.Windows.Forms.Label
Me.Info = New System.Windows.Forms.TextBox
Me.SuspendLayout()
'
'labelName
'
Me.labelName.AutoSize = True
Me.labelName.BackColor = System.Drawing.Color.LightSteelBlue
Me.labelName.Location = New System.Drawing.Point(3, 4)
Me.labelName.Name = "labelName"
Me.labelName.Size = New System.Drawing.Size(0, 13)
Me.labelName.TabIndex = 0
'
'Info
'
Me.Info.BackColor = System.Drawing.Color.LightSteelBlue
Me.Info.Location = New System.Drawing.Point(91, 1)
Me.Info.Name = "Info"
Me.Info.ReadOnly = True
Me.Info.Size = New System.Drawing.Size(111, 20)
Me.Info.TabIndex = 1
'
'LabelAndTextBox
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.LightSteelBlue
Me.Controls.Add(Me.Info)
Me.Controls.Add(Me.labelName)
Me.Name = "LabelAndTextBox"
Me.Size = New System.Drawing.Size(202, 23)
Me.ResumeLayout(False)
Me.PerformLayout()

End Sub
Friend WithEvents labelName As System.Windows.Forms.Label
Friend WithEvents Info As System.Windows.Forms.TextBox

Public Property labelText() As String
Get
Return labelName.Text
End Get
Set(ByVal value As String)
labelName.Text = value
End Set
End Property

Public Property textBoxText() As String
Get
Return Info.Text
End Get
Set(ByVal value As String)
Info.Text = value
End Set
End Property


Public Overrides Property BackColor() As System.Drawing.Color
Get
Return MyBase.BackColor
End Get
Set(ByVal value As System.Drawing.Color)
Info.BackColor = value
labelName.BackColor = value
End Set
End Property

Jon
AnswerRe: usercontrols Pin
atregent23-Oct-06 20:07
atregent23-Oct-06 20:07 
Questiontry history Pin
FlorentBzh23-Oct-06 7:17
FlorentBzh23-Oct-06 7:17 
AnswerRe: try history Pin
Ray Cassick23-Oct-06 7:36
Ray Cassick23-Oct-06 7:36 
QuestionRe: try history [modified] Pin
FlorentBzh23-Oct-06 22:39
FlorentBzh23-Oct-06 22:39 
AnswerRe: try history Pin
Dave Kreskowiak24-Oct-06 4:47
mveDave Kreskowiak24-Oct-06 4:47 
AnswerRe: try history Pin
nlarson1123-Oct-06 8:12
nlarson1123-Oct-06 8:12 
QuestionBase64 class in VB.NET Pin
winmedia23-Oct-06 6:00
winmedia23-Oct-06 6:00 
AnswerRe: Base64 class in VB.NET Pin
Guffa23-Oct-06 8:11
Guffa23-Oct-06 8:11 
GeneralRe: Base64 class in VB.NET Pin
winmedia24-Oct-06 5:07
winmedia24-Oct-06 5:07 
AnswerRe: Base64 class in VB.NET Pin
Guffa24-Oct-06 6:42
Guffa24-Oct-06 6:42 
QuestionProgress Bar Pin
jds120723-Oct-06 5:46
jds120723-Oct-06 5:46 
AnswerRe: Progress Bar Pin
Are Jay23-Oct-06 15:28
Are Jay23-Oct-06 15:28 
AnswerRe: Progress Bar Pin
Dave Kreskowiak24-Oct-06 4:46
mveDave Kreskowiak24-Oct-06 4:46 
QuestionCrystal Reports Field View Pin
Silver-Grey23-Oct-06 5:35
Silver-Grey23-Oct-06 5:35 
QuestionAddin - Disabling CommandBarPopup in Code Window Context Menu [modified] Pin
dlarkin7723-Oct-06 2:19
dlarkin7723-Oct-06 2:19 
Questionvs.net - / vb.net 2005 Pin
Pete Newman22-Oct-06 23:53
Pete Newman22-Oct-06 23:53 
AnswerRe: vs.net - / vb.net 2005 Pin
Dave Sexton23-Oct-06 0:50
Dave Sexton23-Oct-06 0:50 

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.