Jump to content

PeaShooter_OMO

Members
  • Content Count

    133
  • Joined

  • Last visited

Everything posted by PeaShooter_OMO

  1. 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;
  2. PeaShooter_OMO

    Shadow underneath Form does not always appear (CS_DROPSHADOW)

    @Kas Ob. Deriving another class for the Borderless form did the trick. It is an interesting one, indeed. Thank you for your input.
  3. PeaShooter_OMO

    Slow performance. HELP!

    @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?
  4. I am always amazed at the ideas people come up with. Well done.
  5. PeaShooter_OMO

    Applications for Linux

    Yes, from FMXLinux's website it seems to be the case even if you buy it separately.
  6. PeaShooter_OMO

    Recommended string format to work with UTF-8 databases

    I am unsure about that class. In what unit is it declared? I can't find it in Delphi 11.
  7. PeaShooter_OMO

    TEdgeBrowser text or button overlay

    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
  8. PeaShooter_OMO

    Changes to the forum functionality

    And her sister came 42nd in a county beauty pageant.
  9. PeaShooter_OMO

    Changes to the forum functionality

    Aaah, man! I had a good one lined up
  10. PeaShooter_OMO

    Range check error...

    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.
  11. PeaShooter_OMO

    Range check error...

    Actually WPARAM is Unsigned
  12. PeaShooter_OMO

    AI Rewrite and COBOL Port Announced for Immediate Development

    You can call it GAmateurs.... Sorry, I had to. I have to ask ChatGPT what the extension of a form file in Cobol is.
  13. PeaShooter_OMO

    OtlParallel Memory Leak

    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?
  14. PeaShooter_OMO

    Creating an app to play Youtube videos

    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
  15. PeaShooter_OMO

    Creating an app to play Youtube videos

    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).
  16. PeaShooter_OMO

    function declarations without ; at the end

    Strange how that triggers a an OCD response in me when I see it.
  17. PeaShooter_OMO

    Delphi 12.3 is available

    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.
  18. PeaShooter_OMO

    Delphi 12.3 is available

    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.
  19. PeaShooter_OMO

    Delphi 12.3 is available

    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.
  20. PeaShooter_OMO

    Delphi 12.3 is available

    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.
  21. PeaShooter_OMO

    Can not crate a new project

    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.
  22. PeaShooter_OMO

    Multithreading

    Why? Would you mind elaborating on this?
  23. PeaShooter_OMO

    Drone and Delphi

    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?
  24. PeaShooter_OMO

    How to capture a mouse click outside a modal window?

    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.
  25. 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.
×