Hola!!
miren, tengo este code que lo arme, la idea es cojer un formulario X que tenga el procedimiento "OnRead" y ejecutarlo, pero la cosa es que cuando intendo correr el soft me salta error "Operator not applicable to this operand type" en la linea "//Esta Linea" justo en "OnRead".
Supongo yo que es por que TForm pos no tiene ese prosedimiento, pero no se como arreglarle, quiero enviarle cualquier Form y me lo acepte.
Como lo Resuelvo?
Código Delphi
[-]
procedure Sent_DataSocket_Form(CSokcet:TCustomWinSocket; ListView:TListView; ID_Obj:integer; DataSocket:string; ObjForm: TForm);
var
ID_Item: integer;
ListItem: TListItem; begin
ID_Item := GetID_Item_CSocket(CSokcet, ListView);
if ID_Item >= 0 then
begin
ListItem := ListView.Items[ID_Item];
if ListItem.SubItems.Objects[ID_Obj] <> nil then
begin
(ListItem.SubItems.Objects[ID_Obj] as ObjForm).OnRead(CSokcet, DataSocket); Exit;
end;
end;
end;