delphi编写 窗口添加TButton,TLabel,TEdit控件 按钮的单击事件: procedure TForm1.Button1Click(Sender: TObject); var i:integer; begin Label1.Caption:=''; for i:=0 to length(edit1.text) do begin label1.caption:=Label1.Caption+edit1.text[i]+' '; end; end;
Private Sub Command1_Click() Label1.Caption = "" Dim len1, i As Integer len1 = Len(Text1.Text) For i = 1 To len1 Label1.Caption = Label1.Caption & Mid(Text1.Text, i, 1) & " " Next i