Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. openfile dialog box in VB.Net

openfile dialog box in VB.Net

Scheduled Pinned Locked Moved Visual Basic
csharpcsshelpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rubdub
    wrote on last edited by
    #1

    okay i recently made a VB program to allow a user to select a file and open it.. but the thing is..the openfile dialog box opens, it lets user chose a file to open..then wen u click open, nuthin opens! no error message comes but nothing gets opened...do i hav to maybe provide a data grid on the form to open the file? why cant it just open the file in its default environment? say u want to open a .txt file..why wont it open the .txt file in notepad? or do i NEED to provide a data grid on the form? does anyone know how it works? do i need to bind the file to a datagrid?!...Any comments are welcome!!! :) rubdub :)

    D V 2 Replies Last reply
    0
    • R rubdub

      okay i recently made a VB program to allow a user to select a file and open it.. but the thing is..the openfile dialog box opens, it lets user chose a file to open..then wen u click open, nuthin opens! no error message comes but nothing gets opened...do i hav to maybe provide a data grid on the form to open the file? why cant it just open the file in its default environment? say u want to open a .txt file..why wont it open the .txt file in notepad? or do i NEED to provide a data grid on the form? does anyone know how it works? do i need to bind the file to a datagrid?!...Any comments are welcome!!! :) rubdub :)

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      The OpenFiledDialog only tracks which file the user PICKED to open. It will not open the file for you. You have to supply the code to open the file in the way you want. Datagrid's won't help you at all... RageInTheMachine9532

      1 Reply Last reply
      0
      • R rubdub

        okay i recently made a VB program to allow a user to select a file and open it.. but the thing is..the openfile dialog box opens, it lets user chose a file to open..then wen u click open, nuthin opens! no error message comes but nothing gets opened...do i hav to maybe provide a data grid on the form to open the file? why cant it just open the file in its default environment? say u want to open a .txt file..why wont it open the .txt file in notepad? or do i NEED to provide a data grid on the form? does anyone know how it works? do i need to bind the file to a datagrid?!...Any comments are welcome!!! :) rubdub :)

        V Offline
        V Offline
        VBGuruWantabe
        wrote on last edited by
        #3

        Look at the "FileName" property of the "OpenFile" dialog. It will be set to the file path of the choosen file. The "Cancel" button will return a null string in "FileName". If "to err is human", programmers must be superhuman...

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups