|
The best method is to move your long running code to a seperate thread and have it report a value for progress. Check out the BackgroundWorker component for examples.
Now, in your existing code, after you Show the form, you have to call Application.DoEvents() so your UI thread has a chance to process the paint messages that will show the form. On top of that, you're also going to have to call DoEvents() after every time you update the progress bar so it can also repaint itself.
|
|
|
|
|
I have my connection string in my app config, however the app config is never generated that I can see...I have checked in my
C:\Documents and Settings\[user name]\Application Data
C:\Documents and Settings\[user name]\Local Settings\Application Data
etc without finding it...This is a setting that will changed depending on the location of the install, but for some reason it is not being generated...the only setting in the app config is this connection string.
Any Ideas?
Thanks in advance
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
The app.config file ends up being called filename.exe.config and is placed in the bin\Release or bin\Debug folder when you build the app.
|
|
|
|
|
For some reason or another when I add some other setting to the config...it shows up at one of the following locations:
C:\Documents and Settings\[user name]\Application Data
C:\Documents and Settings\[user name]\Local Settings\Application Data
however, the connection string setting still is not in the config file, only the other setting is.
I know when I used VS 2003 with .Net 1.1 the config was always in the bin, but this seems to be the case with VS 2005 and .Net 2.0...am I missing something? Is there a setting to specify where the config will be stored that could have somehow been changed?
As a norm, it is stored at the following location:
C:\Documents and Settings\Jose\Application Data\JPI\ZipsCommon.dll_Url_mqtlwffalwh0kpo1fmc3rersrkmtxfev\1.0.0.0\user.config
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Wait a minute. At BUILD time, the config file is stored in the bin\Release or bin\Debug folder.
Are you talking about at deploymnet time with ClickOnce?
There is no option to tell the build process where to put the file at build time.
|
|
|
|
|
The file is usually stored in one of the following locations at deployment:
C:\Documents and Settings\[user name]\Application Data
C:\Documents and Settings\[user name]\Local Settings\Application Data
The problem is that the Connection String does not show up in the config file, only other settings will show up. I wasnt sure if this is because it is scoped at "Application" instead of "User" maybe?
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
I am writing an image resizing program, but I every time I try to save an image I get an error saying "Generic Error In GDI+". I've tried running my app on 3 different computers (2 desktops and 1 laptop all with WinXP and .NET 2.0), and the error only occurs on the laptop. I've looked everywhere for someone with a similar problem, and either it's something irrelevant or no one got an answer. What's going on?
Dim InitialImage As Bitmap = New Bitmap(OpenLocation)
Dim SetImage As Bitmap
SetImage = New Bitmap(InitialImage, New Size(WidthInt, HeightInt))
SetImage.Save(PathName, System.Drawing.Imaging.ImageFormat.Jpeg)
Thanks for the help!
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Apparently from ASP.Net you will get this error when you are using a file
path as a string. If this does not solve your problem then look at security
issues in the Laptop. The ASPNET useraccount may not have permissions to write to disk.
Regards,
Satips.
|
|
|
|
|
Neither of these helped. The account on the laptop has write privileges. Any other ideas?
Thanks.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Yea, I ran into this problem too...this should help...save using the encoder...if it returns nothing...then you will need to use a default encoder...like for a bitmap or something.
Private Shared Function FindImageEncoder(ByVal theImg As Image) As ImageCodecInfo
For Each info As ImageCodecInfo In ImageCodecInfo.GetImageEncoders
If info.FormatID.Equals(theImg.RawFormat.Guid) Then Return info
Next info
Return Nothing
End Function
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Thanks a lot!
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Any time, hope it helps, if not let me know.
Apparently it's not OK to start a bonfire of Microsoft products in the aisles of CompUSA even though the Linuxrulz web site says so
|
|
|
|
|
Dear Group,
Here's what my app is attempting:
1) rename a JPEG file temporarily
2) create a thumbnail for that JPEG
3) save the thumbnail in a separate folder
4) rename the JPEG file back to its original name
1), 2), and 3) work fine. 4) is where I have the problem. My program halts with this error:
"The process cannot access the file because it is being used by another process."
Here's the code:
' Step 1)
My.Computer.FileSystem.RenameFile("TestImage.jpg, _
"TestImage.jpg.working")
' Step 2)
Dim bmpSS As Bitmap
Dim intBW As Integer ' thumbnail width
Dim intBH As Integer ' thumbnail height
Dim bmp As Bitmap = New Bitmap("TestImage.jpg.working")
bmpSS = New Bitmap(250, CInt(bmp.Height / (bmp.Width / 250)), _
Imaging.PixelFormat.Format32bppArgb)
intBW = bmpSS.Width
intBH = bmpSS.Height
Dim g As Graphics = Graphics.FromImage(bmpSS)
g.DrawImage(Bmp, 0, 0, intBW, intBH)
' Step 3)
bmpSS.Save("C:\Temp\TestImage_250.jpg")
g = Nothing
bmp = Nothing
bmpSS = Nothing
' Step 4)
My.Computer.FileSystem.RenameFile("TestImage.jpg.working", _
"TestImage.jpg")
As I said, it all works until it hits step 4). Is there some locking issue that I'm missing here?
Regards,
Steve Erbach
Neenah, WI
http://TheTownCrank.blogspot.com
|
|
|
|
|
serbach wrote: Dim bmp As Bitmap = New Bitmap("TestImage.jpg.working")
You need to call Dispose on this object before you'll be able to rename or overwrite the file in question.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian,
» You need to call Dispose on this object before you'll be able to rename or overwrite the file in question. «
Thank you! That is precisely what I needed!
Sincerely,
Steve Erbach
Neenah, WI
http://TheTownCrank.blogspot.com
|
|
|
|
|
DataSet ds = TextToDataSet.Convert(
"c:\test.txt", "MyNewTable", "\t");
Rekha
|
|
|
|
|
It would look like this:
Dim ds as DataSet = TextToDataSet.Convert("c:\test.txt", "MyNewTable", "\t")
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Actually, there's got to be an error in that C# code. Since the "c:\.." doesn't have the backslash escaped, the "\t" is a tab character.
Here's the VB equivalent via Instant VB, which shows the original problem more clearly:
Dim ds As DataSet = TextToDataSet.Convert("c:" & Constants.vbTab & "est.txt", "MyNewTable", Constants.vbTab)
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
C++ to C# Converter: converts C++ to C#
Instant C++: converts C# to C++/CLI and VB to C++/CLI
Instant Python: converts C# to IronPython and VB to IronPython
|
|
|
|
|
DataSet ds = TextToDataSet.Convert(
"c:\test.txt", "MyNewTable", "\t");
Rekha
|
|
|
|
|
dim ds as dataset = TextToDataSet.Convert("c:\test.txt", "MyNewTable", "\t")
|
|
|
|
|
I would like to know if anyone knows a good source for windows installer conditions. I want to know how to set the condition so that when someone is installing the setup app knows whether the database is already installed and therefore does not copy over the exsisting data
|
|
|
|
|
|
what i need is a website that better explains and examples the syntax for the condition property. Everytime someone on here tells me that its not possible or i need to use this special thing or that i always find a way to do it and prove them wrong. thank you for the info on the custom installer though.
|
|
|
|
|
I am sorry that my answer did not help you totally. What I have noticed in building my latest application is that there are not a lot of resources for the Visual Studio - Windows Installer project. I do not think that many people use it for our of the ordinary installations. My guess is that most people use an InstallShield or Wise.
One site that I go to for installation information (other than Google) is http://www.installsite.org/.
|
|
|
|
|
Hey everyone,
I just figured out how to add custom toolbox controls and I was wondering if anyone had any favorites they'd like to share?
I've tried out XtraNavBar http://www.devexpress.com and also a couple free ones that came with VB 2005 express. I'd like to find some more, now that I know how to use them.
I'd like to create really nice UI's, but I'd also like to find some tools that are network oriented, if anyone knows of anything.
Thanks!
Jim
|
|
|
|