Click here to Skip to main content
15,867,686 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionWhat is the function of Filedialog.RestoreDirectory Pin
econy9-Apr-13 6:46
econy9-Apr-13 6:46 
AnswerRe: What is the function of Filedialog.RestoreDirectory Pin
Richard MacCutchan9-Apr-13 6:59
mveRichard MacCutchan9-Apr-13 6:59 
GeneralRe: What is the function of Filedialog.RestoreDirectory Pin
econy9-Apr-13 7:05
econy9-Apr-13 7:05 
GeneralRe: What is the function of Filedialog.RestoreDirectory Pin
Richard MacCutchan9-Apr-13 7:23
mveRichard MacCutchan9-Apr-13 7:23 
GeneralRe: What is the function of Filedialog.RestoreDirectory Pin
Kenneth Haugland9-Apr-13 8:18
mvaKenneth Haugland9-Apr-13 8:18 
GeneralRe: What is the function of Filedialog.RestoreDirectory Pin
Dave Kreskowiak9-Apr-13 11:36
mveDave Kreskowiak9-Apr-13 11:36 
GeneralRe: What is the function of Filedialog.RestoreDirectory Pin
Richard MacCutchan9-Apr-13 11:47
mveRichard MacCutchan9-Apr-13 11:47 
AnswerRe: What is the function of Filedialog.RestoreDirectory Pin
Alan N9-Apr-13 9:43
Alan N9-Apr-13 9:43 
It's all a bit confusing as RestoreDirectory does not affect the file dialog's initial directory. What RestoreDirectory is restoring is the program's current directory as reported by Environment.CurrentDirectory. If RestoreDirectory is true then Environment.CurrentDirectory is not affected by any browsing undertaken within the file dialogs.

As for the directory where the file dialog opens that depends.
If InitialDirectory is not set then the directory stored in the LastVisitedMRU registry key is used or if that directory is not available then it's the current directory.

For Windows XP LastVisitedMRU is at HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\LastVisitedMRU where per application settings are stored. The registry key values contain a pair of null terminated Unicode strings, the first being the application name and the second the last visited directory.

Alan.
AnswerRe: What is the function of Filedialog.RestoreDirectory Pin
Richard MacCutchan9-Apr-13 22:32
mveRichard MacCutchan9-Apr-13 22:32 
QuestionHow to check if one button is active [ solved ] Pin
econy9-Apr-13 5:30
econy9-Apr-13 5:30 
AnswerRe: How to check if one button is active Pin
Dave Kreskowiak9-Apr-13 11:39
mveDave Kreskowiak9-Apr-13 11:39 
GeneralRe: How to check if one button is active Pin
econy9-Apr-13 15:24
econy9-Apr-13 15:24 
QuestionButton text related to click event [solved] Pin
econy9-Apr-13 3:59
econy9-Apr-13 3:59 
AnswerRe: Button text related to click event Pin
Kenneth Haugland9-Apr-13 4:26
mvaKenneth Haugland9-Apr-13 4:26 
GeneralRe: Button text related to click event Pin
econy9-Apr-13 5:06
econy9-Apr-13 5:06 
AnswerRe: Button text related to click event Pin
David Mujica9-Apr-13 4:26
David Mujica9-Apr-13 4:26 
QuestionTime in and time out windows form in vb.net Pin
NOORULLA KHAN8-Apr-13 23:16
NOORULLA KHAN8-Apr-13 23:16 
Question[SOLVED] Word 2010 VBA - Change font color by RGB by find and replace Pin
Bart Van Eyndhoven8-Apr-13 22:31
Bart Van Eyndhoven8-Apr-13 22:31 
AnswerRe: Word 2010 VBA - Change font color by RGB by find and replace Pin
Kenneth Haugland9-Apr-13 2:01
mvaKenneth Haugland9-Apr-13 2:01 
GeneralRe: Word 2010 VBA - Change font color by RGB by find and replace Pin
Bart Van Eyndhoven9-Apr-13 3:42
Bart Van Eyndhoven9-Apr-13 3:42 
GeneralRe: Word 2010 VBA - Change font color by RGB by find and replace Pin
Bart Van Eyndhoven9-Apr-13 21:07
Bart Van Eyndhoven9-Apr-13 21:07 
Questionconversion to exe Pin
karthick.RR8-Apr-13 21:12
karthick.RR8-Apr-13 21:12 
QuestionRe: conversion to exe Pin
Richard MacCutchan8-Apr-13 21:25
mveRichard MacCutchan8-Apr-13 21:25 
QuestionFileNotFoundExpection Error! Pin
Member 99702866-Apr-13 22:59
Member 99702866-Apr-13 22:59 
AnswerRe: FileNotFoundExpection Error! Pin
Kenneth Haugland7-Apr-13 1:21
mvaKenneth Haugland7-Apr-13 1:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.