|
Just wondering, whats the deployment medium and also the programs to be updated will they be included (redistributables) ?
~Alexander Kent
|
|
|
|
|
Printed to CDs will be the primary deployment medium (maybe downloadable as well)
yes, .NET and the directx will be included (they both are redistributable.)
|
|
|
|
|
I feel I need to share this pain. I have been struggling for days now to get something simple to work for me. That is to print out a Word document(rtf format) to a printer using Word. It also has to work with multiple versions of Word (so far 2000 and 2003). I thought I would share everything that I have learnt.
If you want this to work for multiple versions, install the earliest version of Word and Add Reference to it's COM component and develop against these.
Next to the code...
<br />
Word.ApplicationClass ac = new Word.ApplicationClass();<br />
Word.Application app = ac.Application;<br />
<br />
app.DisplayAlerts = Word.WdAlertLevel.wdAlertsNone;<br />
<br />
object filename = "myFile.rtf";<br />
object missingValue = Type.Type.Missing;<br />
<br />
Word.Document document = app.Documents.OpenOld(ref filename,<br />
ref missingValue, ref missingValue, <br />
ref missingValue, ref missingValue, ref missingValue, ref missingValue, ref missingValue, ref missingValue, ref missingValue);<br />
<br />
app.ActivePrinter = "My Printer Name";<br />
<br />
object myTrue = true;
object myFalse = false;<br />
<br />
m_App.ActiveDocument.PrintOutOld(ref myTrue, <br />
ref myFalse, ref missingValue, ref missingValue, ref missingValue, missingValue, ref missingValue, <br />
ref missingValue, ref missingValue, ref missingValue, ref myFalse, ref missingValue, ref missingValue, ref m_MissingValue);<br />
<br />
document.Close(ref missingValue, ref missingValue, ref missingValue);<br />
<br />
while(m_App.BackgroundPrintingStatus > 0)<br />
{<br />
System.Threading.Thread.Sleep(250);<br />
}<br />
<br />
app.Quitref missingValue, ref missingValue, ref missingValue);<br />
I do not claim that this is perfect, but it's as good as I can get. It works on my machine anyway
|
|
|
|
|
You might want to write up an article for this instead. Your post will be knocked off the first page of this forum in less than a day.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Cheers. I've just done that. I wasn't sure how useful somethign like this is and there is already some similar code on here, but it's awful to read. Plus I am hoping that people will point out any flaws in the code as I am pretty sure it doesn't work perfectly
|
|
|
|
|
Hi,
I am trying to write some dynamic data into a .def file and havent succeeded to get enough help anywhere. Can u plz help me out here. HOW CAN I CREATE A .DEF FILE IN .NET(C#)
Thanks
Bharath
|
|
|
|
|
|
How about making use of the StreamWriter[^] class.
The DEF[^] extension is in use by at least 18 different applications, according to the FileExt database.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks a lot
Cheers
KR
|
|
|
|
|
Hello,
Is there a way to access a public method in Class 1 fromm Class 2?
Thank you
|
|
|
|
|
Do you mean this?
public class Class1
{
public Class1()
{
}
public void PublicFunction()
{
}
}
public class Class2
{
public Class2()
{
Class1 class1Object = new Class1();
class1Object.PublicFunction();
}
}
Hugo Migneron
|
|
|
|
|
Thank you.
This will work just fine, however I was thinking of doing it somehow without instantiating the object.
Cheers
|
|
|
|
|
zaboboa wrote:
This will work just fine, however I was thinking of doing it somehow without instantiating the object.
Then you will have to use the static keywork which permits you to use a class without instantiating it :
public class Class1
{
public static void PublicFunction()
{
}
}
public class Class2
{
public Class2()
{
Class1.PublicFunction();
}
}
Something along these lines will do it
Hugo Migneron
|
|
|
|
|
I am having problems using UDPClient.Send() in System.Net.Sockets. Each time
I make the call to the function, there is a significant delay from when the
code is executed to when the packet actually goes out. I took a look at the
traffic and found that each time the UDPClient.Send() call was made, two UDP
netbios messages go out on port 137. The device on the other end responds
each time with an ICMP. After two attempts, the .Send gives up, then
forwards the message.
The problem is, the huge delays in transmission are really throwing off my
timing. Why is the Send command tring to send out netbios messages? Can I
disable that? UDP is supposed to be connectionless. I just want to send
data with minimum delays!
|
|
|
|
|
You dont say which overload of Send you call. I suspect this one:
int Send(byte[] dgram, int bytes, string hostname, int port)
That method calls DNS.Resolve, and the likely reason for the 2 netbios messages. Use the IPEndPoint overload instead.
xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots
|
|
|
|
|
You are correct!! Than you so much, this fixed me right up!
|
|
|
|
|
opefiledialog can open file. what if i want to point to a dirctory?
(I mean using someting like dialog box to select a working direcory)
Thanks
|
|
|
|
|
You can use FolderBrowserDialog class
but this class is available in .net 1.1 or later
|
|
|
|
|
How can I dynamically change the order of tab pages in a tab control at run-time?
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
You can remove them
tabControls.TabPages.Clear();
and then re-add them in whatever order you want
tabControls.TabPages.Add(tabPageOne);
|
|
|
|
|
Hello,
How can I display the whole row from a dataset, using foreach statement.
foreach (DataRow row in this.dataset.Tables[0].Rows) {
Debug.WriteLine (---------------- What goes in here?-------------)
}
Thank you
|
|
|
|
|
You can loop through the items of a DataRow by accessing its Item or ItemArray property.
|
|
|
|
|
Hi,
Need to create a Datagrid in Datagrid dynamically. Both the Datagrids should be created dynamically, using a template column like Link buttons.The Link button click event has to generate the second datagrid. Is there any option sin crystal reports like this.
Kamesh Bora
Consultant
|
|
|
|
|
|
Hi
Is it possible to stop two running thread on cancelJob event
Any example
THanks
sanjeev
|
|
|
|