求助delphi几个简单函数的含义(100分)

  • 主题发起人 主题发起人 千里暮云
  • 开始时间 开始时间

千里暮云

Unregistered / Unconfirmed
GUEST, unregistred user!
edit1.selstart:=0;
edit1.sellength:=length(edit1.text);
a:=stroint(inputbox('输入框','请输入第一个数','0');//inputbox函数不知道什么意思
#8,#48,#57都代表什么??

望各位达人多多帮忙!!感激不禁!
如果哪里有介绍delhi函数和上面那些代码的资料希望能给偶留下啊!!
 
#8,ASCII码为8的字符

InputBox,你写一行程序调用就知道了,光说不练是不行了
 
InPutBox执行后就是个简单的对话框:有对话框标题,提示标题 ,和默认值。#8代表删除键
 
Read SelStart to determine the position of the first selected character, where 0 indicates the first character. If there is no selected text, SelStart indicates the position of the cursor. Set SelStart to remove the current selection and position the cursor just before the indicated character.

To select a particular range of the text, first set SelStart to position the cursor, and then set SelLength to extend the selection.
procedure TForm1.FindDialog1Find(Sender: TObject);

var
I, J, PosReturn, SkipChars: Integer;
begin
for I := 0 to Memo1.Lines.Count do
begin
PosReturn := Pos(FindDialog1.FindText,Memo1.Lines);
if PosReturn <> 0 then {found!}
begin
SkipChars := 0;
for J := 0 to I - 1 do
SkipChars := SkipChars + Length(Memo1.Lines[J]);
SkipChars := SkipChars + (I*2);
SkipChars := SkipChars + PosReturn - 1;

Memo1.SetFocus;
Memo1.SelStart := SkipChars;
Memo1.SelLength := Length(FindDialog1.FindText);
Break;
end;
end;

end;

function InputBox(const ACaption, APrompt, ADefault: string): string;
begin
Result := ADefault;
InputQuery(ACaption, APrompt, Result);
end;
#48这些数字代表的是键盘按键,比如回车和换行就是#10,#13
 
多人接受答案了。
 
后退
顶部