|
use FormClosing or FormClosed event instead. and use e.Cancel=true;
|
|
|
|
|
in the "closing" event of that form put following line
e.cancel = true;
form closing will be cancelled.
Rahul Kulkarni
|
|
|
|
|
|
Application in c# that opens a word file.
The Application included a reference to the Microsoft Word 11.0 Object Library and Microsoft Office 11.0 Object Library.
On computer with word 2003 the application runs ok but on computer with word 2000 got error message:
"Microsoft.Office.Interop.Word
Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Can anyone suggest a solution?
Is there backwards compatibility with the interop assemblies?
Thanks
|
|
|
|
|
AFAIK there is no backwards compatibility.
For Office 2003 its the Microsoft Office 11.0 Object Library
For Office 2002 its the Microsoft Office 10.0 Object Library
and for Office 2000 its Microsoft Office 9.0 Object Library (I think)
|
|
|
|
|
I need to open the word document in all word versions
How can I do that?
|
|
|
|
|
No backwatrd compatibility means you can only open one specific version of Word with a given dll. However, these programs themselves contain backward compatibility, so I recommend to use dll version 11.0 (Word 2003), that way you can open earlier version doc files.
|
|
|
|
|
The application has to support all word versions.
|
|
|
|
|
|
|
Hi all,
we generate xml code with our application and then we create a html document by combining th xml and pre-created xsl. We use the following code to print the resulting html document...
Process myProcess = new Process();<br />
myProcess.StartInfo.FileName = TemplatePath + "\\Invoice.HTML";<br />
myProcess.StartInfo.Verb = "Print";<br />
myProcess.StartInfo.CreateNoWindow = true;<br />
myProcess.Start();
Now, are there any added lines that would remove the header (by default: Page 1 of 1) and the footer (by default: "the file path" and "todays date") before i print the document?
Thank you in advance
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
You cannot do this in code, you will have to do this in IE. File->Page Setup then clear the header and footer boxes. Or if you use any other browser then check their documentation on how to do this.
|
|
|
|
|
o okay. I thought as much... so the client will just have to do this on their own...
thank you for your time.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
No problem. I had a week's worth of struggling with that same thing. what I did in the end was just create a pdf document instead and print that (using Crystal Reports) - for some reason this did not include the header and footer. (I had to create a document that could be printed online)
|
|
|
|
|
Hi all,
I am using Listview control in vb.net 2005, in that i am using a column header in that. I wish to change the style(back color) of the column header. I searched for it in the Properties, but i can't found it. Can any one suggest me how to change the Backcolor of the column header.
It's little urgent plz
Thanks in advance
I am using Outlook express to read all the mails in the inbox.How can i know the connecting url of my outlook express.
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
you'd have to set OwnerDrawand property to true and add DrawColumnHeader, DrawItem or DrawSubItems event..
life is study!!!
|
|
|
|
|
hi seishin,
Really thanks for your help.Could you please suggest me some code samples for implementing the same.I am really new to this concept.
So if you could send me some sample code, it would be of great use.
Thanks in advance.
I am using Outlook express to read all the mails in the inbox.How can i know the connecting url of my outlook express.
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
http://www.codeproject.com/cs/miscctrl/customheader.asp
life is study!!!
|
|
|
|
|
I am developing a c# application which opens a .xls file using Excel object of c#.
If the file is already opened by another user for writing I need to display that users name in a MessageBox.
I have noticed that if Excel objects DisplayAlerts option is set true Excel application displays a messagebox for notifying the username who is modifying the file. But I want to display customised messagebox from my application.
Please help me. Solution required urgently.
|
|
|
|
|
Hi,
I don't know which shade of lipstick to apply tonight - any suggestions
Seriously though, I have the following code populate a multiline text box:
DateTime currentDateTime = DateTime.Now;<br />
string now = currentDateTime.ToString("MMM dd, yyy");<br />
textBoxMemberNotes.Text = now + Environment.NewLine + Environment.NewLine;
The problem I wish to overcome is that the resultant text is highlighted and if the user just starts typing then the text inserted by the above code is rightfully deleted.
How can I "move the cursor" (so to speak) programatically so that this doesn't happen?
Thanks in advance
Glen Harvy
|
|
|
|
|
The following should work (maybe you have to tweak the parameters). Alternatively you can set the SelectionStart and SelectionLength properties.
textBoxMemberNotes.Select(textBoxMemberNotes.Length - 1, 0);
"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." - Rick Cook www.troschuetz.de
|
|
|
|
|
how can i dynamically call a windows user control in a windows Form
|
|
|
|
|
just initialize as u declare and initialize any other object.
<br />
UserControl1 userControl1 = new UserControl1();<br />
And then assign it to the panel that you wish it to show in.
<br />
userControl1.Parent = Panel1;<br />
this wont yet show the user control, you should use the show function to show it in the panel
<br />
userControl1.Show();<br />
|
|
|
|
|
How can i get a table (no ID) through Webbrowser object in C#?
Any suggestion for me pls?
|
|
|
|
|
Give some detail abt ur work.. it is difficult to understand..
Ravi Kant Srivastva
(Design Engineer)
HandsOn Technology
|
|
|
|