473,378 Members | 1,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

FolderBrowserDialog and my program staying in memory....

I've noticed that my program executable remains in the process list if at
any stage my program has shown a FolderBrowserDialog. I am calling .Dipose
on the dialog after use. This does not happen when I go through the code
paths that do not create and display this dialog. Is the folder browser
hanging onto something that is holding the rest of my program active on the
task list?

Any help would be appreciated :)

Thanks.
Nov 21 '05 #1
5 1937
Robin,

I even does not know if this answers your question. However the
folderbrowserdialog has a bug with long paths if the latest Net1.1 service
pack is not loaded.

Therefore maybe can that be the error.

Cor
Nov 21 '05 #2
No, I have 1.1 SP 1 installed at the moment. I have tried calling
"Application.Exit" to no avail. I'm guessing one of the folder browser
controls is running a thread that is refusing to die - err, I don't think
it's an out of process control, although it might be. Anyway. For what
reason I don't know - this is totally unacceptable because it leaves my
program around in memory! Agh!

Interestingly though, try this and see if it does the same for you - I
created a tiny noddy application with one button on a form. When you don't
click the button and exit, the process leaves memory, when you click the
button and show a folder browser dialog, then exit the dialog and then exit
the program, it stays in memory (on my PC at least). What gives!?
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(48, 24)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(192, 64)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Show Dialog"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(584, 341)
Me.Controls.Add(Me.Button1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim theDialog As New FolderBrowserDialog
theDialog.SelectedPath =
Environment.GetFolderPath(Environment.SpecialFolde r.Desktop)
theDialog.ShowDialog()

theDialog.Dispose()
End Sub
End Class
"Cor Ligthert" <no************@planet.nl> wrote in message
news:OQ*************@tk2msftngp13.phx.gbl...
Robin,

I even does not know if this answers your question. However the
folderbrowserdialog has a bug with long paths if the latest Net1.1 service
pack is not loaded.

Therefore maybe can that be the error.

Cor

Nov 21 '05 #3
..... and indeed, this behaviour is seen on my software managers PC and our
test PC - so it seems to be fairly consistent and is probably not related to
my specific pc setup...... :/

"Robin Tucker" <id*************************@reallyidont.com> wrote in
message news:d8*******************@news.demon.co.uk...
No, I have 1.1 SP 1 installed at the moment. I have tried calling
"Application.Exit" to no avail. I'm guessing one of the folder browser
controls is running a thread that is refusing to die - err, I don't think
it's an out of process control, although it might be. Anyway. For what
reason I don't know - this is totally unacceptable because it leaves my
program around in memory! Agh!

Interestingly though, try this and see if it does the same for you - I
created a tiny noddy application with one button on a form. When you
don't click the button and exit, the process leaves memory, when you click
the button and show a folder browser dialog, then exit the dialog and then
exit the program, it stays in memory (on my PC at least). What gives!?
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(48, 24)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(192, 64)
Me.Button1.TabIndex = 0
Me.Button1.Text = "Show Dialog"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(584, 341)
Me.Controls.Add(Me.Button1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim theDialog As New FolderBrowserDialog
theDialog.SelectedPath =
Environment.GetFolderPath(Environment.SpecialFolde r.Desktop)
theDialog.ShowDialog()

theDialog.Dispose()
End Sub
End Class
"Cor Ligthert" <no************@planet.nl> wrote in message
news:OQ*************@tk2msftngp13.phx.gbl...
Robin,

I even does not know if this answers your question. However the
folderbrowserdialog has a bug with long paths if the latest Net1.1
service pack is not loaded.

Therefore maybe can that be the error.

Cor


Nov 21 '05 #4
Robin,

Assuming that you look in taskmanager than I see the program start. Than
clicking the button the folderbrowswer is showed, when I close that or say
ok, click on the close from the form than the program is gone from the
taskmanager.

If I misunderstood you. I stop now, so if you reply, than I will not see it
for tomorrow.

Cor
Nov 21 '05 #5

Okay heres the odd thing:

I downloaded and incorperated the wrapper found at
http://www.gotdotnet.com/team/vb/FolderBrowser.exe, (which is really to use
with .NET 1.0) and hey presto, I no longer have my program hanging around in
my task list.

I guess the MS wrapper is bugged :/


"Cor Ligthert" <no************@planet.nl> wrote in message
news:OQ*************@tk2msftngp13.phx.gbl...
Robin,

I even does not know if this answers your question. However the
folderbrowserdialog has a bug with long paths if the latest Net1.1 service
pack is not loaded.

Therefore maybe can that be the error.

Cor

Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Anja | last post by:
I have installed the new Visual Studio 2003 and implemented the FolderBrowserDialog. Everything works fine, if I open the FolderBrowserDialog before opening a Database Connection. If I open...
25
by: | last post by:
Hi, The following code shows the FolderBrowserDialog = broken. FolderBrowserDialog folderDialog = new FolderBrowserDialog(); folderDialog.ShowNewFolderButton = false;...
2
by: JohnR | last post by:
Wow, this is unbelieveable. I've narrowed it down to a few lines of code. Create a new project in VB.NET and put 2 buttons on it (a FBD button and an EXIT button) and enter these lines for the...
9
by: hhh12347 | last post by:
FolderBrowserDialog crashes on my Windows 2000 computer. Here is a C# test program: using System; using System.Windows.Forms; public class TestForm : Form { FolderBrowserDialog...
6
by: JohnR | last post by:
Wow, this is unbelieveable. I've narrowed it down to a few lines of code. Create a new project in VB.NET and put 2 buttons on it (a FBD button and an EXIT button) and enter these lines for the...
12
by: JohnR | last post by:
I have narrowed a problem down to a simple example. A form with two buttons. One EXIT and one FBD. The exit button does an "END" to end the application. The FBD button does a...
3
by: Trevor | last post by:
I need to find a way to see if the user clicked cancel on a FolderBrowserDialog. Thanks for any help. Trevor From http://www.developmentnow.com/g/38_0_0_0_0_0/dotnet-languages-vb.htm Posted...
4
by: hotmit | last post by:
I'm trying to create a program that dynamicly saves and loads path of a FolderBrowserDialog , but I ran into a problem. Since FolderBrowserDialog is not a Control, therefore it doesn't have...
3
by: ImageAnalyst | last post by:
I'm trying to have the user browse to a folder, once they click a button, using the standard FolderBrowserDialog tool, System.Windows.Forms.FolderBrowserDialog. I'm using VB.Net 2005. There is a...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.