Jump to content

gioma

Members
  • Content Count

    43
  • Joined

  • Last visited

Community Reputation

8 Neutral

About gioma

  • Birthday 08/25/1980

Technical Information

  • Delphi-Version
    Delphi 10.4 Sydney

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. it seems incredible but it seems to work, there is a difference between the various interpolations.
  2. So I could start from the Vcl.Direct2D unit to create a unit that uses DirectD2 1.1..mm.. it could be an indea. For now I have done this and it seems to work, but I don't know if I use Direct2D 1.1 at 100% _scale := width / _HostDesktopWidth; IMGpitch:=_HostDesktopWidth*4; if (DesktopFrame=nil) or ( _DesktopFrameRect.right <> _HostDesktopWidth ) or ( _DesktopFrameRect.bottom <> _HostDesktopHeight ) then begin _DesktopFrameRect.left:=0; _DesktopFrameRect.right:=_HostDesktopWidth; _DesktopFrameRect.top:=0; _DesktopFrameRect.bottom:=_HostDesktopHeight; BitmapProp.DpiX := 0; BitmapProp.DpiY := 0; BitmapProp.pixelFormat.Format := DXGI_FORMAT_B8G8R8A8_UNORM; BitmapProp.pixelFormat.AlphaMode := D2D1_ALPHA_MODE_IGNORE; _FD2DCanvas.RenderTarget.CreateBitmap(D2D1SizeU(_HostDesktopWidth, _HostDesktopHeight), _IMGBuffer, IMGpitch, BitmapProp, DesktopFrame); WriteLog('[Paint] CreateBitmap '+intToStr(_HostDesktopWidth)+'x'+intToStr(_HostDesktopHeight) ); end else begin _DesktopFrameRect.left:=0; _DesktopFrameRect.right:=_HostDesktopWidth; _DesktopFrameRect.top:=0; _DesktopFrameRect.bottom:=_HostDesktopHeight; DesktopFrame.CopyFromMemory(_DesktopFrameRect,_IMGBuffer,IMGpitch); end; if _firstRender then begin _ConnectionStartedAt:=GetTickCount; ComputeTransform; _firstRender:=false; end; _FD2DCanvas.RenderTarget.SetTransform(_FTransform); LRect.left:=0; LRect.right:=_HostDesktopWidth; LRect.top:=0; LRect.bottom:=_HostDesktopHeight; (_FD2DCanvas.RenderTarget as ID2D1DeviceContext ).DrawBitmap(DesktopFrame,LRect,1, _InterpolationMode);
  3. I use Delphi Alexandria and when compiling the example projects there are many errors due to missing {$IFDEF FPC} and if I set FPC between the conditional defines there are commands that don't exist in Delphi. I use Delphi Alexandria and when compiling the example projects there are many errors due to missing {$IFDEF FPC} and if I set FPC between the conditional defines there are commands that don't exist in Delphi.
  4. Thanks but It doesn't work on Delphi , it needs many corrections 😞
  5. I have an application that uses a TDirect2DCanvas to render an image stream. However, I noticed that the iterpolation used is only Linear (Direct2D 1.0), but if I wanted to use those introduced with Direct2D 1.1 (bicubic, etc.) i would have to add unit Winapi.D2DMissing. Now the problem is that the TDirect2DCanvas does not use ID2D1DeviceContext (added in Winapi.D2DMissing) as the rendering target but ID2D1RenderTarget. I can't figure out how to use the new Direct2D 1.1 features. Anyone has any ideas?
  6. You're right! Fixed the error now it works 🤩 : procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); var buf:WideChar; KSta:TKeyboardState; begin //initialize TKeyboardState GetKeyboardState(ksta); //limit to 1 the capture lenght into buffer that is wide char ToUnicodeEx( key, 0, ksta, @buf, 1, 0, 0); log.Lines.Add('KeyUp : '+ inttoStr(key)+'='+buf ); end; Now if I press "è" it wrote into TMemo: KeyUp : 186=è Thank you all!
  7. I almost found a solution: procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); var buf:WideChar; KSta:TKeyboardState; s:string; begin log.Lines.Add('KeyUp : '+ inttoStr(key) ); Winapi.Windows.ToUnicodeEx( key, 0, ksta, @buf,255, 0, 0); s:=WideCharToString(@buf); log.Lines.Add('KeyUp : '+ s); end; Obviously I will not use it like that, but there is a problem, it goes into exception when it writes the result to the log (TMemo). Even if I levo the last line goes into exception, however the variable s is valued.
  8. Because I need to emulate the Keydown and KeyUp events for every single character pressed.
  9. I use VCL and the App isn't made with Delphi. The purpose is to send the KeyUp and KeyDown events with the char from a Delphi-VCL application to a non-delphi application running on Android, iOS and Mac.
  10. Hi everyone, I'm making an application that communicates between different operating systems. In this case I have to send a character when it is pressed from Windows to MAC. In the Form.OnKeyUp function there is the parameter "key: Word" which represents the character code. If it is not a special character (à, è, ì, ò, ù) this co corresponds to the ASCII code. If, on the other hand, I press the "è" key, the code will be 222 which however does not correspond to its ASCII code and therefore I send wrong information to the MAC which is unable to retrieve the corresponding character. How do I get the exact ASCII code of that character? Thank you all.
  11. ok, I understand the situation! Thank you for the valuable insights, now I'll have some fun! : D
  12. There are remote control programs that let you choose which session to open the connection in, how do they do it?
  13. What do you mean? I don't want to bypass the windows login, but I would like to do it through a program controlled by a user who knows their login credentials.
  14. Thanks for the hint, I deepen the subject.👍 Of course it wouldn't be bad if someone had already solved it! After all, the community is also useful for this.. 😋
  15. My application not only has administrator privileges, but runs as a System user.
×