Jump to content


Photo

Visual Basic: Drag and drop into forms


  • Please log in to reply
1 reply to this topic

#1 Yertsivad

Yertsivad

    Young Padawan

  • Members
  • Pip
  • 28 posts

Posted 24 September 2005 - 07:25 PM

I want to drag a text file into my form and get the file path, so I can open it. I've searched the web to no avial. All I want is to simply get the file path.

#2 AC-Milan

AC-Milan

    Young Padawan

  • Members
  • Pip
  • 98 posts

Posted 31 October 2005 - 01:59 PM

This code will show the file path using OpenFileDialog and label [VB.NET] :
OpenFileDialog1.Filter = "All Files(*.*)|*.*"
OpenFileDialog1.Title = "Enter your title here"
OpenFileDialog1.ShowDialog()
Label1.Text = OpenFileDialog1.FileName()
I hope it can help you also with Visual Basic 6 .




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users