Home > Back-end >  Delphi made ocx in c # call, TGridRect corresponding error types
Delphi made ocx in c # call, TGridRect corresponding error types

Time:09-15

Made a ocx in Delphi, in another Delphi procedure calls, it's no problem, can display the selected normal (control prototype TDrawGrid) :



Code:


OCX when making key code is as follows:

Note: implementation has add attribute SelectionRect: property SelectionRect: OleVariant read Get_SelectionRect write Set_SelectionRect;


Above is in Delphi ocx development, and use this ocx in Delphi, no problem, ok, problem is coming, to call in c #, but error:


Is the type used wrong?

CodePudding user response:

Add, Delphi TGridRect in Grids in the cell statement like this:

TGridRect=record
In case the Integer of
0: (Left, Top, Right, Bottom: Longint);
1: (TopLeft, BottomRight: TGridCoord);
The end;

CodePudding user response:

I saw the article said to convert struct to byte [] pass
  • Related