Jump to content

Ian Branch

Members
  • Content Count

    1352
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Ian Branch

  1. Ian Branch

    How to populate DBLookupComboBox?

    Hi Odlarhg, The component's Datasource/DataField are the main table. You need to assign the ListSource/ListField/KeyField to the Table you are looking up. The Key field should match the DataField. HTH Ian
  2. Ian Branch

    Why do I get the strange ones??

    Hi team, Win 10, D10.3.3. New form, add a button and a TOpenDialog. Filter set as 'All (*.mkv;*.avi;*.mov;*.mp4;*.mpg;*.flv;*.wmv)|*.avi;*.mov;*.mp4;*.mpg;*.flv;*.wmv|Matroska (*.mkv)|Audio Video Interleave (*.avi)|Quicktime File (*.mov)|*.mp4| *.mpeg|Flash (*.flv)|Windows Media (*.wmv)'; Run it. Select, in my case, a video file. I get the result as shown in attached screeshot_7 Drop the file name dropdown and I get as shown in screenshot_8. Ummmm. What the! The initial 'name' per SS_7 changes with the file but is always the same for any particular file. Any thoughts/suggestions? Regards & TIA, Ian
  3. Ian Branch

    Why do I get the strange ones??

    Found it. It turns out my Synology NAS is returning these values. I moved some files to my PC and all is fine. Need to talk to Synology. Thanks for looking. Ian
  4. Ian Branch

    Looking for a tool..

    Hi Team, Does anybody know of a tool that can select and/or deselect themes in multiple projects? Aside from one-by-one in the IDE. 😉 Regards & TIA, Ian
  5. Ian Branch

    Closing an external App.

    Hi Team, D10.3.3, Win 10. I am experimenting with closing an external App programaticaly. I have the following code.. procedure TForm10.Button2Click(Sender: TObject); var hnd: HWND; begin // hnd := FindWindow(nil, PChar('MyTestApp')); // if hnd = 0 then MessageDlg('MyTestApp is apperently not running.', mtInformation, [mbOK], 0) else MessageDlg('MyTestApp is apperently running.', mtInformation, [mbOK], 0); // end; Even though MyTestApp is clearly running, the FindWindow doesn't seem to find it. Should this work? Is there something I have missed? Is this a known issue/bug? Is there an alternative? Related - What actual Application property is the application name in the FindWindow(nil, PChar('AppName')); ? Regards & TIA, Ian
  6. Ian Branch

    Closing an external App.

    All done. Killed the Process. Thanks to all. Ian
  7. Ian Branch

    Closing an external App.

    And I was that close.... OK. I guess my question of what/where is the Windows Text still applies?
  8. Ian Branch

    Closing an external App.

    Ah Ha! It's the Main Window/Form Title. Sorted. Hmm. Not an issue in my case but what happens if the Form/Window doesn't have a Caption? Regards & Thanks for your input Guys. Ian
  9. Ian Branch

    Closing an external App.

    Hi David, I am clearly having a mental block on this subject. Starting to feel like a dunce. 😞 Which documentation are you referring to? When I did F1 on FindWindow in Delphi it took me to "FMX.Platform.Win.FindWindow". Singularly unhelpful. I don't understand what you mean by "It's the text of the window.". 😞 Regards, Ian
  10. Ian Branch

    Closing an external App.

    Hi Team, Accidentally got it sorted. I should have had.. FindWindow(PChar('TMainForm'), nil); And this works. However I would rather use the Application's name rather than having to go into each of the apps and change their class definition. So, I still don't understand exactly what goes into FindWindow(nil, PChar('MyApp')); for 'MyApp'. Regards & TIA, Ian
  11. Ian Branch

    Closing an external App.

    Hi Guys, Thank you for your inputs. The picture is that I have a head application that runs one or more function specific applications using the shellexecute functionality. That all works fine. The individual apps can be run as a standalone app. As it stands, each individual App has to be closed. What I would like to do is when the head app is closed it automatically closes any apps that are open. Even if the subordinate apps were run from outside the head app. Perhaps to complicate matters, the main form of each subordinate app is defined as follows. type TMainForm = class(TForm) .... ... I tried.. FindWindow(nil, PChar('TMainForm')); but that didn't work. 😞 Regards, Ian
  12. Ian Branch

    Two questions if you please?

    Hi Team, Question 1. What are the consequences/pros & cons of using MyForm.Create(nil).show; v MyForm.Create(self).show;? Question 2. I have asked this somewhere/sometime in the past but I don't recall where/when or the answer. When I open some projects they open showing the form, others open showing the source code and yet other open not showing either. Annoying.. Where is this information kept/save so I can set or reset it so I get them to all open the same please? If I in fact can... Regards & TIA, Ian
  13. Ian Branch

    Two questions if you please?

    David - Thank you. I'll stick to MyForm.create(self).show I think. UWE - Thank you. I have found the Option and have set it now. Regards & Tks to both. Ian
  14. Hi Team, Is there some way to call the default windows media player, what ever the user has set it as, from delphi? Some users use VLC, some leave it as Windows Media Player, others use other progs. I would need to be able to pass it a file name. I have looked at TMediaPlaye but it is too limiting. Regards & TIA, Ian
  15. Ian Branch

    Call the current default Windows media player?

    Sorted. Just told Windows to run the file, be it mp3 or mp4 or whatever. It automatically uses the file extent associated application.
  16. Ian Branch

    IDE Fix pack for Rio

    When I installed D10.3.3 replacing D10.3.2, it seemed to lose the Fix Pack in part. Couldn't find a .dll, although IDE Fix Pack 6.4.4 still showed during Delphi start up. I found the IDE to be horribly slow and a little weird compared to what it was in D10.3.2 with FM 6.4.4. :-( I reinstalled FP 6.4.4 and all performance restored. :-)
  17. Ian Branch

    D10.3.3.3 & 64bit?

    Hi Team, Just installed D10.3.3 32 & 64 bit. Did have D10.3.2 32 bit installed. Never installed 64 bit before. Went to create a small 64bit project and there doesn't seem to be a 64bit option? If I look into the Tools|Options|Language|Delphi|Library I see Windows 64-bit as a selectable platform. Is there somewhere else I need to set to enable 64bit? Regards & TIA, Ian
  18. Ian Branch

    D10.3.3.3 & 64bit?

    Ah Ha! Thanks David. All sorted. regards, Ian
  19. FWIW I prefer GExperts Code Formatter. It has more/better options. What I would like in the GExperts Code Formatter is for it to be able to format all the project files in one hit like the Emb formatter. Ian
  20. Ian Branch

    Main Form jumping into view..

    Hi Team, I'm sure this is something I should know. ;-) If I call a Form off the Main Form via a ToolBar Button using say "TSecondForm.Create(nil).Show;", it appears over the Main Form. Good. From time to time the Main Form will re-appear between the SecondForm and say a dialog. I need the Second, Third, etc, forms to be non-modal so that more than one of them can be open(ed). I have a work around by when the Second, Third, etc form is called/created it calls Application.Minimize. Messy. Is there a better way to manage this issue? Regards & TIA, Ian
  21. Hi Team, As much as I don't want to I have to backport an App to D2007. It currently uses the following code to pass a variable around the App. unit ViewerData; interface type TViewerData = class class var // mssFileName: String; class constructor Create; // end; implementation Uses WindowsStore; class constructor TViewerData.Create; begin // mssFileName := ''; // end; end. It has been a long time since I toiled in D2007 but IIRC it doesn't support either WindowsStore or class constructor. Is the above code modifiable to D2007 compatability? Appreciate any guidance. Regards & TIA, Ian
  22. Ian Branch

    class constructor - Backport to D2007.

    Hi Guys, Apologies for not responding sooner. Family issue. All sorted now thank you. As it was only one variable I just made it Global. Regards, Ian
  23. Ian Branch

    GExperts Replace Components..

    Sorry, my curiosity got the better of me. I currently use D10.3.2. I have indeed experienced the problem on older, multiple, upgraded (D2007 to D10.2+) converted Apps. I have the issue in my main app att. :-( I found that if I fudged things and opened the App in D2007 then Replace Components would do its thing without issue. Not surprising. Hmmm. I thought. I tried Replace Components on a purely D10.x created App. Replace Components works, without issue. :-) I created a brand new App with multiple xxTable & xxQuery components in it and was able to Replace Components between various vendors without issue. :-) I tried copying components from my 'converted' app and pasting them into a new D10.2.3 form, Replace Components didn't work. :-( Are the above observations to be expected? Regards, Ian
  24. Hi Team, D10.3.2. - Where/how do I check/confirm what patches I have or haven't installed into my Delphi? With the several Patches so far, I am uncertain which ones I have actually installed. I see docwiki,emb..... says there is a 'Check for Updates' allegedly in my Program Menu but there isn't. Regards & TIA, Ian
  25. Ian Branch

    PopMenu two levels down..

    Hi Team, An interesting observation.. D10.3.2. Win 10. Main Form with a MainMenu. If I call Form 1 from the MainMenu top line option, lets call it 'Form 1', using "TForm1.Create(nil).ShowModal;", and then from Form 1, call Form 2 with a TButton using "TForm2.Create(nil).ShowModal;", and then try to have a PopMenu appear in Form 2, it doesn't/won't. If, however, I repeat the above but make the initial call from a MainMenu sub-menu, Form 1|Form 1', then the Popup menu works in Form 2. This is repeatable. Is this normal or a bug? Regards, Ian
×