with.vb

来自「FastScript 1.94 Full Source」· VB 代码 · 共 40 行

VB
40
字号
' FastScript v1.0          
' With operator demo       


dim f, b


sub ButtonClick(Sender)
  ShowMessage(Sender.Name)
  f.ModalResult = mrOk
end sub

sub ButtonMouseMove(Sender)
  b.Caption = "moved over"
end sub



  f = new TForm(nil)
  with f
    Caption = "Test it!"
    BorderStyle = bsDialog
    Position = poScreenCenter
  end with

  b = new TButton(f)
  with b
    Name = "Button1"
    Parent = f
    SetBounds(10, 10, 75, 25)
    Caption = "Test"

    OnClick = AddressOf ButtonClick
    OnMouseMove = AddressOf ButtonMouseMove
  end with

  f.ShowModal
  delete f

⌨️ 快捷键说明

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