필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Using a Callback in MS Visual Basic

조회 수: 1 (최근 30일)
Amanda
Amanda 2013년 1월 28일
마감: MATLAB Answer Bot 2021년 8월 20일
I have been working with the "Using a Callback with a Microsoft Visual Basic Event " from the MATLAB Builder NE User's Guide. This example is on page 13-17. Everything is working fine: calling a COM object, adding events to COM object, but the I'm not able to receive a callback using MS Visual Basic. I think the problem could be from the process.m function. See below for the code example. Any ideas will be appreciated?
Thanks, Amanda
function [x] = iterate(n,inc)
%initialize x
x = 0;
% Run n iterations, callback every inc time
k = 0;
for i=1:n
k = k + 1;
if k == inc
progress(i);
k = 0;
end;
% Do some work on x...
x = x + 1;
% Pause for 1 second to simulate doing
% something
pause(1);
end;
progess.m
function progress(i)
%#event
i

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by