title: Calling a function within a dynamically created form - vb.net
body: <p>As part of my project, I'm dynamically creating a form, like so:</p>
  
  <pre><code>        Dim thisticket As New ViewTicket
          thisticket.Text = "Ticket " &amp; ticketnumber
          thisticket.ticketid = ticketnumber
          thisticket.ShowDialog()
  </code></pre>
  
  <p>This form contains a function 'PopulateHistory()', which when called, goes off and grabs all the relevant history for this ticket from the db.</p>
  
  <p>One of the options on that form allows you to update the ticket history by either generating an email, adding a document etc; The ticket update options open in another form with showdialog() and topmost = true. </p>
  
  <p>Once the user has completed whatever update they are doing, the Update form is closed and I want to then call the 'PopulateHistory()' function again, to cause the history datagridview to refresh and show the most recent history. </p>
  
  <p>Before created 'thisticket as New ViewTicket', I could have just said ViewTicket.PopulateHistory() and it would have done it, but not that I have created the form dynamically, I cant call the function in that way.</p>
  
  <p>Is there a way round this?</p>