Hi I am using OpenFileDialog box in windows form ..How can I give the Initial Directory is in the bin folder ,it never go for any ware in the mycomputer Directory
Private Sub linkTemplate_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles linkTemplate.LinkClicked Dim oImport As New OpenFileDialog() oImport.Title = "Save As" oImport.InitialDirectory = "BeTrans\bin\Debug\"''Hear only i need to Changer the Directory (bin floter) 'oImport.FileName = txtDocEntry.Text oImport.Filter = "Excel Sheet(*.xls)|*.xls|Excel Sheet(*.xlsx)|*.xlsx" oImport.FilterIndex = 1 oImport.RestoreDirectory = True If oImport.ShowDialog() = DialogResult.OK Then 'txtDocEntry.Text = Import.FileName; 'Import(oImport.FileName) Application.DoEvents() End If End Sub
Dim dlg As New OpenFileDialog dlg.InitialDirectory = Application.StartupPath Here Startupath is in Bin folder.. dlg.InitialDirectory = "'Here you can enter you path
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)