|
|
|
Are you using the mysql data provider for .net or odbc
a programmer traped in a thugs body
|
|
|
|
|
I am writing a Windows Service that I may have to install more than one instance of per computer. Is there a way to change the DisplayName property and default install location using user provided information in ServiceInstaller project during install time?
Chandhu
|
|
|
|
|
chandhuBTS wrote: I am writing a Windows Service that I may have to install more than one instance of per computer. Is there a way to change the DisplayName property and default install location using user provided information in ServiceInstaller project during install time?
If the ServiceInstaller produces an MSI (Windows Installer) then it is very likely the MSI can be changed. Using Visual Studio to do that may not be possible, it may require using a different tool.
The most likely observation about your scenario is that you are wrong about needing to install the service module more than once on single computer. I highly recommend that you double check your analysis and conclusion regarding that issue.
|
|
|
|
|
|
Calin Tatar wrote: There is an MSI editor, called Orca.
Did you mean to tell the original poster that? I first used Orca about 5 years ago. However given the OPs apparent lack of experience with MSI databases I did not consider working with the raw tables a viable choice for them. I certainly could be wrong about that.
|
|
|
|
|
Yes, I said about Orca because you specified about using a different tool. If the original poster will choose to change the installer, as you told him, he will know what tool to use.
Calin
|
|
|
|
|
I have the SaveFileDialog set up to save .txt files. When I try to save a file with a different extension .jpg. It goes ahead and saves it in .jpg format. AddExtension does not append the .txt extension to the file name.
Please help.
|
|
|
|
|
Hi,
It's actually doing what it is supposed to do. The extension is only added if one is not present.
e.g.
myfile -> myfile.txt
myfile.txt -> myfile.txt
myfile.jpg -> myfile.jpg
Alan
|
|
|
|
|
Shouldn't the extension added to the file depend on the currently selected file filter. The filter in this case is .txt.
|
|
|
|
|
sarithasj wrote: Shouldn't the extension added to the file depend on the currently selected file filter. The filter in this case is .txt.
Shouldn't you be checking what the documentation says about it?
as in "Gets or sets a value indicating whether a file dialog automatically adds an extension to a filename if the user omits an extension."
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hello Friends
i need help, i m using picture box for drawing the graph. so for that i m using paint event of picture box to draw an image. but problem is that when i minimize the window or any other window come on top then the image gets lost.
So wht should i do so that i can get my image afain after maximizng the window
And one more thing that is it possible to store the picture box image in any other object.
Thanking You All !
Avinash Patil
|
|
|
|
|
Hi,
Typically the PictureBox is used to display graphics from a bitmap, metafile, icon, JPEG, GIF, or PNG file. I think you need a graphing control. You may want to look into http://www.codeproject.com/KB/graphics/zedgraph.aspx[^] which I've seen recommended on this forum previously.
Alan.
|
|
|
|
|
Whenever an event occurs that may disrupt the graphics of the picturebox, be sure to call picturebox1.Invalidate(). This will for the picture to repaint itself. If you are doing custom paint routines it is usually recommended that you create a new custom user control.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Hello Thomas
Thanks for replyng
Actually problem is that, i want to store the image of picture box in a object so that when it gets repainted because of minimization of picture box or any other window comes above it. So that it will reduce the time to redraw it. And one more thing to tell that while drawing in the picture box, there are near about 400000 points. and because of that its taking so much time.
Regards
Avinash Patil
avinashpatil3484@gmail.com
|
|
|
|
|
you could assign the contents of the picture box to a Bitmap Object...
manipulate the Bitmap object via setpixel and getpixel
and the assign it back to the Picturebox
Does this help?
|
|
|
|
|
I need to do something simliar to what you did. I can get the service installed and running but my timer is not firing.The OnStart and OnStop code is firing ok so i know the service is running.
I am using vs.net 2005 btw
Chandhu
|
|
|
|
|
What are you talking about ?
|
|
|
|
|
Hi Guys
I am working on a WinForm Project (VSS2008) with SQL Reporting Services (SQL Server 2005). I have multiple reports that need to be printed ad-hoc. So far, I have placed each report into a seperate windows form and render the report within this form. Once referenced, these forms can be called from anywhere in the project using the Form.ShowDialog() method. Once the form is rendered I call ReportViewer.PrintDialog() to pop up the print dialog. This all works fine.
The Developement Specs asks for the form to be printed automatically. That means then when the form is called, it must render and bypass the print dialog, and then print the report (.rdlc) automatically. I have been struggling with this for a while now. I am still new to development and hope that someone can help me.
Basically, is there an easy way to programmatically trigger a Report Print (like clicking print on the Print Dialog) once the report has been rendered?
Thanks is advance.
|
|
|
|
|
I am working on a gaming project. The code has been migrated from .Net 1.0 to .Net 2.0.
I am using Sdldotnet in this project. Sometimes when action was not complete, the game crashes and error message is shown "Send or Don't Send". The error is
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Suggest me something that helps me out of this.
Thanks in advance.
Prateek
|
|
|
|
|
Looks like an authorized access taking place. Bad news for you is, it can be due to anything and you would have to debug it. If you can reproduce the steps of the crash then your lucky(you have some lead) or else add try/catch in your main and see if the stack trace helps in providing some lead!!
|
|
|
|
|
I'm probably missing something obvious, but here's my problem:
I'm using VB.net to deal with large text files (mostly vertical lists and some used as data sources). When I save the file from my app, I end up with a blank line added to the end of the file (File.WriteAllLines...) because of the line terminator from what should have been the last line. I need to eliminate this.
If I use "File.WriteAllText" or "StreamWriter.Write(String)" the extra line is eliminated, but MS NotePad then renders the file as one long string of text (NoteTab and my own app render it properly).
If I use StreamWriter.WriteLine in a loop (thru the lines of the RTB) - it works okay for small files. But some of the lists I'm working with here have thousands of lines and this takes forever. The largest file to date has 80,847 lines.
I'm thinking this should be easy to solve, but I've not solved it. I just need to write the contents of a RichTextBox to a file with no extra blank line at the end, and in a manner that all Windows text editors (including NotePad) can properly read. I'm not doing anything fancy or complicated here, just editing text.
|
|
|
|
|
richTextBox1.LoadFile("test.txt", RichTextBoxStreamType.PlainText);
richTextBox1.SaveFile("test1.txt", RichTextBoxStreamType.PlainText);
When I load and save a file using the above code I create an identical copy. If you don't see the same then any editing you are doing must be adding the extra line.
Alan.
|
|
|
|
|
Thanks Alan.
Not sure this will help me. I may have an issue with chr encodings going this route. Didn't think about this simply because I hadn't used it in a long time. Will give it a whirl.
|
|
|
|