Ian Branch
Members-
Content Count
1352 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Ian Branch
-
Hi David, Agreed. Lesson learnt. Regards, Ian
-
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
-
Hi Uwe, VCL, Win 32. I'll see about a small demo. Ian
-
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
-
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
-
All, Thank you for your input. Much appreciated. It is now working as desired. Regards & Tks again. Ian
-
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
-
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
-
Check what Patches I have installed, or not?
Ian Branch replied to Ian Branch's topic in General Help
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 -
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
-
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
-
Ahh Excellent. Tks RVK. Is there a mechanism to use the AttemptNumber is it just a place holder? Regards & Tks, Ian
-
Hi Team, Given the following call - TCurrentCustJobsForm.Create(Nil).ShowModal; Can this be made to return a value? e.g. iRecord := TCurrentCustJobsForm.Create(Nil).ShowModal; I figure if it will work I will have to set & return it somehow in the CurrentCustJobsForm. Just hoping. Regards, Ian
-
"The Tool Wiz" eh? K. I have downloaded it and will review. Thank you. Regards, Ian
-
So, is it a bug or their re-design and that is the way it is? I for one would really appreciate an alternative as I am constantly trying different components to get the best result. Regards, Ian
-
Hi David, Interesting. I would have a look at your session but the web page says "We're just moving in. Please visit us again soon" Ian
-
Ahh. Apologies. Didn't think to look at/for the Blog post. :-( I have voted for it but with only two votes att I don't see it getting much traction/attention. :-( I also posed the question about disabling the option. I later realised that it is still valid for many other components. Apologies for any inconvenience, Ian
-
Nope. Not to worry. Not critical att. :-) FYI - This is the first set of errors. D:\GExperts\source\Utils\GX_IdeUtils.pas(579): error E2003: Undeclared identifier: 'TContainedAction' [D:\GExperts\Projects\DelphiXx103\GExpertsRS103.dproj] D:\GExperts\source\Utils\GX_IdeUtils.pas(581): error E2033: Types of actual and formal var parameters must be identical [D:\GExperts\Projects\DelphiXx103\GExpertsRS103.dproj] D:\GExperts\source\Utils\GX_IdeUtils.pas(582): error E2015: Operator not applicable to this operand type [D:\GExperts\Projects\DelphiXx103\GExpertsRS103.dproj] D:\GExperts\source\Utils\GX_IdeUtils.pas(583): error E2015: Operator not applicable to this operand type [D:\GExperts\Projects\DelphiXx103\GExpertsRS103.dproj] D:\GExperts\source\Utils\GX_IdeUtils.pas(584): error E2015: Operator not applicable to this operand type [D:\GExperts\Projects\DelphiXx103\GExpertsRS103.dproj] D:\GExperts\source\Utils\GX_IdeUtils.pas(584): error E2035: Not enough actual parameters [D:\GExperts\Projects\DelphiXx103\GExpertsRS103.dproj] D:\GExperts\source\Utils\GX_IdeUtils.pas(590): error E2003: Undeclared identifier: 'TContainedAction' [D:\GExperts\Projects\DelphiXx103\GExpertsRS103.dproj] D:\GExperts\source\Utils\GX_IdeUtils.pas(597): error E2033: Types of actual and formal var parameters must be identical [D:\GExperts\Projects\DelphiXx103\GExpertsRS103.dproj] D:\GExperts\source\Utils\GX_IdeUtils.pas(598): error E2066: Missing operator or semicolon [D:\GExperts\Projects\DelphiXx103\GExpertsRS103.dproj] D:\GExperts\source\Utils\GX_IdeUtils.pas(598): error E2035: Not enough actual parameters [D:\GExperts\Projects\DelphiXx103\GExpertsRS103.dproj] D:\GExperts\source\framework\GX_EditorFormServices.pas(270): error F2063: Could not compile used unit 'GX_IdeUtils.pas' [D:\GExperts\Projects\DelphiXx103\GExpertsRS103.dproj] Done Building Project "D:\GExperts\Projects\DelphiXx103\GExpertsRS103.dproj" (rebuild target(s)) -- FAILED. Ian
-
FYI - I use D2007 & D10.3.2. Periodically I download via svn the latest trunk for GExperts. The current download will not build for D10.3.2. No biggie. Just FYI. Ian
-
Hi Schokohase, Ahhh. I see what you have done. It is in fact where I started before opening this thread and looking for an alternative for the return of a variable. I use this technique a lot. Thank you for your input. Hi Dany, Yes you are quite correct and I do read and play around a hell of a lot but sometimes my patience wears thin. ;-) Regards to both, Ian
-
OK. I sorta follow the theory but I don't see how I can make Form11 see the TCustomer from Form10.
-
Hi Schokohase, Here you go.. unit Unit10; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TForm10 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; type TCustomer = record name: string[30]; age: byte; end; var Form10: TForm10; customer: TCustomer; implementation uses Unit11; {$R *.dfm} procedure TForm10.Button1Click(Sender: TObject); begin if TForm11.Execute(customer) then begin MessageDlg('customer.Name = ' + customer.name, mtInformation, [mbOK], 0); MessageDlg('customer.Age = ' + IntToStr(customer.age), mtInformation, [mbOK], 0); end; end; end. unit Unit11; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TCustomer = record name: string[30]; age: byte; end; //var // customer: TCustomer; type TForm11 = class(TForm) Button1: TButton; Edit1: TEdit; Edit2: TEdit; private { Private declarations } public { Public declarations } class function Execute(out Value: TCustomer): Boolean; end; var Form11: TForm11; implementation {$R *.dfm} class function TForm11.Execute(out Value: TCustomer): Boolean; var F: TForm11; begin F := TForm11.Create(nil); try Result := IsPositiveResult(F.ShowModal); if Result then begin Value.name := F.Edit1.Text; Value.age := StrToInt(F.Edit2.Text); end; finally F.Free; end; end; end. Unit10 calls unit11. Ian
-
Hi Alexander, Appreciate your patience here. So, even though I had the var customer: TCustomer; in the called form, F.customer still wasn't recognised. OK. So be it. OK. So now I have the individual values being set per above, the compiler likes the called unit but the called unit bombs out compiling if TForm11.Execute(customer) then saying var parameters must be identical. My first thought was that I needed to change it to if TForm11.Execute(Tcustomer) then but this bombs with '(' expected but ')' found. I am happy to pursue this but I don't want to tie up your time. Ian
-
Hi Alexander, Well. That cleared the function error, but now it doesn't like F.customer. Undeclared identifier. Ian
-
Hi Schokohase, In my ignorance of what can and can't be done in in this area - No.