|
Because you are treating the formatted text as if it was just text. Your replacement conflicts with the formatting in the string. What you see is broken formatting spilling into the text.
---
Year happy = new Year(2007);
|
|
|
|
|
Hi,
Thanks for the reply.
I am doing that to maintain the format of the replaced text. Is there any other way to do the same?
|
|
|
|
|
how can i reboot my pc with c code ?
|
|
|
|
|
|
Right message board, please
SkyWalker
|
|
|
|
|
Hi,
How is it possible to send a pdf document to a fax machine using C# ?
Regardless of what fax machine it is, is there a way with .NET to implement
code to send to a fax machine ?
I've generated pdf docs using iTextSharp and want to send those to a faxnumber.
We have a FaxTalk Communicate software at the job and it would be nice to use it.
Need some guidance, plz
Daniel from Sweden
|
|
|
|
|
|
Well,
this looks like something used thru the web ?
Okey, i'll put it like this.
I have pdf docs.
I have a Brother MFC-9070 printer/fax.
I have my C# code.
How can i send this pdf doc to this printer/fax so it sends it to a given number ?
Is it possible to send a pdf doc directly to this printer since pdf docs
contain formatting and stuff. Must it not be converted to an image and then be
sent away?
Looked at C# system commands, if it were possible to start a pdf reader with a pdf doc, print it out and then take the paper and manually send the fax.
But i want to avoid this step.
would like someone to shine some light, i'm not familiar with programming against hardware, seriell ports and so on..
Thanks, Daniel from Sweden
|
|
|
|
|
Hi,
I recently found a great tutorial on scripting an application. I can run scripts from within the application. But what if I want to have an external application run scripts in my main application. How would I go about doing so?
|
|
|
|
|
Make sure you are using using System.Diagnostics , then:
Process p = Process.Start("CScript.exe", "YourCsript.vbs"); (or whatever other script - make sure the specify the correct path to it)
SkyWalker
|
|
|
|
|
I'm not sure I posed the question correctly. Thanks for your reply.
I used this tutorial http://www.developerfusion.co.uk/show/4675/
I'm new to this programming thing. I want to be able to access my running program and send it a script and have it compile and run it. I want to do this all from a totally separate application.
|
|
|
|
|
|
How to enable Promiscuous Mode using c#.
thnks in advance
Lxcite's Planet
... the ultimate solution
|
|
|
|
|
Hari Om Prakash Sharma wrote: Promiscuous Mode
What's that?
"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
|
|
|
|
|
|
Think Packet-sniffer. ...Promiscuous Mode is a networking term where your network hardware is actively listening for broadcast messages that aren't necessarily directed at it. To answer OP's question: I'm not telling
[edit]
...crap. I woulda been in before anybody else, but my boss came by and needed me in a meeting lol.
(Nyquist Rate || ! Nyquist Rate)
{
Console.WriteLine("That is the question");
}
|
|
|
|
|
So you want to sniff the network, but you can't figure out how to do it yourself?
---
Year happy = new Year(2007);
|
|
|
|
|
There are several articles on "network sniffer" here on CP.
I guess they contain what you need. Did you look at them ?
Luc Pattyn
|
|
|
|
|
hi
i want to set password to my sql2005 express database (that installed with VS2005)
and i don't know how to set password and connect to it,but how to do ??
(i think that is possible with StoreProcedure,but how ?)
thanks.
|
|
|
|
|
You would do better by using a trusted connection and setting up in SQL Server the windows accounts that are permitted to access the database.
|
|
|
|
|
Hello All,
I want to connect to my oracle DB from my login control ,how can I do this???
Nishu
|
|
|
|
|
//I have a problem with saving data from datasetts back to database, please help me. Im using mysql connector but work with mysql amd mssql is very similar (i think )
//First i create a data adapter (reading data is ok):
public MySqlDataAdapter postsAdapter(int iddisscussion)
{
MySqlConnection conn = new MySqlConnection(this.connect);
MySqlDataAdapter da = new MySqlDataAdapter();
MySqlCommand cmd;
MySqlParameter parm;
cmd = new MySqlCommand("SELECT idpost, iddiscussion, idup, poster_name, poster_email, subject, message, date_create, CONCAT(date_create, ' - ', subject) AS posts_list FROM " + pfx + "module_discussion_posts WHERE iddiscussion='" + iddisscussion + "' ORDER BY date_create DESC LIMIT 30;", conn);
da.SelectCommand = cmd;
cmd = new MySqlCommand("UPDATE " + pfx + "module_discussion_posts SET poster_name=?name, poster_email=?mail, subject=?subject, message=?message WHERE idpost=?oldId;", conn);
//cmd.Parameters.Add("?oldId", MySqlDbType.Int16, 11, "idpost");
cmd.Parameters.Add("?name", MySqlDbType.VarChar, 100, "poster_name");
cmd.Parameters.Add("?mail", MySqlDbType.VarChar, 80, "poster_email");
cmd.Parameters.Add("?subject", MySqlDbType.VarChar, 255, "subject");
cmd.Parameters.Add("?message", MySqlDbType.VarString, 0, "message");
parm = cmd.Parameters.Add("?oldId", MySqlDbType.Int16, 11, "idpost");
parm.SourceVersion = DataRowVersion.Original;
da.UpdateCommand = cmd;
return da;
}
// Second ... in another function ...
classDiscussions cd = new classDiscussions();
postsDA = cd.postsAdapter(Convert.ToInt32(this.iddiscussion.Text)); // data adapter from previous step
postsCB = new MySqlCommandBuilder(postsDA); // command builder
postsDS = new DataSet(); // dataset
postsDA.Fill(postsDS, "module_discussion_posts"); // fill dataset
this.posts.DataSource = postsDS; // setting dataset for list view
this.posts.DisplayMember = "module_discussion_posts.subject";
this.idpost.DataBindings.Clear(); // setting dataset for text box
this.idpost.DataBindings.Add(new Binding("Text", postsDS, "module_discussion_posts.iddiscussion"));
// third ... when i change datas in data set i want to save this changes back to database ... but its nt working ... pleeeeeeeeeease help me
postsDA.UpdateCommand = postsCB.DataAdapter.UpdateCommand;
//DataSet changes = postsDS.GetChanges();
postsDA.Update(this.postsDS, "module_discussion_posts");
postsDS.AcceptChanges();
-----------------------------
Computer is my hell on earth
|
|
|
|
|
please help me ....
-----------------------------
Computer is my hell on earth
|
|
|
|
|
I don't use DataAdapters much, and never MySql, so I may be way off base:
In the first part you create a DataAdapter and then set its commands.
Unless you really need to customize the UpdateCommand you probably ought to use
MySqlDataAdapter da = new MySqlDataAdapter ( selectcommandtext ) ;
In the second part I see no need for the CommandBuilder.
I also tend not to use a DataSet to hold just one DataTable, but that's just me.
Then in the third part you should only need the
postsDA.Update(this.postsDS, "module_discussion_posts");
|
|
|
|
|
its not working, its same code what i have but im using another way to create data adapter
-----------------------------
Computer is my hell on earth
|
|
|
|