

PeaShooter_OMO
Members-
Content Count
133 -
Joined
-
Last visited
Community Reputation
34 ExcellentRecent Profile Visitors
3218 profile views
-
Shadow underneath Form does not always appear (CS_DROPSHADOW)
PeaShooter_OMO replied to PeaShooter_OMO's topic in Windows API
@Kas Ob. Deriving another class for the Borderless form did the trick. It is an interesting one, indeed. Thank you for your input. -
Shadow underneath Form does not always appear (CS_DROPSHADOW)
PeaShooter_OMO posted a topic in Windows API
In Delphi 11, Windows 10... I have a small project where I create a form (the same Form object) with two different states; a Normal form and a Borderless Shadowed form (created via CreateParams and CS_DROPSHADOW). After starting the program, if I create the Borderless form first then the shadow will be there. If I create the Normal form first and then the Borderless form then the shadow of the Borderless form will not be there. Attached you will find a .zip file with the project. Project.zip Steps to produce the strange behaviour... Start the program Create the Normal form first Close the Normal form via the "Close" button. Create the Borderless Shadowed Popup form. Notice the shadow does not appear. You can close and create all you like. The shadow never appears beneath the Borderless form. Steps to produce a shadow at all times... Start the program Create the Borderless Shadowed Popup form first. Notice the shadow is correctly appearing. Close the Borderless form. Create the Normal form. Close the Normal form. Create the Borderless Shadowed Popup form again. Notice the shadow is correctly appearing. You can flip-clop between the two as much as you like, the shadow will always be there. Obviously I would expect the Borderless form to always have its shadow. Am I doing something wrong? type TFormMain = class(TForm) ButtonCreateNormal: TButton; ButtonCreateBorderless: TButton; procedure ButtonCreateNormalClick(Sender: TObject); procedure ButtonCreateBorderlessClick(Sender: TObject); private public end; var FormMain: TFormMain; implementation {$R *.dfm} uses UnitPopup; procedure TFormMain.ButtonCreateBorderlessClick(Sender: TObject); begin FormPopup := TFormPopup.Create(True); FormPopup.Show; end; procedure TFormMain.ButtonCreateNormalClick(Sender: TObject); begin FormPopup := TFormPopup.Create(False); FormPopup.Show; end; type TFormPopup = class(TForm) Panel1: TPanel; ButtonClose: TButton; procedure ButtonCloseClick(Sender: TObject); private FIsBorderlessPopup : Boolean; protected procedure CreateParams(var Params: TCreateParams); override; public constructor Create(AIsBorderlessPopup : Boolean); reintroduce; end; var FormPopup: TFormPopup; implementation {$R *.dfm} procedure TFormPopup.ButtonCloseClick(Sender: TObject); begin FreeAndNil(FormPopup); end; constructor TFormPopup.Create(AIsBorderlessPopup : Boolean); begin FIsBorderlessPopup := AIsBorderlessPopup; inherited Create(nil); If FIsBorderlessPopup then begin Panel1.BorderStyle := bsSingle; Panel1.Caption := 'Borderless Shadowed'; end else begin Panel1.BorderStyle := bsNone; Panel1.Caption := 'Normal Form'; end; end; procedure TFormPopup.CreateParams(var Params: TCreateParams); begin inherited CreateParams(Params); If FIsBorderlessPopup then begin Params.Style := WS_POPUP; Params.WindowClass.style := Params.WindowClass.style or CS_DROPSHADOW; Params.ExStyle := WS_EX_TOPMOST; end; end; -
@Berocoder Does your SQL Servers update automatically through Windows Updates or some other mechanism? Was there any other Windows Updates that took place? What does the Performance monitoring on those machines/VMs (client and server) tell you about the current state of the machine when this issue appears or when you run those slow queries?
-
RAD Programmer Coding Challenge #1 - build a MineSweeper game in RAD Studio with a chance to with $500
PeaShooter_OMO replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
I am always amazed at the ideas people come up with. Well done. -
Yes, from FMXLinux's website it seems to be the case even if you buy it separately.
-
Recommended string format to work with UTF-8 databases
PeaShooter_OMO replied to Bruce Eglington's topic in Databases
I am unsure about that class. In what unit is it declared? I can't find it in Delphi 11. -
If you would be willing to have the button as part of the web page then you can add a button to the page through Javascript and execute that script with EdgeBrowser.ExecuteScript You can obviously add an event to the button in Javascript and you can style your button through CSS. If you want to send a notification back to your Delphi code from that button you can use the EdgeBrowser.OnWebMessageReceived Delphi event and in your Javascript button event you can call window.chrome.webview.postMessage(<some info>) to send the notification which EdgeBrowser.OnWebMessageReceived will receive
-
Changes to the forum functionality
PeaShooter_OMO replied to Lars Fosdal's topic in Community Management
And her sister came 42nd in a county beauty pageant. -
Changes to the forum functionality
PeaShooter_OMO replied to Lars Fosdal's topic in Community Management
Aaah, man! I had a good one lined up -
SendMessage expects certain parameter types and returns a specific type. Have a look at those and use accordingly. Do Type Casting where needed. You can also log the value of FY when the issue occurs.
-
Actually WPARAM is Unsigned
-
AI Rewrite and COBOL Port Announced for Immediate Development
PeaShooter_OMO replied to dummzeuch's topic in GExperts
You can call it GAmateurs.... Sorry, I had to. I have to ask ChatGPT what the extension of a form file in Cobol is. -
Do you see any other people coming back onto your post here? They've washed their hands of you. You are arrogant and disrespectful towards those that are giving their time without compensation and you have only insulted everyone here. Whats the point of having thread-unsafe code?
-
He can also be notified if the clipboard changes. There is also a sequence number that indicates the change. I suggest a thorough read of Using the Clipboard
- 12 replies
-
- delphi xe7
- youtube
-
(and 1 more)
Tagged with:
-
Can TWebBrowser be updated in Delphi XE7? I ask because I am sceptical about the old WebBrowser's compatibility with Youtube's system. If you browse blogs a lot you will notice that sometimes the authors embed a Youtube video on their blog posts. I propose you find out how that is done and then use TWebBrowser (or other Browser component) with a web page you create with that embedded video. There might be a better way to do this but this is the only one I could think of apart from using a 3rd party Youtube library (if such a thing exists).
- 12 replies
-
- delphi xe7
- youtube
-
(and 1 more)
Tagged with: