473,385 Members | 1,582 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,385 software developers and data experts.

Is this a VB.Net 2003 Bug??

I'm running VB.Net 2003 & I think that I have found
a .Net BUG!!!

If I invoke the OpenFileDialog in my application, neither
the SOAPFormatter nor the BinaryFormatter will write the
output file when the application closes.

If I manually edit the textbox, instead of using the
OpenFileDialog, either the SOAPFormatter or the
BinaryFormatter will write the outputfile when the
application closes.

The OpenFileDialog is invoked from by double clicking a
picture box, pbPict. Here is the event handler for the
picture box.

Private Sub pbPict_DoubleClick(ByVal sender _
As Object, ByVal e As System.EventArgs) _
Handles pbPict.DoubleClick
If jpgDialog.ShowDialog = DialogResult.OK Then
tbFileName.Text = jpgDialog.FileName
End If
End Sub

I have made two previous submissions to this newsgroup on
this problem. Because of the previous discussions I have
reduced the application down to the essentials that
produce the error.

Any insight would be greatly appreciated, GrandpaB
Nov 21 '05 #1
5 1954
I was just playing around with the FolderBrowserDialog and was getting odd
behaviour on exiting my app.

I found that instead of adding the dialog via the designer, if I created it
in the routine that I was using it in, and disposed of it when I had
finished with it, the fault no longer occurred. I had other problems with it
though such as it allowing me to select a Network Path and then giving me
the error "The given path's format is not supported." when I tried to use
it, but I can work around that.

Does this do the same for you?

Private Sub pbPict_DoubleClick(ByVal sender _
As Object, ByVal e As System.EventArgs) _
Handles pbPict.DoubleClick
Dim jpgDialog As New OpenFileDialog
jpgDialog.Filter = "JPEG files|*.jpg"
If jpgDialog.ShowDialog = DialogResult.OK Then
tbFileName.Text = jpgDialog.FileName
End If
jpgDialog.Dispose()
End Sub

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"GrandpaB" <an*******@discussions.microsoft.com> wrote in message
news:1b****************************@phx.gbl...
I'm running VB.Net 2003 & I think that I have found
a .Net BUG!!!

If I invoke the OpenFileDialog in my application, neither
the SOAPFormatter nor the BinaryFormatter will write the
output file when the application closes.

If I manually edit the textbox, instead of using the
OpenFileDialog, either the SOAPFormatter or the
BinaryFormatter will write the outputfile when the
application closes.

The OpenFileDialog is invoked from by double clicking a
picture box, pbPict. Here is the event handler for the
picture box.

Private Sub pbPict_DoubleClick(ByVal sender _
As Object, ByVal e As System.EventArgs) _
Handles pbPict.DoubleClick
If jpgDialog.ShowDialog = DialogResult.OK Then
tbFileName.Text = jpgDialog.FileName
End If
End Sub

I have made two previous submissions to this newsgroup on
this problem. Because of the previous discussions I have
reduced the application down to the essentials that
produce the error.

Any insight would be greatly appreciated, GrandpaB

Nov 21 '05 #2
Mick,

Thanks for your reply. I'm glad to hear that I'm not the
only one who has experienced wierd results.

I pasted your code into my aplication, but unfortunately
the error remains.

GrandpaB
-----Original Message-----
I was just playing around with the FolderBrowserDialog and was getting oddbehaviour on exiting my app.

I found that instead of adding the dialog via the designer, if I created itin the routine that I was using it in, and disposed of it when I hadfinished with it, the fault no longer occurred. I had other problems with itthough such as it allowing me to select a Network Path and then giving methe error "The given path's format is not supported." when I tried to useit, but I can work around that.

Does this do the same for you?

Private Sub pbPict_DoubleClick(ByVal sender _
As Object, ByVal e As System.EventArgs) _
Handles pbPict.DoubleClick
Dim jpgDialog As New OpenFileDialog
jpgDialog.Filter = "JPEG files|*.jpg"
If jpgDialog.ShowDialog = DialogResult.OK Then
tbFileName.Text = jpgDialog.FileName
End If
jpgDialog.Dispose()
End Sub

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"GrandpaB" <an*******@discussions.microsoft.com> wrote in messagenews:1b****************************@phx.gbl...
I'm running VB.Net 2003 & I think that I have found
a .Net BUG!!!

If I invoke the OpenFileDialog in my application, neither the SOAPFormatter nor the BinaryFormatter will write the output file when the application closes.

If I manually edit the textbox, instead of using the
OpenFileDialog, either the SOAPFormatter or the
BinaryFormatter will write the outputfile when the
application closes.

The OpenFileDialog is invoked from by double clicking a
picture box, pbPict. Here is the event handler for the
picture box.

Private Sub pbPict_DoubleClick(ByVal sender _
As Object, ByVal e As System.EventArgs) _
Handles pbPict.DoubleClick
If jpgDialog.ShowDialog = DialogResult.OK Then
tbFileName.Text = jpgDialog.FileName
End If
End Sub

I have made two previous submissions to this newsgroup on this problem. Because of the previous discussions I have reduced the application down to the essentials that
produce the error.

Any insight would be greatly appreciated, GrandpaB

.

Nov 21 '05 #3
"GrandpaB" <an*******@discussions.microsoft.com> schrieb:
If I invoke the OpenFileDialog in my application, neither
the SOAPFormatter nor the BinaryFormatter will write the
output file when the application closes.

If I manually edit the textbox, instead of using the
OpenFileDialog, either the SOAPFormatter or the
BinaryFormatter will write the outputfile when the
application closes.


OpenFileDialog may change the current directory. Did you already try to use
absolute paths with your 'SOAPFormatter' and 'BinaryFormatter'?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4
Herfried,

Eureka, eureka, you found it Mr. MVP. I have not yet
worked out a solution, but the output files have been
written to the same directory from which the images were
opened.

I imagine that I'll have to save the current directory
after I read the data file and restore it before I write
it. The VB texts I read did not mention this detail or
if they did it escaped my attention.

Thankyou, thankyou, thankyou, GrandpaB
Nov 21 '05 #5
"GrandpaB" <an*******@discussions.microsoft.com> schrieb:
Eureka, eureka, you found it Mr. MVP. I have not yet
worked out a solution, but the output files have been
written to the same directory from which the images were
opened.

I imagine that I'll have to save the current directory
after I read the data file and restore it before I write
it. The VB texts I read did not mention this detail or
if they did it escaped my attention.


You may want to set the OpenFileDialog's 'RestoreDirectory' property to
'True'. This will reset the current directory prior to closing the dialog.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #6

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

Similar topics

1
by: David Lee | last post by:
Need some help bad here. Am using VB.Net Standard 2003 supplied for a class and I need to install Msde and the sample databases to work on homework. Following the documentation I can download...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
6
by: David Waz... | last post by:
Moved an app from W/2000 Asp V1.0 to W/2003, VS/2003, ASPV 1.1 Page runs a long job, uploading 2 large fixed length files (300,000 rows) into SQL database. A process is run against the data,...
22
by: EP | last post by:
When running my asp.net hosting service (asp.net without IIS), on server 2003 with IIS not installed, I get the following when trying to process a request. "System.DllNotFoundException: Unable to...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

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.