FreeFile 関数 vb.net入門

FreeFile 関数

FreeFile 関数はファイルナンバーで使用されてない最小の番号を返します。

構文
FreeFile()


ソース
Public Class Form1

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
FileOpen(1, “C:\Users\user\Desktop\hoge.txt”, OpenMode.Input)
MsgBox(FreeFile())
FileClose()
End Sub
End Class

実行結果は
2を返します。

シェアする

  • このエントリーをはてなブックマークに追加

フォローする

Translate »