Hi ,I run form by delegate in my module,the call process doesn't go ok and only the 'sub main' procedure runs.
My module is in consoleapp written,and the form in windowsapp.
My code is:
Imports System.Management
Imports System.Windows.Forms
Module module1
Sub main()
'Console.WriteLine("ok")
End Sub
Public Class kh
Public Shared Sub dosomething()
Task.Run(Sub() updateform())
End Sub
Public Delegate Sub formdelegate()
Public Shared Sub updateform()
Application.Run(New Form)
Console.WriteLine("ok")
End Sub
Private Declare Function ch341open Lib "ch341dll.dll" (ByVal iindex As Integer) As Integer
End Class
End Module
Can anybody help me?
Thanks