Click here to Skip to main content

Visual Basic

 
GeneralRe: WndProc does not work in Windows CE 5.0 PinmemberMember 989133411-Apr-13 4:49 
GeneralRe: WndProc does not work in Windows CE 5.0 Pinmemberdusty_dex11-Apr-13 5:09 
GeneralRe: WndProc does not work in Windows CE 5.0 PinmemberMember 989133411-Apr-13 5:15 
GeneralRe: WndProc does not work in Windows CE 5.0 Pinmemberdusty_dex11-Apr-13 5:55 
QuestionSaveFileDialog.ShowDialog() return value Pinmemberecony9-Apr-13 10:06 
AnswerRe: SaveFileDialog.ShowDialog() return value PinmvpEddy Vluggen9-Apr-13 10:36 
GeneralRe: SaveFileDialog.ShowDialog() return value Pinmemberecony9-Apr-13 10:39 
GeneralRe: SaveFileDialog.ShowDialog() return value PinmvpEddy Vluggen9-Apr-13 10:59 
GeneralRe: SaveFileDialog.ShowDialog() return value PinmemberJohnny J.17-Apr-13 2:40 
GeneralRe: SaveFileDialog.ShowDialog() return value PinmvpEddy Vluggen17-Apr-13 2:53 
GeneralRe: SaveFileDialog.ShowDialog() return value PinmemberJohnny J.17-Apr-13 2:54 
AnswerRe: SaveFileDialog.ShowDialog() return value PinmvpRichard MacCutchan9-Apr-13 10:46 
GeneralRe: SaveFileDialog.ShowDialog() return value Pinmemberecony9-Apr-13 16:22 
QuestionWhat is the function of Filedialog.RestoreDirectory Pinmemberecony9-Apr-13 7:46 
In MSDN forum, it explains that:
the RestoreDirectory property to ensure that the current directory is restored when the dialog box is closed.
 
But I tried the example code, I can't find the difference between
RestoreDirectory = true or RestoreDirectory = false.
  
 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
 
        Dim myStream As Stream = Nothing
        Dim openFileDialog1 As New OpenFileDialog()
 
        openFileDialog1.InitialDirectory = "c:\"
        openFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*"
        openFileDialog1.FilterIndex = 2
        openFileDialog1.RestoreDirectory = False
 
        If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
            Try
                myStream = openFileDialog1.OpenFile()
                If (myStream IsNot Nothing) Then
                    ' Insert code to read the stream here. 
                End If
            Catch Ex As Exception
                MessageBox.Show("Cannot read file from disk. Original error: " & Ex.Message)
            Finally
                ' Check this again, since we need to make sure we didn't throw an exception on open. 
                If (myStream IsNot Nothing) Then
                    myStream.Close()
                End If
            End Try
        End If
    End Sub
 

AnswerRe: What is the function of Filedialog.RestoreDirectory PinmvpRichard MacCutchan9-Apr-13 7:59 
GeneralRe: What is the function of Filedialog.RestoreDirectory Pinmemberecony9-Apr-13 8:05 
GeneralRe: What is the function of Filedialog.RestoreDirectory PinmvpRichard MacCutchan9-Apr-13 8:23 
GeneralRe: What is the function of Filedialog.RestoreDirectory PinprofessionalKenneth Haugland9-Apr-13 9:18 
GeneralRe: What is the function of Filedialog.RestoreDirectory PinmvpDave Kreskowiak9-Apr-13 12:36 
GeneralRe: What is the function of Filedialog.RestoreDirectory PinmvpRichard MacCutchan9-Apr-13 12:47 
AnswerRe: What is the function of Filedialog.RestoreDirectory PinmemberAlan N9-Apr-13 10:43 
AnswerRe: What is the function of Filedialog.RestoreDirectory PinmvpRichard MacCutchan9-Apr-13 23:32 
QuestionHow to check if one button is active [ solved ] [modified] Pinmemberecony9-Apr-13 6:30 
AnswerRe: How to check if one button is active PinmvpDave Kreskowiak9-Apr-13 12:39 
GeneralRe: How to check if one button is active Pinmemberecony9-Apr-13 16:24 
QuestionButton text related to click event [solved] [modified] Pinmemberecony9-Apr-13 4:59 
AnswerRe: Button text related to click event PinprofessionalKenneth Haugland9-Apr-13 5:26 
GeneralRe: Button text related to click event Pinmemberecony9-Apr-13 6:06 
AnswerRe: Button text related to click event PinmemberDavid Mujica9-Apr-13 5:26 
QuestionTime in and time out windows form in vb.net PinmemberNOORULLA KHAN9-Apr-13 0:16 
Question[SOLVED] Word 2010 VBA - Change font color by RGB by find and replace [modified] PinmemberBart Van Eyndhoven8-Apr-13 23:31 
AnswerRe: Word 2010 VBA - Change font color by RGB by find and replace PinprofessionalKenneth Haugland9-Apr-13 3:01 
GeneralRe: Word 2010 VBA - Change font color by RGB by find and replace PinmemberBart Van Eyndhoven9-Apr-13 4:42 
GeneralRe: Word 2010 VBA - Change font color by RGB by find and replace PinmemberBart Van Eyndhoven9-Apr-13 22:07 
Questionconversion to exe Pinmemberkarthick.RR8-Apr-13 22:12 
QuestionRe: conversion to exe PinmvpRichard MacCutchan8-Apr-13 22:25 
QuestionFileNotFoundExpection Error! PinmemberMember 99702866-Apr-13 23:59 
AnswerRe: FileNotFoundExpection Error! PinprofessionalKenneth Haugland7-Apr-13 2:21 
QuestionShare local/network printer [modified] PinmemberRobert Kadar5-Apr-13 5:09 
AnswerRe: Share local/network printer PinmvpEddy Vluggen5-Apr-13 8:12 
AnswerRe: Share local/network printer PinmemberBernhard Hiller7-Apr-13 22:00 
QuestionPlease help me, this program does not work. PinmemberZubair Khalid4-Apr-13 21:44 
AnswerRe: Please help me, this program does not work. PinmemberTim Carmichael5-Apr-13 4:08 
AnswerRe: Please help me, this program does not work. PinmvpEddy Vluggen5-Apr-13 8:10 
JokeRe: Please help me, this program does not work. PinprofessionalMycroft Holmes7-Apr-13 0:31 
GeneralRe: Please help me, this program does not work. PinmvpEddy Vluggen7-Apr-13 7:51 
QuestionArgumentOutOfRangeException PinmemberIgaBaro4-Apr-13 18:51 
AnswerRe: ArgumentOutOfRangeException Pinmemberfrazzle-me5-Apr-13 6:55 
Questionsearch a excel document Pinmemberstaticstate2-Apr-13 8:00 
AnswerRe: search a excel document PinmemberKenneth Haugland2-Apr-13 10:13 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.150129.1 | Last Updated 30 Jan 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid