[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Dialog Box - Buffer Overflow Error

Posted on 2003-11-26
2
Medium Priority
?
414 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 1000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month19 days, 1 hour left to enroll

834 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