Support Center

fax status doesn't always update

Donald Adams Nov 24, 2012 11:42AM EST

Delphi 7 Enterprise
Windows XP Home Edition, Service Pack 3

The faxstatus event only seems to work occasionally. About 2 times out of 10 and I do not see the pattern.

procedure TMainForm.FaxManFaxStatus(ASender: TObject; var Device,
Status: Smallint);
var faxstatusdescription : string ;
faxdeviceid, faxstatusid : integer ;
begin
// get device & status ids
faxdeviceid := Device ;
faxstatusid := Status ;

// read memo to get description
faxstatusdescription := FaxStatusEventsMemo.Lines[faxstatusid] ;

if faxstatusid = 14 then // sending
faxstatusdescription := faxstatusdescription +
'Completed - ' +
IntToStr(FaxMan.StatusPercentage[faxdeviceid]) + '%';
// add linesto bottom
FaxStatusMemo.Lines.Add('Device = '
+ IntToStr(faxdeviceid)
+ '. Status: ' + faxstatusdescription ) ;

end;

3 Data Techniques Responses and 4 Community Responses

Up 0 Rated Down
DTI Support  Data Techniques Employee Nov 26, 2012 02:54PM EST

Hi,

As long as the control is loaded you should get all the events. If you run our VB 6 sample app do you see it getting events that you arent ?

What events are you getting exactly ?

Thanks,
John
Data Techniques Support

Up 1 Rated Down
Donald Adams  Data Techniques Employee Nov 26, 2012 08:38PM EST

I get all status' when it works. When it does not work I get no status'. The fax is delivered but there is no updating of the memo I have it writing to. When I run the VB6 sample, it shows the status in the edit field.

Weird thing is that it worked at first.

Up 0 Rated Down
Donald Adams  Data Techniques Employee Nov 26, 2012 10:03PM EST

I solved the problem by always doing an AutoDetect and waiting for the OnConfigurationDone event to complete before i do a Sendfax.

I thought we did not have to do AutoDetect each time. I will experiment some more and add more detail if discovered in case other Delphi programmers have similar problems.

Up -2 Rated Down
DTI Support  Data Techniques Employee Nov 27, 2012 10:04AM EST

Hello,

You do not need to do an AutoDetect each time the app starts up, FaxMan remembers the configured modems in its ini file.I'm not sure whats why that is making a difference for you. I'm checking with some other folks around here to see if they have any ideas with Delphi.

Thanks for your interest in our products and please let us know if you have any questions.

Sincerely,
Sean
Data Techniques Support

Up -1 Rated Down
Donald Adams  Data Techniques Employee Nov 27, 2012 10:28AM EST

I will do further testing today and see if I can figure out what is going on. The weird thing is it always completed the faxing task even though I was not getting the status event to fire. I even put a bookmark on the status event procedure so it would go into a debug mode. It was not firing. I wonder if the AutoDetect was solving a problem that wasn't directly related to the modem itself. Almost like it is forcing FaxMan component to "reset".

I am using the LSI USB 2.0 Soft Modem by Diamond.

Up 0 Rated Down
Donald Adams  Data Techniques Employee Dec 01, 2012 11:58AM EST

I believe I have figured out this problem. Even though I have marked the FaxMan grid as visible, I have the FaxMan grid on a tabbed page that is not being displayed. It appears the FaxMan grid must not only be visible, it must be on the tabbed page that is active. Once I do this it all seems to work. I have a custom grid to display the status so I did not want to display the FaxMan grid on the active tabbed page.

Up 0 Rated Down
DTI Support  Data Techniques Employee Dec 03, 2012 09:25AM EST

Hi Donald,

That's odd, it sounds like Delphi must do something with the events when the control is in a non displayed tab. We'll add that to our kbase to help out other folks.

Thanks for your help in tracking this down.

Sincerely,
Sean
Data Techniques Support

This question is closed to new answers.

Contact Us