#841
|
|||
|
|||
I have a CustomForm: FCustomFluentWindow on which I have a 'browse' button for Directory change. When I click on it, I have DirBrowseDlg: FFLuentDirBrowse, which keeps flickering. The reason it is flickering is because the CustomForm is still open. If I close that CustomForm, the flickering stop.
@Blackfire, please acknowledge this issue to either fix it, or as a workaround I'm closing the CustomForm when 'Browse' button is clicked, but want Custom.Show after the user clicks on 'Ok'/'Cancel' on DirBrowseDlg. Can anybody help me with code snippet? I might need procedure ButtonOnMouseClick(ButtonIndex: Integer; Event: TNotifyEvent); |
Sponsored Links |
#842
|
||||
|
||||
Quote:
Code:
function GetNewFolderBtnClickEvent: LongInt; function GetOkBtnClickEvent: LongInt; function GetCancelBtnClickEvent: LongInt; Code:
TObject(BrowseNewFolderButton.GetObject): CallNotifyEvents(DirBrowseForm.GetNewFolderBtnClickEvent, Longint(Sender)); TObject(BrowseOkButton.GetObject): CallNotifyEvents(DirBrowseForm.GetOkBtnClickEvent, Longint(Sender)); TObject(BrowseCancelButton.GetObject): CallNotifyEvents(DirBrowseForm.GetCancelBtnClickEvent, Longint(Sender)); Last edited by audiofeel; 16-07-2024 at 13:23. |
#843
|
|||
|
|||
Even with this solution, we would still require an event listener like:
procedure ButtonOnMouseClick(ButtonIndex: Integer; Event: TNotifyEvent); or else how will it enter @CommonOnClick code block, without creating custom buttons for ok and cancel. |
#844
|
||||
|
||||
![]()
FMXInno Custom Shapes:
Quote:
. |
The Following 3 Users Say Thank You to BLACKFIRE69 For This Useful Post: | ||
#845
|
||||
|
||||
![]()
hmm...
cool ![]() . |
The Following 4 Users Say Thank You to BLACKFIRE69 For This Useful Post: | ||
#846
|
||||
|
||||
![]()
-- Frequent Requests from the FMXInno Community --
Quote:
Quote:
. |
#847
|
|||
|
|||
What are the chances that Epic Games updated their UI few days after I created an installer that looks like it. Draining all my efforts
![]() |
#848
|
|||
|
|||
They specifically looked at your installer to change the design. Gabe told me himself.
|
#849
|
|||
|
|||
Help with WebView
Any idea how can I bring this section to the front in case of using WebView? When using FImage, on the click of Downloads button I'm doing DownloadInfo.BringToFront; which doesn't seem to be working in case of FWebView.
As an alternate, I'm hiding the FWebView when the Download Info section is opened, but it looks clumsy and not good. If we can display this over it, would be really good. |
#850
|
|||
|
|||
Add parameters to WebView
Hi @Blackfire,
I personally believe that WebView has too much of unexplored potential just like FNewINI and there are numerous amount of possibility with it. - Can we have SetBounds and IsVisible parameters on FWebView2Obj? - Can we make it dependent on FRectangle handles completely instead of FMXForm.Handle? I might be asking for more features on it. Including these parameters will help me to add WebView in my Steam Limitless installer. Last edited by Fak Eid; 05-08-2024 at 02:45. |
#851
|
|||
|
|||
Custom Slideshow and Generic WebView Example
Real life examples are in Epic Games Installer
Generic WebView Example You can reuse the attached WebView.html like this: Code:
[Files] Source: "Files\Web\WebView.html"; DestDir: "{tmp}"; Flags: dontcopy; Code:
procedure LoadHtmlContent(Width, Height: Integer; SrcURL: WideString); var sHtml, VideoId: Widestring; sTemplate: AnsiString; Sl: TStringList; begin VideoId := Copy(SrcURL, Pos('v=', SrcURL) + 2, 11); LoadStringFromFile(ExtractAndLoad('WebView.html'), sTemplate); sHtml := Format(sTemplate, [Width, Height, VideoId]); Sl := TStringList.Create; try Sl.Text := sHtml; Sl.SaveToFile(ExpandConstant('{tmp}\WebView.html')); finally Sl.Free; end; end; Code:
LoadHtmlContent(680, 384, 'https://www.youtube.com/ watch?v=hS7ZY7oLCS4&ab_channel=RANDOMGAMERTAGS'); TrailerRect.FCreate(FMXForm.Handle); TrailerRect.SetBounds(250, 145, 680, 383); TrailerRect.Opacity(0); TrailerRect.HitTest(False); TrailerWebView.FCreate(FMXForm.Handle, TrailerRect.Handle, ExpandConstant('{tmp}\WebView.html')); TrailerWebView.Start; The need for this was because both type of Image Slideshow were dependent on FMXForm and couldn't be overlayed with a different component. Hence, I had to go with creating my own. Code:
j: Integer; GameImage: FImage; SlideShowTimer: FTimer; Code:
GameImage.FCreate(FMXForm.Handle); GameImage.SetBounds(250, 145, 680, 383); GameImage.LoadPicture(ExtractAndLoad('Image0.jpg'), iwStretch); GameImage.Opacity(1); SlideShowTimer.FCreate(GameImage.Handle, True); SlideShowTimer.Interval(100); SlideShowTimer.OnTimer(@ChangeSlide); Code:
procedure ChangeSlide(Sender: TObject); var Time: Cardinal; SlideOpacity: Single; begin if GameImage.GetOpacity = 1 then Slider := False else if GameImage.GetOpacity = 0 then begin GameImage.LoadPicture(ExtractAndLoad('Image' + IntToStr(j) +'.jpg'), iwStretch); j := j+1; Slider := True; end; if (Slider = False) and not (GameImage.GetOpacity = 0) then SlideOpacity := GameImage.GetOpacity - 0.05 else if (Slider = True) and not(GameImage.GetOpacity = 1) then SlideOpacity := GameImage.GetOpacity + 0.05; GameImage.Opacity(SlideOpacity); #ifdef NumberOfSlides if j = {#NumberOfSlides} then j := 0; #endif end; Settings.ini has a parameter as Number of Slides where you need to define the number of Image Files from the folder, to be included in the slideshow. Last edited by Fak Eid; 05-08-2024 at 07:59. |
#852
|
||||
|
||||
Quote:
![]() ![]() |
The Following User Says Thank You to audiofeel For This Useful Post: | ||
Behnam2018 (11-08-2024) |
#853
|
||||
|
||||
![]()
FMXInno - Updates
* Let me know if you would like to have the FCustomMemo in future updates. it's an advanced Memo component i used previously in the Avalon Installer, and it originally comes with FMXInno v1.0.0.3. Features: Quote:
. |
The Following 4 Users Say Thank You to BLACKFIRE69 For This Useful Post: | ||
#855
|
||||
|
||||
Quote:
FireMonkey is a different story. while working with FireMonkey (FMX), especially when integrating with native components like WebView2, there're certain limitations due to how FMX and the underlying platform handle windows and rendering. FMX is designed to be cross-platform, with a focus on vector-based, hardware-accelerated graphics, while traditional controls like WebView2 rely on native Windows-specific window handles (HWND) to be embedded. to embed WebView2 within a FireMonkey form, we use 'FMXForm.Handle', which provides the necessary window handle (HWND) for WebView2 to render its content. this works because a form in FMX has an associated native window, and we can retrieve its handle. however, FMX objects like 'TRectangle', 'TPanel', and other 'TFMXObject' descendants don't have an underlying native window (HWND). they're drawn directly onto the GPU and managed by the FireMonkey rendering engine, which makes them platform-agnostic but without any native window handle. since WebView2 requires an actual window handle to render its content, it isn't possible to use a 'TFMXObject' like 'TRectangle' as the parent window for WebView2. in essence, FireMonkey objects and native components like WebView2 operate in fundamentally different ways. while you can embed WebView2 inside a FireMonkey form by setting the parent window to the form handle, using a 'TFMXObject' as a parent isn't feasible due to the lack of a native window handle in FireMonkey controls. not only the ones you mentioned, but i also want to add more. however, it isn’t possible due to compatibility limitations. . |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Windows Fluent Effects Standalone API - InnoSetup / VCL / FXM | BLACKFIRE69 | Conversion Tutorials | 0 | 15-11-2023 17:35 |
Windows Phone Installer similar to razor12911's original design? | Kitsune1982 | Conversion Tutorials | 0 | 02-07-2020 13:04 |
INDEX - Conversion Tutorial Index | Razor12911 | Conversion Tutorials | 5 | 11-06-2020 02:05 |
Frequently Asked Questions | Joe Forster/STA | PC Games - Frequently Asked Questions | 0 | 29-11-2005 09:48 |