|
Word Interop is pretty much your only choice here, (I believe and would be happy to be proven wrong I must say), but it's horrible and heavyweight at the server as it essentially involves running MS Word in memory on the Web Server.
A Google[^] search should give you some direction...
Rhys
A bus station is where a bus stops. A train station is where a train stops. On my desk I have a workstation...
Vampireware /n/, a project, capable of sucking the lifeblood out of anyone unfortunate enough to be assigned to it, which never actually sees the light of day, but nonetheless refuses to die.
|
|
|
|
|
I have the same problem! I can find all kinds of information about creating a Windows App to do this, but when I build a Web Based App - I always get the error: Could not open macro storage. This is driving me crazy because I can't find info about what permission need to be set to get around this.
I have been able to build a Word Doc using the File Object and FileStream Class, but then I lose a a lot of functionality which comes with the Application Object. For example I can't create a pagebreak where I need to.
Let me know if you figure this out!
Thanks
Lynnette
|
|
|
|
|
I have the following compiler warning:
CS1595: 'type' is defined in multiple places; using definition from 'assembly'
There is a good reason for the warning - I have the type defined in multiple places!
What should I do about it?
Oh - The reason for having it in multiple places is that I have a windows forms control which shares a type (enum in this case) with another control located in a seperate assembly. The type is used for one of the properties in both controls. Everything works fine except that the Visual Studio 2003 designer forgets the value of the property when loading the control back into the designer unless the type is defined in the controls local assembly - hence I have a duplicate definition since I need it in both controls local assemblys!
|
|
|
|
|
|
Thanks, but that is exactly what I had until I found that the Visual Studio 2003 designer was failing to restore the state of my enum properties.
There appears to be a bug in the Visual Studio 2003 designer?
|
|
|
|
|
I've been given a C# app that was writen with the 1.0 framework on NT and I'm building it with the 1.1 framework on XP.
I have noticed a difference in the behaviour of the ComboBox.DataSource property. In the original version the ComboBox was populated by setting the DataSource property equal to an ArrayList, however in my 1.1 framework version on XP the ComboBox.DataSource property equals null after the assignement.
I have had to get round it by looping through the ArrayList and using the ComboBox.Items.Add() method to add the comboboxes items individually.
Does annyone have any idea what could be the cause of this?
Thanks
|
|
|
|
|
i need to prevent the deactivate of the title bar of a tool child window.
i would show active title bar for the main form and of this child window having just the last one selected as the real active window...
Using this code i prevent for the main to draw unactivate title bar for itself also i select the child form.
I use the same code also for the child.
The problem is that it doesn't work, it leave the main and the child active in the same time but if i try to came back to the main i can't use it but just move.
protected override void WndProc(ref Message m)
{
if(m.Msg == WM_DEACTIVATE) return;
base.WndProc(ref m);
}
what do i wrong?
|
|
|
|
|
What your doing won't work under Windows. You cannot have two active windows at the same time. Since your preventing one window from losing the focus, you can't give the focus to another window.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
ok but there are mush software that fake the windows message show in the same time two or more windows like activated.
For example Photoshop and its tool property etc.. windows, then Fireworks, Dreaweaver, Premiere and so on...
How just they do?
They prevent the windows title bar to is redrawed to unactived...
Please someone know how to do?
Thanks.
|
|
|
|
|
They draw their own toolbox windows themselves! The window doesn't really have the focus, but you can give the user the illusion that it does. But, the only way to do it is if you draw the entire window yourself. Windows won't manage it for you the way you want.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have created a super complex object and implemented all IXmlSerializable methods. And my webserice have to return this object from a method. Everything is almost fine. But i got a empty object returned from the method. I have debugged it also and I found that my webservice already have the object to return, but seem that my client didn't get the object back from the method ? How's come ??!!!!
I have invoke the webservice alone, and it return a complete XML's object. But well .... don't know why my client's object got nothing !!!!
Now I have to deserialize and serialize by myself from both server and client by passing a XML string, not the object class. But it looks so stupid if this is only way to do so !!!
Please help.
PS. In fact i have 2 - 3 simple classes that also passed between webservice and client and they are all fine .. but not the super complex object ??? becaseu it is too big ??
|
|
|
|
|
I am not a guru at all, but we do here do some semi-complex custom class passing around with Web Services.
My only though is, if your Class contains in turn classes, did you add the XMLInclude attribute?
Here is an example, hope it's not too long winded
<br />
[Serializable]<br />
[XmlInclude(typeof(Discount)), XmlInclude(typeof(Expression)), XmlInclude(typeof(ExpressionClause))]<br />
public class OrderDiscounts<br />
{<br />
[XmlElement("OrderLevelDiscounts",typeof(Discount))]<br />
public Discount[] OrderLevelDiscounts;<br />
<br />
[XmlElement("ItemDiscounts",typeof(Discount))]<br />
public Discount[] ItemDiscounts;<br />
<br />
}<br />
<br />
<br />
[Serializable]<br />
[XmlInclude(typeof(Expression)), XmlInclude(typeof(ExpressionClause))]<br />
public class Discount<br />
{<br />
[XmlElement("ConditionExpression",typeof(Expression))]<br />
public Expression ConditionExpression;<br />
<br />
}<br />
<br />
[Serializable]<br />
[XmlInclude(typeof(ExpressionClause))]<br />
public class Expression<br />
{<br />
[XmlElement("ExpressionClauses",typeof(ExpressionClause))]<br />
public ExpressionClause[] ExpressionClauses;<br />
<br />
}<br />
<br />
[Serializable]<br />
public class ExpressionClause<br />
{<br />
public string PropertyName;<br />
public string Operator;<br />
public string Value;<br />
}
|
|
|
|
|
Well the problem is i hv a listview in which files of all types (media, doc, txt etc.) are listed , i want to open each of them in their corresponding application by double clickin on them.i want to use some API in the click event of the listview that wud search for the executable of that file by looking at its extension.
how do i do that?
|
|
|
|
|
try
Process.Start("yourfilename.extension");
|
|
|
|
|
Is is THAT urgent that you have to post this question twice?
David
|
|
|
|
|
Well the problem is i hv a listview in which files of all types (media, doc, txt etc.) are listed , i want to open each of them in their corresponding application by double clickin on them.i want to use some API in the click event of the listview that wud search for the executable of that file by looking at its extension.
how do i do that?
|
|
|
|
|
you can simply use System.Diagnostics.Process as follows
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.FileName= this.listView1.FocusedItem.Text.ToString();
proc.Start();
If you look at the eventhandler property of listview, you will see it has the DoubleClick eventhandler associated with it. So simply insert the above code into this event handler. However you need to remove "this.listView1.FocusedItem.Text.ToString();" and use the event handler input argument as a substitute.
|
|
|
|
|
Use System.Diagnostic.Process[^].
It works the same way as if you double-clicked file in Explorer, Windows search Registry for exacutable (e.g MS Word, Paint or browser ) associated with extention (.doc, .bmp, .html).
All you need to know is file name.
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Hey Everybody!
I created an application that that is using the IE AxWebBrowser com component (to surf the net...).
so using my "new" web browser I can surf the net, but I want to create an off-line homepage using web forms.
the problem is that it doesn't matter what I do, I never see the page correctly!
I want to use my asp page to run things in my c# application, so I created the web form in a different project (because it is impossible to add web form to a c# project), and write down the code as it was in my app, but as I wrote down earlier, when I surf that asp page I cannot see the buttons, just the label I used in the form.
HELP ANYONE???
thanks!
|
|
|
|
|
How are you surfing the ASP page? What URL are you using? Are you running IIS or some webserver on your PC?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
well, I guess thats what I did wrong
I've never used asp before...
how should I surf to the page?!
|
|
|
|
|
You need to run a ASP.NET (or ASP, if you're using plain ASP) capable web server. IIS (Internet Information Services) comes as part of Win XP Pro, you can use that or use one of the free webservers (like Cassini).
Create a virtual directory (let's call it mypage). Put ASP page in that directory. Start the webserver and navigate to http://localhost/mypage/yourpagename.asp
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
oh okay
no problem, it works fine on my computer. vs.net created it for me so the aspx and aspx.cs are in my http://localhost/mypage/ .
but if I want to run that asp page on someone else computer, how can I make windows create the 'http://localhost/' at my app's directory (so my page will be at http://localhost/mypage.aspx) or just controling the position of the localhost?
|
|
|
|
|
hi, i have a code works with oracle sql i want to change the problem in it that doesn't work with sql2000 soplease any one help me
the sql statement is:
select folderindex, NAME, PARENTFOLDERINDEX from pdbfolder
connect by prior FOLDERINDEX=PARENTFOLDERINDEX
start with PARENTFOLDERINDEX = " + indexx + "
order by(PARENTFOLDERINDEX)
it gives me an error on line to when i test it on the sql 2000 query analyzer so what is the solution
Thanks alot
Hamody
|
|
|
|
|
Hi!
First of all, sorry about my wrong english
So I have the problem:
I'm using my C# Windows application to start a given exe file with System.Diagnostics.Process.
The application starts correctly, but I want to manipulate the given application window properties eg.:title,size,topmost or something like thesee things.
How can I do this?
Thank's for the helpfoul people, I wait yuor answers.
Bes regards:
Nemo
|
|
|
|