0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

smallbasicでファイル選択ダイアログ

Posted at

自前のエクステンションでVBScriptを利用しています。

サンプル

GraphicsWindow.BackgroundColor = "yellow"
button = Controls.AddButton("caption", 300, 200)
Controls.SetButtonCaption(button, "file")
Controls.ButtonClicked = onclick
WC = Text.GetCharacter(34)
CRLF = Text.GetCharacter(13) + Text.GetCharacter(10)
code = ""
code = code + "Function setup(a)" + CRLF
code = code + "  With CreateObject(" + WC + "SAFRCFileDlg.FileOpen" + WC + ") " + CRLF
code = code + "    If .OpenFileOpenDlg Then setup = .FileName" + CRLF
code = code + "  End With" + CRLF
code = code + "End Function" + CRLF

Sub onclick
  a = Class1.VBSrun(code)
  GraphicsWindow.ShowMessage(a, "path")
EndSub
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?