アプリ版:「スタンプのみでお礼する」機能のリリースについて

VB6のプログラムを
VB2010にしています。
VB6では
S$ = File1.List(File1.ListIndex)
いいのですが
VB2010ではプレフィックス型にして
strS = FileListBox1.List(FileListbox1.ListIndex)
でエラーになります。

質問者からの補足コメント

  • VB6.0ではFileList内のファイルをダブルクリックすると
    S$ = File1.List(File1.ListIndex)で
    そのファイル名が取得できたのですが。

      補足日時:2016/10/07 15:30
  • VB6.0ではFileList内のファイルをダブルクリックすると
    S$ = File1.List(File1.ListIndex)で
    そのファイル名が取得できたのですが。

      補足日時:2016/10/07 15:30

A 回答 (1件)

strS = FileListBox1.FileName


でどうでしょうか?
    • good
    • 0
この回答へのお礼

Public Class Form1

Private Sub DriveListBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles DriveListBox1.SelectedIndexChanged
DirListBox1.Path = DriveListBox1.Drive
End Sub

Private Sub DirListBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles DirListBox1.SelectedIndexChanged
FileListBox1.Path = DirListBox1.Path
End Sub

Private Sub FileListBox1_SelectedIndexChanged(sender As System.Object, e As System.EventArgs) Handles FileListBox1.SelectedIndexChanged
TextBox1.Text = FileListBox1.FileName
End Sub

Private Sub TextBox1_TextChanged(sender As System.Object, e As System.EventArgs) Handles TextBox1.TextChanged
Dim strS As String

strS = TextBox1.Text
End Sub
End Class

でよかったです。

お礼日時:2016/10/10 17:26

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!