Click to See Complete Forum and Search --> : CommonDialog FileOpen
Doug Owen
September 11th, 2001, 06:11 AM
I am new to VB and am having a little difficulty with the common dialog File Open control. Basicly I cant open the selected file. I can get the string however I dont seem to be able to connect the string to the Open button on the Control window.
If I right click on the file and select open the file will open.
Cakkie
September 11th, 2001, 06:43 AM
The commondialog box doesn't do the opening itself, you will have to do that. The common dialog only supplies a graphical interface. After you pressed the open button, check the filename property of the dialog control. This will contain the file you selected.
If you right click on a file, it's default popup will show up, and it is explorer that is opening the file, not the commondialog.
Tom Cannaerts
slisse@planetinternet.be
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
Doug Owen
September 11th, 2001, 08:10 AM
Thanks for the help.
I have tried FileOpen, Documents.Open and others.
I can open a specific document associated with a known application and get the MsgBox but I need a wee bit of code to help me open any file, as one does with explorer.
Cimperiali
September 11th, 2001, 08:19 AM
read carefully:
http://www.mvps.org/vbnet/code/shell/shellexecute.htm
Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Micahel
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.
The Rater
Doug Owen
September 11th, 2001, 08:24 AM
Thanks alot.
Have fun
Doug
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.