I have a program that I would like to implement using Threading. I wand to load a form that takes a couple of minutes to open using threading.
Here is my code
Imports System.Threading Public Class frmAdjustments Function LaunchForm() As Integer frmNewAdjustment.SetReceive(CurrentUser) frmNewAdjustment.Show() frmNewAdjustment.Hide() LaunchForm = Nothing End Function Private Sub frmAdjustments_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim FirstThread As New Thread(AddressOf LaunchForm) FirstThread.Start() Call PopulateData() End Sub Function PopulateData() 'THIS IS WHERE IS HAVE THE CODE TO POPULATE DATAGRIDS ON MAIN FORM... End Function
I am new to .net programming and could use any suggestions you may have. I'm trying to grasp the concept of multithreading apps and would like to have both my main form (Adjustments) and the (frmNewAdjustment) form to load concurrently.
As you can probably tell, when the main form (Adjustments) loads it also loads the frmNewAdjustment in the background so that when you click the add new button on the main form it just unhides an already loaded form.
Can anyone help with this?
Here is the error I receive with the code above:
Overload resolution failed because no accessible 'New' can be called with these arguments:
Thanks in advance for your help