Welcome, Guest
Username: Password: Remember me
Discussions for CodeTyphon Object Pascal Programming Language
  • Page:
  • 1

TOPIC:

Converting Delphi4 code 1 year 2 months ago #17982

  • W. Peterson
  • W. Peterson 's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
1. Trying to convert an old Delphi4 program.  The compiler doesn't recognize GetWindowDC (GetDesktopWindow);

var R : TRect; DeskTop : TCanvas;
begin

     with DeskTop do
          Handle := GetWindowDC (GetDesktopWindow);


2. Compiler doesn't recognize these marked with -->:

procedure TForm2.Image1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
var
   ProcessID : DWORD;
   ProcessHandle : THandle;
   ThreadHandle : THandle;
begin

//set highest priority
-->   ProcessID := GetCurrentProcessID;
-->   ProcessHandle := OpenProcess(PROCESS_SET_INFORMATION, false, ProcessID);
-->   SetPriorityClass(ProcessHandle, REALTIME_PRIORITY_CLASS);
-->   ThreadHandle := GetCurrentThread;
-->   SetThreadPriority(ThreadHandle, THREAD_PRIORITY_TIME_CRITICAL);


Thanks for any help.

 

Please Log in or Create an account to join the conversation.

Converting Delphi4 code 1 year 2 months ago #17983

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1105
  • Thank you received: 161
Did you add to the Uses section "Windows" unit ?
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

Converting Delphi4 code 1 year 2 months ago #17984

  • W. Peterson
  • W. Peterson 's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
Yes, Windows is in the units section.

Please Log in or Create an account to join the conversation.

Converting Delphi4 code 1 year 2 months ago #17985

  • Matis A.
  • Matis A.'s Avatar
  • Away
  • Moderator
  • Moderator
  • Posts: 1105
  • Thank you received: 161
Please, any sample project for tests ?
PilotLogic Core Programmer

Please Log in or Create an account to join the conversation.

Converting Delphi4 code 1 year 2 months ago #17993

  • W. Peterson
  • W. Peterson 's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 3
  • Thank you received: 0
This thing is huge.  Probably not worth it.  Thanks.  By the way, I travel and can't get back quickly.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1