|
I keep getting errors with the SafeInvoke function provided by Rebex - "Invoke or BeginInvoke cannot be called on a control until the window handle has been created." |
|
SafeInvoke method is a simple wrapper around Control.Invoke and just like this .NET method, it requires the Control to actually be fully initialized before it can be used (because it actually uses the Control's message queue to invoke the delegate). An enhanced version of SafeInvoke should solve this problem: C#:
VB.NET:
The same problem with Control.Invoke method was discussed in microsoft.public.dotnet.framework.windowsforms newsgroup, check it out if you are interested in more information. |
The SafeInvoke method is a part of several Rebex samples like WinFormClient, WinFormGet, ResumableTransfer (FTP/SFTP), ImapBrowser, Pop3Browser (Mail). Do any of these samples throw the exception you describe or are you using the SafeInvoke method in your application?