Перейти к содержанию
Fire Monkey от А до Я

Лидеры

Популярный контент

Показан контент с высокой репутацией 15.04.2020 во всех областях

  1. Finally solved. Although it is not perfect, but it can satisfy my use. Share to everyone: (Base on @ Brovin yaroslav and @ cezif 's post, Thanks!) procedure TWindowsMedia.UpdateMediaFromControl; function GetScreenScale: Single; var ScreenService: IFMXScreenService; begin Result := 1; if TPlatformServices.Current.SupportsPlatformService (IFMXScreenService, IInterface(ScreenService)) then Result := ScreenService.GetScreenScale; end; var R: TRect; Bounds: TRectF; Form: TCommonCustomForm; ScaleRatio: Single; begin FVMRWindowlessControl9.SetAspectRatioMode(VMR9ARMode_LetterBox); if FWnd <> 0 then begin if (Control <> nil) and not (csDesigning in Control.ComponentState) and (Control.ParentedVisible) and (Control.Root <> nil) and (Control.Root.GetObject is TCommonCustomForm) then begin Form := TCommonCustomForm(Control.Root.GetObject); ScaleRatio := GetScreenScale; Bounds := TRectF.Create(0, 0, Control.AbsoluteWidth * ScaleRatio, Control.AbsoluteHeight * ScaleRatio); Bounds.Fit(RectF(0, 0, Control.AbsoluteWidth * ScaleRatio, Control.AbsoluteHeight * ScaleRatio)); Bounds.Offset(Control.AbsoluteRect.Left, Control.AbsoluteRect.Top); SetParent(FWnd, WindowHandleToPlatform(Form.Handle).Wnd); SetWindowPos(FWnd, 0, Bounds.Round.Left, Bounds.Round.Top, Bounds.Round.Width, Bounds.Round.Height, 0); R := TRect.Create(0, 0, Bounds.Round.Width, Bounds.Round.Height); if FVMRWindowlessControl9 <> nil then FVMRWindowlessControl9.SetVideoPosition(nil, @R); if FVMRWindowlessControl7 <> nil then FVMRWindowlessControl7.SetVideoPosition(nil, @R); ShowWindow(FWnd, SW_SHOW) end else begin SetParent(FWnd, ApplicationHWND); ShowWindow(FWnd, SW_HIDE) end; end; end;
    1 балл
  2. Ну вот набросал примерчик. Он упрощенный, но смысл такой же примерно (код листвью со скриншота выше выложить не могу просто из-за того, что там идут зависимости от модели данных). Лично я все рисую кодом - так полный контроль того, что выводится на экран. И собственно так можно выводить практически что угодно. И не нужны никакие монструозные ТМС компоненты ListView_Schedule_Sample.zip
    1 балл
Эта таблица лидеров рассчитана в Москва/GMT+03:00
×
×
  • Создать...