How to Call it from a UserControl ??

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
2 posts Page 1 of 1
Contributors
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Hello ,

Can someone helpme please
i like to know how i can get this CreatePlanner
from a usercontrol into my form1 panel?

this is the code in the usercontrol i want to call:
Code: Select all
Public Sub CreatePlanner(ByVal da As String, ByVal Tx As String, ByVal tm As String)
        Dim pl As New MetroPlanner
        pl.RefMemo = Tx
        pl.BackColor = Color.Yellow
    End Sub
This is in my Form1 Load Sub
Code: Select all
For i = 1 To 2 Step 1
             .CreatePlanner("", "Test " + i, "")
            Panel1.Controls.Add(...)
        Next
i want to add only the CreatePlanner into the Panel
but i don't have a clue how..

Thanks

Dummy1912
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Hello Again,

I have tried something to show you to understand it a little better i hope

in form 1
i added
Code: Select all
Imports EPlanner.UserControl2
this in the form1 load section
Code: Select all
UserControl21.CreatePlanner("", "Test", "")
but still no idea how to added into my Panel ??

Thanks
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
2 posts Page 1 of 1
Return to “Coding Help & Support”