| | |
Usercontrol please help!!!!!!!!!!!!!!!
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2007
Posts: 1
Reputation:
Solved Threads: 0
I have made a usercontrol and in it I have define a sub add() this subroutine is dynamically creating a maskedtextbox
in windows form i have used this usercontrol and add a button to the usercontrol in the windows form
what i want is when i double click the button it should create a maskedtextbox
so far the coding I did is
in the usercontrol
Public Class TeleUserControl
Private Sub TeleUserControl_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Public Sub add()
Dim txtDataShow As New MaskedTextBox
txtDataShow.Height = 19
txtDataShow.Width = 50
txtDataShow.TextAlign = _
HorizontalAlignment.Center
txtDataShow.BorderStyle = _
BorderStyle.FixedSingle
txtDataShow.Location = New Point(50, 50)
Me.Controls.Add(txtDataShow)
End Sub
End Class
and in the windows form
Public Class maskForm
Dim Tp As New MaskUserControl.TeleUserControl (maskusercontrol :- windows control library)
Private Sub TeleUserControl1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TeleUserControl1.Load
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Tp.add()
End Sub
End Class
my problem is that I am not able to see the text box when i am clicking on the button
can anyboby help me on this please
in windows form i have used this usercontrol and add a button to the usercontrol in the windows form
what i want is when i double click the button it should create a maskedtextbox
so far the coding I did is
in the usercontrol
Public Class TeleUserControl
Private Sub TeleUserControl_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Public Sub add()
Dim txtDataShow As New MaskedTextBox
txtDataShow.Height = 19
txtDataShow.Width = 50
txtDataShow.TextAlign = _
HorizontalAlignment.Center
txtDataShow.BorderStyle = _
BorderStyle.FixedSingle
txtDataShow.Location = New Point(50, 50)
Me.Controls.Add(txtDataShow)
End Sub
End Class
and in the windows form
Public Class maskForm
Dim Tp As New MaskUserControl.TeleUserControl (maskusercontrol :- windows control library)
Private Sub TeleUserControl1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TeleUserControl1.Load
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Tp.add()
End Sub
End Class
my problem is that I am not able to see the text box when i am clicking on the button
can anyboby help me on this please
![]() |
Similar Threads
- need help making scrollbar (HTML and CSS)
- MySQL LIKE statement (MySQL)
- Caching a UserControl (ASP.NET)
- Binding from usercontrol (ASP.NET)
- Compiling Usercontrol crashs VB6 (Visual Basic 4 / 5 / 6)
- Forms authorization, only want a few links (ASP.NET)
- disable dropdownlist with javascript (JavaScript / DHTML / AJAX)
- Inharits userControl (C#)
Other Threads in the VB.NET Forum
- Previous Thread: Creating a windows installer
- Next Thread: Passing a controls name
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2008 access add arithmetic array assignment basic binary bing box button buttons c# center code combobox component connectionstring convert cpu data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net editvb.net excel file-dialog firewall folder google hardcopy image images isnumericfuntioncall listview login math memory mobile ms mssqlbackend mysql navigate net networking opacity output pan peertopeervideostreaming picturebox picturebox1 plugin port print printpreview problemwithinstallation project record reports" reuse save savedialog serial server sorting sql storedprocedure string temp text textbox timer toolbox updown upload useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vbnet view vista visual visualbasic visualbasic.net visualstudio web wpf





