Solved

Dialog Box - Buffer Overflow Error

Posted on 2003-11-26
2
406 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

758 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now