BeanConst.pas 678 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. unit BeanConst;
  2. interface
  3. uses Classes, SysUtils, windows;
  4. const
  5. PageName='MyBean';
  6. Author='Seatune';
  7. type
  8. TBeanType = (bNone, bForm, bLogic);
  9. function LoadResResource(const AName: string): string;
  10. implementation
  11. function LoadResResource(const AName: string): string;
  12. var
  13. AList: TStringList;
  14. AStream: TResourceStream;
  15. ResInstance: THandle;
  16. begin
  17. ResInstance := FindResourceHInstance(HInstance);
  18. AStream := TResourceStream.Create(HInstance, AName, RT_RCDATA);
  19. try
  20. AList := TStringList.Create;
  21. try
  22. AList.LoadFromStream(AStream);
  23. Result := AList.Text;
  24. finally
  25. AList.Free;
  26. end;
  27. finally
  28. AStream.Free;
  29. end;
  30. end;
  31. end.