Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 05/18/23 in all areas

  1. programmerdelphi2k

    TZipFile.ExtractZipFile overwrite files?

    @bnobre YES, it will be replaced! But you can choice "what" file need extract be do it, then, you can put in another folder, for example!
  2. Zoran Bonuš

    Delphi Professional Database Connectivity

    Or you can use other 3rd party db components (commercial like unidac) with Delphi Pro.
  3. Clément

    Delphi Professional Database Connectivity

    FireDac has restrictions in Professional and Community edition. Check this: https://www.embarcadero.com/docs/rad-studio-feature-matrix.pdf
  4. iqrf

    Get the propt value of input()

    I will answer myself, this is functional import builtins def myinput(prompt): builtins._input_prompt = prompt return builtins._input(prompt) builtins._input = builtins.input builtins.input = myinput Thanks again, I'm learning Python and I'm still amazed at what it can do.
  5. Brandon Staggs

    Hiring process...

    That's the basic function of bureaucracy, to waste everyone's time and money so the people in the bureaucracy can justify their paychecks.
  6. Remy Lebeau

    Intercept "WM_COPY" on Windows

    COleDataSource is just a Microsoft C++ helper class that implements the IDataObject interface, which can be put on the clipboard using the OleSetClipboard() function. In Delphi, you would have to implement the IDataObject interface manually (it is declared in the Winapi.Ole2 unit), or use a 3rd party implementation, such as from Melanders' Drag&Drop suite (probably via TDropEmptySource+TDataFormatAdapter).
  7. programmerdelphi2k

    Intercept "WM_COPY" on Windows

    @gioma you could just check the data that "HDROP(LGlobalLock)" is pointed to, to get the objects this way ---> in message WM_CLIPBOARDUPDATE procedure LGLobalLock := GlobalLock(LClipboardData); try if (LGLobalLock <> nil) then begin LDQFindexFile := 0; // $FFFFFFFF = all; LDQFbufferSizeInChars := MAX_PATH; // LDQFresult := DragQueryFile(HDROP(LGLobalLock), LDQFindexFile, LFilenameBuffer, LDQFbufferSizeInChars); // if LDQFresult > 0 then begin // if is Directory, then use a "FOR" to process each object LItemIndex :=0; // "i" in "FOR" looping LDQFresultProcessEachItem := DragQueryFile(HDROP(LGLobalLock), LItemIndex, LFilenameBuffer, 255); // reviewing objets... // {$WARN SYMBOL_PLATFORM OFF} // remove this warning about platform specific! LIsDirectory := ((FileGetAttr(LFilenameBuffer) and faDirectory) = faDirectory); {$WARN SYMBOL_PLATFORM ON} // if LIsDirectory then Memo1.Lines.Add(string(LFilenameBuffer) + ' is a directory') else Memo1.Lines.Add(string(LFilenameBuffer) + ' is a file'); end else Memo1.Lines.Add('DragQueryFile = 0 = failed!'); end else Memo1.Lines.Add('LGLobalLock = nil'); finally GlobalUnlock(LClipboardData); end;
  8. programmerdelphi2k

    Intercept "WM_COPY" on Windows

    @gioma As I said just above, I would rule out using the Clipboard, and instead adopt a safer route like: PC1_aplicativoA sends the files to PC2 in a specific folder to receive the files (PC2_folderDownloadedFromPC1); PC2_aplicativoB monitors this folder from time to time, to check if a new file has been posted there (you could use a list to control the files already worked on, or even the date/time of the last jobs done, that is, if there are a new file, its creation date and time will be the latest in the folder); if there are new files in the folder (PC2_folderDownloadedFromPC1), then PC2_aplicativoB will be able to carry out the desired actions, and, clean the list or control date/time; as already mentioned, you can test whether the file has already completed its transfer from A to B, just by trying to open the file exclusively. This way, you will always have greater control over what has been processed or not, and you will no longer depend on the data in the Clipboard's memory (which can be easily changed by other applications on the PC2);
×