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

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2007
Posts: 1
Reputation: naina.m is an unknown quantity at this point 
Solved Threads: 0
naina.m naina.m is offline Offline
Newbie Poster

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

 
0
  #1
Oct 2nd, 2007
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the VB.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC