Jump to content

Ian Branch

Members
  • Content Count

    173
  • Joined

  • Last visited

  • Days Won

    1

Ian Branch last won the day on August 8

Ian Branch had the most liked content!

Community Reputation

31 Excellent

Technical Information

  • Delphi-Version
    Delphi 10.3 Rio

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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
  2. Ian Branch

    PopMenu two levels down..

    Hi David, Agreed. Lesson learnt. Regards, Ian
  3. Ian Branch

    PopMenu two levels down..

    Aaaaarrrrrggggghhhhh!!!!!! For 3 days I wrestled with the issue, narrowing it down to the Main Menu configuration. It was repeatable. From the Main menu line call it didn't work. From a sub menu call, it worked. Every time...... Hence this thread. I just went to create a small test app to demonstrate it. Couldn't make it fail. Huh? Scrapped it and started again. Nope. Didn't fail. Hmm. Goes back to the original app that I had the issue in......You guessed it, it now works, either way.?????? Apologies to any and all for any stress. I'm going to go and have a Scotch and ponder the meaning of life....More like to get the answer to that than to this..... Regards & tks for your support, Ian
  4. Ian Branch

    PopMenu two levels down..

    Hi Uwe, VCL, Win 32. I'll see about a small demo. Ian
  5. Ian Branch

    PopMenu two levels down..

    Hi Attila, That's one interpretation. Or, it could mean that it is the only environment I am working in and have experienced the problem and that I can make the issue happen at will in my working environment. ;-) Ian
  6. 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
  7. Ian Branch

    Detect if running in a remote session..

    All, Thank you for your input. Much appreciated. It is now working as desired. Regards & Tks again. Ian
  8. Ian Branch

    Detect if running in a remote session..

    Hi Anders, Thank you for your suggestion. So, this is my implementation.. program LogViewer; uses Vcl.Controls, Vcl.Forms, Vcl.Themes, Vcl.Styles, System.SysUtils, MainFrm in 'MainFrm.pas' {MainForm}; {$R *.res} function DetectRemoteSession: boolean; const SM_REMOTECONTROL = $2001; // This system metric is used in a Terminal // Services environment. Its value is nonzero // if the current session is remotely // controlled; otherwise, 0. SM_REMOTESESSION = $1000; // This system metric is used in a Terminal // Services environment. If the calling process // is associated with a Terminal Services // client session, the return value is nonzero. // If the calling process is associated with // the Terminal Server console session, the // return value is 0. The console session is // not necessarily the physical console. var Mode: string; begin Result := (GetSystemMetrics(SM_REMOTESESSION) <> 0) or (GetSystemMetrics(SM_REMOTECONTROL) <> 0); // Test for emulated local/remote mode if (FindCmdLineSwitchEx('Session', Mode, ['-','\','/'], True)) then begin if (SameText(Mode, 'Remote')) then Result := True else if (SameText(Mode, 'Local')) then Result := False; end; end; begin // Application.Initialize; Application.MainFormOnTaskbar := True; if not DetectRemoteSession then TStyleManager.TrySetStyle('Iceberg Classico'); Application.CreateForm(TMainForm, MainForm); Application.Run; // end. Unfortunately, despite having vcl.controls in the uses, getsystemmetrics is still not recognised. :-( Nor does it know anything about FindCmdLineSwitchEx Thoughts/Suggestions? Regards, Ian
  9. Ian Branch

    Detect if running in a remote session..

    Hi Fred, Thanks for your suggestion.. Yes I have seen that and have tried a couple of things but none seem to work from the project file for one reason or another. Ian
  10. Hi Team, I need to detect if my delphi (10.3.2) app is running in a remote RDP session. I want to do the detection in the Project file so I can disable the Theme. e.g. Application.Initialize; Application.MainFormOnTaskbar := True; if not IsRemoteSession then TStyleManager.TrySetStyle('Iceberg Classico'); Thoughts/suggestions appreciated. Regards & TIA, Ian
  11. Ian Branch

    Check what Patches I have installed, or not?

    Darian, It was that list that prompted the question. I am sure I have installed at least 3 of them but I am not sure and I probably didn't install them if they seemed to be specific to C++, however I note in David's article that they should be installed anyway. Is it safe to reinstall them again from the start even if they have already been installed? I infer from David's article that it may not. Ian
  12. 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
  13. Ian Branch

    TJvLoginDialog usage??

    Hi RVK, Ahh. I see. And I have determined that setting 'AllowLogin' in the CheckUser procedure to false is what to manage the count. I think I have all that I need now. Tks. Regards, Ian
  14. Ian Branch

    TJvLoginDialog usage??

    Ahh Excellent. Tks RVK. Is there a mechanism to use the AttemptNumber is it just a place holder? Regards & Tks, Ian
  15. Ian Branch

    TJvLoginDialog usage??

    Hi Guys, in particular JVCL Gurus, I am playing with the JvLoginDialog. It runs immediately the App is started and seemingly before the application's Form is created. I want to use it to verify the log in details of a user from a database table. Unfortunately the database bits are on the Form, engine, session, connection, table, and as a result they are not seen when the component's OnCheckUser event fires. :-( Naturally I can't find any documented Help for the component. Can anybody advise how to achieve what I am trying to do or can't I? Regards & TIA, Ian
×