⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mycodefileinfo.txt

📁 文本编辑程序
💻 TXT
字号:
Seths.pas by Seth Taylor

Types:
   TLongArray: Manages a dynamic array of LongInt's for you
   TByteArray: Manages a dynamic array of Byte's for you
   TPointerArray: Manages a dynamic array of Pointer's for you
//To see how to manage these arrays look at the code examples

Procedures/Functions:
   IIF: Similar to VB function IIF, an If statement in the form of a function
   APISetParent: Just the SetParent API declared for you
   StringToInt: Converts Strings to LongInt's without errors if the string is invalid
   APIGetWindowText: Does all the annoying code for you
   SethGetWindowRegion: Creates a window region based off a bitmap you provide, this one is fairly optimized

   BufferString, UnBufferString: Usefull for sending data over a socket
	Example:
private sub TCPOnRead(Sender: TObject; Socket: TCustomWinSocket);
var
  str1, str2: string;
begin

  str2 := socket.ReceiveText;
  repeat
    str1 := UnBufferString(str2).Str;
    str2 := UnBufferString(str2).Extra;
    DecodedRead( str1, Socket );
  until str2 = '';

end;
private sub DecodedRead( strText: string; Socket: TCustomWinSocket);
begin
//Perform actions on recieved data here

//All of these sends can now be debuffered and read in seperate events
   Socket.SendText( BufferString( "I got your send once" ) );
   Socket.SendText( BufferString( "but" ) );
   Socket.SendText( BufferString( "only once" ) );
end; //It's useful to add this code to a component that decends from TClientSocket and TServerSocket


All this code was made by Seth Taylor. Enjoy :-)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -