Jump to content

Martin Wienold

Members
  • Content Count

    28
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Martin Wienold

  1. The difference is allocting memory for a new string. Calling SetLength or Delete will try to reuse the existing memory for the string if it is possible (ie. not shared with another place). I think string.Join or TrimEnd will always create a new string, allocating memory.
  2. I don't have a compiler at hand, I can't check for errors but this should work: var s: string; begin s := 'Hello World'; Writeln(s); Delete(s, Length(s), 1); Writeln(s); Readln; end;
  3. Martin Wienold

    Block windows access

    For what it's worth, limiting Keyboard and Mouse input can be done by using low level keyboard and mouse hooks. Beware that debugging these kind of projects can be quite .. interesting as you have your keyboard and mouse hooked and therefore - depending on your application logic - blocked. Basically you have to have a host application and a library. The host application loads the library which implements the hooks you defined. For more information look here: LowLevelKeyboardProc callback function LowLevelMouseProc callback function ⚠️ CTRL+ALT+DEL can't be hooked/blocked, maybe Kiosk mode is realy what you need.
×