

PeaShooter_OMO
Members-
Content Count
133 -
Joined
-
Last visited
Everything posted by PeaShooter_OMO
-
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; -
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. -
@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:
-
function declarations without ; at the end
PeaShooter_OMO replied to Günther Schoch's topic in RTL and Delphi Object Pascal
Strange how that triggers a an OCD response in me when I see it. -
Possibly but for an issue on a major feature of Delphi that has come for decades already one would expect hard steps to be taken. If it was easy fix it would have been already and seeing that it is hard to fix it would require extraordinary steps. If the steps that were taken already does not work then one would expect another approach.
-
Spending multiple days at a customer experiencing the issues will give Embarcadero a better understanding than sitting and waiting for someone to present a reproducible example. They can take their dev tools along and capture all the logs their hearts desire.
-
Embarcadero asking for reproducible examples and not going out to customers with the same issues wil make sure we will have this nonsense for years to come.
-
I assume Delphi itself is a large project and surely Embarcadero must be seeing the same LSP issues we are seeing while using Delphi. Are they? I just wonder sometimes.
-
You talk about an issue creating a new project but then talk about a StringGrid being on Form3. Strange. I have no definitive idea about what the issue is but I would try to clear the whole "Projects" folder under "c:\Users\<your_user_name>\Documents\Embarcadero\Studio" and then restart Delphi.
-
Why? Would you mind elaborating on this?
-
What type of communication/interface have you and/or are you currently trying? How are you connected to it? It seems that it has SPI and I2C capabilities. Do you have documentaion on how to interact with the MCU?
-
How to capture a mouse click outside a modal window?
PeaShooter_OMO replied to Squall_FF8's topic in FMX
Clicking outside the modal form will not register a mouse down, even through TApplicationEvents.OnMessage. I suspect you might have to use Windows System Hooks with WH_MOUSE. I have not done this before though and as such cannot confirm if this would be the most appropriate way to do it. -
Exception Handling with a Middle Tier Application
PeaShooter_OMO replied to JIMSMITH's topic in Algorithms, Data Structures and Class Design
Whether you pass a specific exception to the client or a specific failure code to the client comes down to the same thing. I do not see the need for the client to be handling an exception which happened on the server. The client literally only needs a proper response from the sever with enough information for the client to know exactly what happened. A specific exception (eOverflow, eConvertError, eInOutError, eListError...) does not have more information than a well coded failure code with additional accompanying data (if required). This all comes down to proper coding practices and a well thought out application layer protocol. I also think this might be moot because sending an exception to another application is as far as I know impossible. What might look like its is being done in other frameworks might just be the framework getting information via TCP from the other side and then just reraising the relevant exception on this side.