Jump to content

Ian Branch

Members
  • Content Count

    1282
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Ian Branch

  1. Ian Branch

    Freeing Show v ShowModal??

    Noted. Tks.
  2. Ian Branch

    Freeing Show v ShowModal??

    Thank you David & Attila, I just want to be sure. :-) The CloseDataSets was valid in the original code where only one sub-form was open at a time, however it isn't appropriate where multiple forms are going to be open. The relevant dataset is closed in the sub-form before the actual Close. Regards & Tks again, Ian
  3. Ian Branch

    Detect Windows shutdown?

    Hi Team, D10.3.3. I want to detect Windows shutdown in Win 7 and Win 10 in order to ensure data is saved before the App gets clobbered. I have tried a few examples using.. { Private declarations } procedure WMQueryEndSession(var Msg: TWMQueryEndSession); message WM_QUERYENDSESSION; plus its associated routine, without success. I suspect the above may be OK in Win 7, haven't tried it yet, but not for Win 10. Anybody got code working as desired in Win 10? Regards & TIA, Ian
  4. Ian Branch

    Detect Windows shutdown?

    Hi Mahris, Yes, since I started this I discovered and no use OnCloseQuery. Thank you for the follow up. Ian
  5. Ian Branch

    Appreciate the 'extra mile'..

    Hi Thomas, I very much appreciate your heads up in the build script for D2007 in regard to the missing 'Borland.' files when Win 11 updates, and the provisioning of said files. It has saved my bacon several times recently. 🙂 Regards, Ian
  6. Ian Branch

    Version check error???

    So, I shut my modem/router down for a couple of minutes and I still got the intermittent error. First time it errored, the second it didn't. That suggests something else is afoot... I really would prefer it to be consistent, i.e. happen all the time, then I have a better chance of isolating it.
  7. Ian Branch

    Version check error???

    Hi Dave, No I didn't. It didn't occur to me that component packages would be doing what was possibly an online version check. This would be problematic if you weren't online. Actually the whole version check, if done online would be problematic if not online. Ian
  8. Ian Branch

    wuppdi Welcome Page for Delphi 11 Alexandria?

    @Daniel Whither goest WUPPDI for D11??
  9. Ian Branch

    Parnassus Bookmarks for Delphi 11 Alexandria?

    It was an error dialog. No, I don't have a screen shot. Windows 11. Delphi 11.1.1. I clicked the error dialog and the old Delphi closed and the new came up. Just to be sure all as OK I closed and restarted Delphi. No issues since.
  10. Ian Branch

    Parnassus Bookmarks for Delphi 11 Alexandria?

    Bookmarks installed. The restart had a failure but closing & restarting all fine now.
  11. Ian Branch

    RBuilder issue with pipeline

    Noted. Tks.
  12. Ian Branch

    RBuilder issue with pipeline

    Hi Bill, I am pleased. What was it? Ian
  13. Ian Branch

    RBuilder issue with pipeline

    Ummm. OK. Then I am out of my depth. I have never created a ret programmatically. I would suggest getting on the RB Forum and asking there.
  14. Ian Branch

    RBuilder issue with pipeline

    No. Umm. Are you creating the report totally in code or using a version of the Users App?
  15. Ian Branch

    RBuilder issue with pipeline

    OK. Difficult to debug like this. Can you send me the .tmp file?
  16. Ian Branch

    RBuilder issue with pipeline

    It is possibly this parameter..
  17. Ian Branch

    RBuilder issue with pipeline

    HI Bill, It suggests that the Detail data isn't being traversed and is reporting just the first record. If the record you are seeing is in fact the first record, then.. a. Check your filter/query. b. Check the Traversal parameter for the Detail row. Ian
  18. Ian Branch

    RBuilder issue with pipeline

    I opened my mouth before engaging brain... That is for Bill to test/confirm.
  19. Ian Branch

    RBuilder issue with pipeline

    Ahhh. OK. I don't think I have ever set it to true.. Well done.
  20. Ian Branch

    RBuilder issue with pipeline

    Hi Bill, As a confirmation of the 384, put a DBCalc counter in the Summary that counts the number of records in the Detail. Care to share an image of the design layout?
  21. Ian Branch

    RBuilder issue with pipeline

    Is that 'row' in the ^ Detail row of the report??
  22. Ian Branch

    Windows APIs?

    Hi Team, thank you for your inputs. I am using D11.1.1, Win 11 64 bit. I freely confess I am playing in/with something I know nothing about and don't expect to need again. I found an article from 'The road to Delphi', https://theroadtodelphi.com/2011/03/02/search-for-installed-windows-updates-using-delphi-wmi-and-wua/ From this I created this test project as a start point.. unit Unit24; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Winapi.ActiveX, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, System.Win.ComObj; type TForm24 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); function ISHotFixID_Installed(const HotFixID: string): Boolean; private { Private declarations } public { Public declarations } end; var Form24: TForm24; updateSession: OleVariant; updateSearcher: OleVariant; updateEntry: OleVariant; updateSearchResult: OleVariant; UpdateCollection: OleVariant; oEnum: IEnumvariant; iValue: LongWord; implementation {$R *.dfm} //use in this way ISHotFixID_Installed('KB982799') function TForm24.ISHotFixID_Installed(const HotFixID: string): Boolean; begin result := False; updateSession := CreateOleObject('Microsoft.Update.Session'); updateSearcher := updateSession.CreateUpdateSearcher; //this line improves the performance , the online porperty indicates whether the UpdateSearcher goes online to search for updates. so how we are looking for already installed updates we can set this value to false updateSearcher.online := False; updateSearchResult := updateSearcher.Search(Format('IsInstalled = 1 and Type=%s', [QuotedStr('Software')])); UpdateCollection := updateSearchResult.Updates; oEnum := IUnknown(UpdateCollection._NewEnum) as IEnumVariant; while oEnum.Next(1, updateEntry, iValue) = 0 do begin Result := Pos(HotFixID, updateEntry.Title) > 0; updateEntry := Unassigned; if Result then break; end; end; procedure TForm24.Button1Click(Sender: TObject); begin if ISHotFixID_Installed('KB5014650') then ShowMessage('KB Found.') else ShowMessage('KB Not Found.') ; end; end. A couple of interesting things.. 1. Whenever I go to edit this line Delphi hangs up. No keyboard or mouse response in the IDE. 😞 Although Task Manager says it is busy, I have left it for 30+ minutes and it still doesn't return. if ISHotFixID_Installed('KB5014650') then ShowMessage('KB Found.') else ShowMessage('KB Not Found.') ; 2. KB5014650 IS installed on the PC but the button1 function tells me it isn't. 😞 Again, this is my first step. From here I had hoped to implement the search function to see what has been downloaded but not installed. OK. It is probably me, what have I missed? Or, is there an issue either with Delphi or Win 11 or both? Perhaps the fact that I am trying to use it on a 64bit OS? Appreciate any assistance/guidance. Regards & TIA, Ian
  23. Ian Branch

    Windows APIs?

    Hi Team, Two questions.. 1. What is the best reference for Windows APIs that Delphi can access/use? 2. Is there a Windows API that tells if there are any OS updates waiting to be installed? Regards & TIA, Ian
  24. Ian Branch

    New Delphi job opportunity

    Don't forget the Drop Bears... Can be nasty... https://australian.museum/learn/animals/mammals/drop-bear/
  25. Hi @Daniel, Is it possible in this forum to set up a survey of some sort to asses what version(s) of Delphi Forum participants are still using these days? Obviously respondents would need to be able to tick multiple versions. I think it be interesting to see what is still in use 'out there' and rough percentages. Just a thought. Regards, Ian
×