Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Dialog Box - Buffer Overflow Error

Posted on 2003-11-26
2
409 Views
Last Modified: 2010-05-01
I have a VB.NET app in which I am trying to provide the ability to select a directory to which you would like to save data.

The code for this is below:

Me.FolderBrowserDialog1.Description = _
            "Select the directory that you want to use As the default."

        If FolderBrowserDialog1.ShowDialog() = DialogResult.OK Then
            txtCardLoc.Text = FolderBrowserDialog1.SelectedPath
        End If

When I run the code I get the following error:

An unhandled exception of type 'System.StackOverflowException' occurred in system.windows.forms.dll

Please help.  The microsoft documentation seems to show the same basic method for this functionality.  Is there something else that I am supposed to reference or a component I need to add?
0
Comment
Question by:BodeTech
2 Comments
 
LVL 15

Accepted Solution

by:
SRigney earned 250 total points
ID: 9825973
This can happen when you have a recursive call and doen't know it.

What is the name of the function that this code is in?
0
 

Author Comment

by:BodeTech
ID: 9826469
You were correct, I had the function happening on "GotFocus" and that was being called over and over and over and over...etc.

Thanks for the help!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question