all groups > dotnet interop > december 2005 >
You're in the

dotnet interop

group:

update form from a callback


update form from a callback bill
12/22/2005 9:17:46 AM
dotnet interop:
All,

I finally figured out how to call a function in my .NET form by using a
callback from the DLL function (which of course executes for several
minutes) that I am calling. All I wanted to do is update a progressbar.
I discovered that while the callback works just fine, the progressbar
is not refreshed. After googling around I am guessing that I need to do
something like create another thread to call the DLL and then figure
out how to pass data periodically back from the long running DLL
function. If I am more or less correct could someone either give me a
clue how to do it, or point to some references? Or, is there another
way?

TIA Bill
Re: update form from a callback Yuri O
12/24/2005 1:45:29 PM
Trivial case. There are many workarounds of course however the simplest is:

Call PostMesage from your dll to .net wnd and intercept it there (WndProc).

Specify with arg your progress bar value :)

- Yuri


"bill" <wgrigg@draper.com> ???????/???????? ? ???????? ?????????:
news:1135271865.930674.74540@g49g2000cwa.googlegroups.com...
[quoted text, click to view]

AddThis Social Bookmark Button