I design my own lable and save as usercontrol , In my form (another project
myProject), i will use this usercontrol , however, it somestiems work fine
but somestimes fail.
now , I got a serious error (as i want to open myform) -[Could not find ny
resource appropriate for the specified culture (or the neutral culture) in
the give assembltyl Make sure the 'dtsclass.lable.resource' was corrected
assembly "myProject".......... Please help [i had remove, delete, rebuild
the usercontrol serveral times, but uselsess]
The following codes is my usercontrol 's code,
Imports System.Globalization
Imports System.Resources
Imports System.Threading
Imports System.Windows.Forms
Public Class stdlabel
Inherits System.Windows.Forms.Label
Public rmLabel As ResourceManager
Dim strFontName As New Drawing.Font("Courier New", 9)
Protected Overrides Sub InitLayout()
Me.AutoSize = True
Me.Font = New System.Drawing.Font("Courier New", 9)
End Sub
Public Overridable Function UISetting_label()
rmLabel = New ResourceManager("dtsclass.label",
System.Reflection.Assembly.GetExecutingAssembly())
Try
Me.Text = rmLabel.GetString(Me.Name)
Catch err As Exception
' MessageBox.Show(Me.Name)
End Try
End Function
End Class