Link to home
Start Free TrialLog in
Avatar of tmwtp
tmwtp

asked on

I need a bug fixed and a minor change the code

Hello,
I need some help with the code from this link (the code from the accepted solution, of TheRealLoki):
https://www.experts-exchange.com/questions/23399636/I-need-some-modifications-done-to-this-code.html
1. When I try to request another screenshot before the previous one was received (this is a problem for the same client, not the second) the server will freeze and I will have to restart it manually. Could anybody figure out how to fix this? Maybe checking the clientstage?
2. When I get the files (records) command SENDFILES C:\records\??.??.????.rec would it be possible for the server to send a list of local drives to the client on connect? So the form will look something like this for example:

[ D:\    v] [records\??.??.????.rec]
    |                |
    |             Edit just like the one from before...
Combobox with a list of local drives from the server

Thanks.
Avatar of TheRealLoki
TheRealLoki
Flag of New Zealand image

hmm, I'm not getting any problems when I run it here
can you make sure you have this bit of code, as this is what ensures no commands can be sent whie a screenshot is being received

procedure TfClientMain.bRequestScreenshotClick(Sender: TObject);
begin
  if WSocket1.State <> wsConnected then
    MemoClient.lines.add('not connected, cannot login')
  else if ClientStage <> csCommand then
    MemoClient.lines.add('not ready to send commands')
  else
  begin
    ClientStage := csReceiveScreenshot_Start;
    WSocket1.SendLine('SCREENSHOT');
  end;
end;
Avatar of tmwtp
tmwtp

ASKER

Yeah, I think that must be the problem... when I made my client I only added this code: "WSocket1.SendLine('SCREENSHOT');" for the get screenshot button... I have to be more carefull in the future, i have too many things on my mind... :P Will test now, but i guess it will work if it works on your pc... Can you please help me with the other point of my question? And also, take a look at this queston, and tell me if you have any solution for it: https://www.experts-exchange.com/questions/23484795/How-to-make-a-PNG-image-as-form-background.html
ASKER CERTIFIED SOLUTION
Avatar of TheRealLoki
TheRealLoki
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tmwtp

ASKER

Sorry I didn't have time to check the website sooner. I will test the demo now and then accept your solution.