Jump to content

Davide Visconti

Members
  • Content Count

    20
  • Joined

  • Last visited

Community Reputation

3 Neutral

Technical Information

  • Delphi-Version
    Delphi 10.2 Tokyo

Recent Profile Visitors

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

  1. Davide Visconti

    Project Configuration Manager

    Thanks to everybody.
  2. Davide Visconti

    Project Configuration Manager

    Thanks Peter for the suggestion but the applications could use different units, for example: Application 1 use these units: VISION.Camera.Matrix.Vimba VISION.Plc.Siemens Application 2 use these units: VISION.Camera.Matrix.Dalsa VISION.Plc.Beckhoff Application 3 use these units: VISION.Camera.Matrix.Vimba VISION.Plc.Beckhoff As you see, the the combinations can be very different, so IMHO the repo wouldn't be the right way. Thanks for the suggestion about the Tool menu.
  3. Davide Visconti

    Project Configuration Manager

    Does anybody suggest me how to develop an IDE tool to support the developers when they start a new project? ...I will try to explain what I mean. We have a framework that usually is a starting point for the new applications, I'd like to develop an "IDE Wizard" where the developers can choose the group of units that they want to use. Eg: VISION.Graphics.ImageView VISION.Graphics.Roi VISION.Credential.User VISION.Camera.Matrix.Vimba VISION.Input VISION.Plc.Siemens These "IDE Wizard" build a new project with all the necessary units. Thanks for any suggestions, documentation, code snippet, how to, ...
  4. Davide Visconti

    best practise sharing : 2 buttons with mrOK on a form

    I don't understand correctly your question... but usually on a dialog form you have 2 buttons with different results. mrOk / mrCancel or mrYes / mrNo. if AForm.ShowModal = mrOk then begin // Ok button pressed // do some stuff... end else begin // Cancel button pressed // do other stuff... end; Anyway, if you have to (for any strange reason) set 2 buttons with the same result values... you must store in a variable the user choise, button A or button B. TMyDialogForm = class(TForm) private FSelectedButton : Integer; public property SelectedButton : Integer read FSelectedButton; end; //... procedure TMyDialogForm.BtnAClick(Sender: TObject); begin // Store the button pressed inside the FSelectedButton variable FSelectedButton := 1; ModalResult := mrOk; end; procedure TMyDialogForm.BtnBClick(Sender: TObject); begin // Store the button pressed inside the FSelectedButton variable FSelectedButton := 2; ModalResult := mrOk; end; I hope it helps you.
  5. Davide Visconti

    How to identify problem remotely

    Hello @ertank is it possible that on that machine are presents different parameters or configuration files that may cause the problem? How many times the problem appear? Becasue, in my experience, if the problem is on the RAM module you should get a lot of problems... and not only on your application. Anyway, get any linux distro and test the RAM or get this one (https://www.memtest86.com/)
  6. Davide Visconti

    Version Control System

    We use Mercurial and TortoiseHg. It'sworks very well in Windows environment.
  7. Davide Visconti

    dwg import

    Yes, I used it in the past (Delphi 7) and it worked well.
  8. Davide Visconti

    Web dashboard application

    Thank you so much for any suggestion. Since the web applications is not our core business and because we don't have a lot of time to learn any other languages, we choosed the UniGui framework to speed up the development process. In this first months we get a good impression of UniGui, yes there is some "memory leak", but overall, the results obtained so far are enough. I would like them to improve customer support because IMHO isn't enough. Thanks again.
  9. Davide Visconti

    Import .NET Assembly

    Thanks David, if I have to write a wrapper in C# to expose the COM.... I definitely prefer write a Delphi wrapper over C dll, that's what usually we do (.h --> .pas). Thank you anyway for the suggestion.
  10. Davide Visconti

    Import .NET Assembly

    Hi, I've upgrade a library to the new version, we usually import this library as Type Library (COM object) in Delphi (since "yesterday"). Now, in this new version the COM object are no longer supported, so I'm looking around. The new library support the C# .NET, C++ (unmanaged), C++ (managed) and C. I know that I can use the C .dll with a Delphi wrapper but... Just out of curiosity I tried to import the .NET Assembly. I never use the .NET Assembly before, and honestly I don't know very well what is the .NET Assembly. I'm searching on google and I found some documentations, but before start reading I ask you if you know a good start point "Delphi and .NET Assembly". Do you have experience with that? After the import I get the wrapper with a lot of class/interface but they are all empty. Eg: // *********************************************************************// // Interface: _HObject // Flags: (4432) Hidden Dual OleAutomation Dispatchable // GUID: {8E90512D-E586-352A-A70F-C7F1518E667D} // *********************************************************************// _HObject = interface(IDispatch) ['{8E90512D-E586-352A-A70F-C7F1518E667D}'] end; // *********************************************************************// // Interface: _HImage // Flags: (4432) Hidden Dual OleAutomation Dispatchable // GUID: {2D195846-332C-32E4-A6A3-8B089435BB54} // *********************************************************************// _HImage = interface(IDispatch) ['{2D195846-332C-32E4-A6A3-8B089435BB54}'] end; Any suggestion will be appreciate. Thank you, as always, for your time.
  11. You can write the new length of the string inside the AText[0] I never try that and IMHO isn't an elegant solution but it should works... Fast enough.
  12. Davide Visconti

    Block windows access

    @David Heffernan what do you mean? @Uwe Raabe I never hear that before! Sound good! I'll try it.
  13. Davide Visconti

    Block windows access

    Hi all, I'm searching a way to intercept, in Windows 10, some classic windows shortcuts like the Windows key, Ctrl+alt+canc, Ctrl+esc, Alt+tab, etc... My goal is to limit the user access to my application and let the windows access at some other users with high privilege. Do you know something like that? Thanks.
  14. Davide Visconti

    RttiMethod Invoke (invalid class typecast)

    Yes of course. Thanks @Kryvich
  15. Davide Visconti

    RttiMethod Invoke (invalid class typecast)

    This work. Do you have any suggestions? procedure TFrmMain.Btn1Click(Sender: TObject); var LCtx : TRttiContext; LType1 : TRttiType; LField1 : TRttiField; LNestedType1 : TRttiType; LRttiInstanceType: TRttiInstanceType; LMeth : TRttiMethod; LObj : TObject; begin LCtx := TRttiContext.Create; LType1 := LCtx.GetType(MyTool.ClassType); LField1 := LType1.GetField('MyClass'); LObj := LField1.GetValue(MyTool).AsObject; LNestedType1 := LCtx.GetType(LField1.FieldType.Handle); LMeth := LNestedType1.GetMethod('Run'); // LMeth.Invoke(MyTool.MyClass, []); // ok // LMeth.Invoke(LNestedType1.AsInstance.ClassInfo, []); // fail LMeth.Invoke(LObj, []); end;
×