944,052 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 1152
  • VB.NET RSS
Oct 2nd, 2007
0

Usercontrol please help!!!!!!!!!!!!!!!

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
naina.m is offline Offline
1 posts
since Oct 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: Creating a windows installer
Next Thread in VB.NET Forum Timeline: Passing a controls name





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC