Child Form not refreshing when i try to start the app from MDI form?

I have MDI form and child forms in my app. Here my situation...

Main Form : MDI Form Register Form : Child of MDI form Desig form : another form which will open when we will click one button on Register form.

now if i try to refresh the items of combo box of Register form from Desig form, then it is not refreshing. i.e. i can't see my new items in that combo box on Register form.

Now when i try to start my app directly from Register form then the same code works perfectly but same code is not running when i try to start the app from MDI form.

here is my codes. MDI Form :

Dim regform As New Register
StatusLabel.Text = "Opening Workman Registration"
regform.MdiParent = Me
StatusLabel.Text = "Workman Registration"

Register form:

 Public Sub refreshCombo()

    addDesCombo() ' method which will loads all new data from database 

    desigcombo.Text = designame ' the string variable (designame)

End Sub

Desig Form

Register.refreshCombo() ' will run when we will click on one button.

so is their any thing which need to remember when we using MDI form - Child Form?


When you refresh Register from Desig, it works when you start the app from Register because there is only one Register form and VB automatically considers it an instance of the form.

When the register form is a child form, you need to use the instance of the form rather than the class name, something like MainForm.ActiveMdiChild.refreshCombo()

Need Your Help

Why my last named group catches everything else?

c# .net regex

So, I have these data that come from SMSes exported to text that I want to be able to extract and create a better report than plain text, so I have a file full of these lines:

Is there a way to disable default formtastic layout?

ruby-on-rails ruby-on-rails-3 webforms formtastic

For one specific case I would like to render the form as a part of (for in-place editing). Is there a way in formtastic to disable the layout generated by .inputs / .buttons? Instead a

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.