Click here to Skip to main content
15,885,842 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Visual Basic Pin
Peter_in_27805-Jan-17 18:07
professionalPeter_in_27805-Jan-17 18:07 
GeneralRe: Visual Basic Pin
DrBones6928-Jan-17 21:04
professionalDrBones6928-Jan-17 21:04 
AnswerRe: Visual Basic Pin
NEBIRE15-Jan-17 9:31
NEBIRE15-Jan-17 9:31 
GeneralRe: Visual Basic Pin
DrBones6928-Jan-17 21:06
professionalDrBones6928-Jan-17 21:06 
QuestionHow to detect what serial port is used when an arduino is plugged in and how to use this serial port data to control maglocks Pin
Member 1291689329-Dec-16 17:12
Member 1291689329-Dec-16 17:12 
AnswerRe: How to detect what serial port is used when an arduino is plugged in and how to use this serial port data to control maglocks Pin
Chris Quinn29-Dec-16 20:39
Chris Quinn29-Dec-16 20:39 
AnswerRe: How to detect what serial port is used when an arduino is plugged in and how to use this serial port data to control maglocks Pin
Ralf Meier31-Dec-16 1:22
mveRalf Meier31-Dec-16 1:22 
QuestionProblem Setting OpenFileDialog.InitialDirectory Pin
Alan Burkhart29-Dec-16 4:52
Alan Burkhart29-Dec-16 4:52 
Using Win 7 / Winforms / VS 2013 / VB.net
My application stores the last several visited directories in the File menu. But when I click an item in the drop-down to set the .InitialDirectory property the OpenFileDialog just goes back to the last directory viewed. I don't need to store a specific file name, I just need the dialog to open in the desired directory. I've checked the text of the menu items and it's all correct. I also tried hard-coding a directory name and it still goes back to the first directory opened during the session. Code is below:
VB
ofd.InitialDirectory = e.ClickedItem.Text
cntxMenu.Close()
res = ofd.ShowDialog
If res = Windows.Forms.DialogResult.OK Then
   PopulateListview(ofd.FileName)
End If

Don't know if this is related: This is a ContextMenuStrip that opens when a button is clicked. There are two items with dropdowns. One is a zoom menu that works fine. But with the recent directories menu, I have to close it with cntxMenu.Close(). Otherwise it remains visible on top of the OpenFileDialog.

What am I doing wrong here?
Sometimes the true reward for completing a task is not the money, but instead the satisfaction of a job well done. But it's usually the money.

GeneralRe: Problem Setting OpenFileDialog.InitialDirectory Pin
Richard MacCutchan29-Dec-16 5:43
mveRichard MacCutchan29-Dec-16 5:43 
GeneralRe: Problem Setting OpenFileDialog.InitialDirectory Pin
Alan Burkhart29-Dec-16 6:11
Alan Burkhart29-Dec-16 6:11 
AnswerRe: Problem Setting OpenFileDialog.InitialDirectory Pin
Ralf Meier31-Dec-16 1:29
mveRalf Meier31-Dec-16 1:29 
GeneralRe: Problem Setting OpenFileDialog.InitialDirectory Pin
Alan Burkhart31-Dec-16 5:16
Alan Burkhart31-Dec-16 5:16 
GeneralRe: Problem Setting OpenFileDialog.InitialDirectory Pin
Member 128864681-Mar-18 22:07
Member 128864681-Mar-18 22:07 
GeneralRe: Problem Setting OpenFileDialog.InitialDirectory Pin
Alan Burkhart2-Mar-18 6:12
Alan Burkhart2-Mar-18 6:12 
QuestionHow to read listview data in to a report Pin
RedRocket201621-Dec-16 8:59
RedRocket201621-Dec-16 8:59 
AnswerRe: How to read listview data in to a report Pin
Eddy Vluggen23-Dec-16 2:50
professionalEddy Vluggen23-Dec-16 2:50 
Questionreload listview of parent form from user control vb.net Pin
l3ugs.l3unny18-Dec-16 17:57
l3ugs.l3unny18-Dec-16 17:57 
AnswerRe: reload listview of parent form from user control vb.net Pin
Dave Kreskowiak19-Dec-16 6:47
mveDave Kreskowiak19-Dec-16 6:47 
QuestionMy demo reports program gives error[SOLVED] Pin
tacbanon18-Dec-16 15:41
tacbanon18-Dec-16 15:41 
QuestionHow to View two different report (Crystal Report) in one view ? Pin
Hermawan2615-Dec-16 19:40
Hermawan2615-Dec-16 19:40 
AnswerRe: How to View two different report (Crystal Report) in one view ? Pin
Afzaal Ahmad Zeeshan15-Dec-16 23:13
professionalAfzaal Ahmad Zeeshan15-Dec-16 23:13 
GeneralRe: How to View two different report (Crystal Report) in one view ? Pin
Hermawan2616-Dec-16 16:06
Hermawan2616-Dec-16 16:06 
QuestionNative Compiler for VB Pin
rkinning13-Dec-16 15:39
rkinning13-Dec-16 15:39 
AnswerRe: Native Compiler for VB Pin
Dave Kreskowiak13-Dec-16 17:39
mveDave Kreskowiak13-Dec-16 17:39 
GeneralRe: Native Compiler for VB Pin
rkinning14-Dec-16 5:40
rkinning14-Dec-16 5:40 

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.