|
I have a rich textbox with bold text on my form and I want to copy it over into a textbox in a word document. The problem is that when I do it, it looses it's formating and is not bold anymore.
How would I go about copying text while preserving the same style that it had.
Also, how would I store Rich text in access database and not have it loose the formating.
Thanks
|
|
|
|
|
IIRC, there's no direct way to insert RTF text into a word document.
I had to perform a similar task once and had to resort to copying the RTF from the RichTextBox to the clipboard, set the target Range in the Word document and then perform a Paste to insert the RTF.
Afterwards, I've restored the clipboard contents.
Regards,
mav
|
|
|
|
|
right hello
I have loaded the contents of a picturebox into a bitmap variable...
Bitmap bmp = new Bitmap(pictureBox1.Image);
like so...
when someone clicks on the image how can i get the XY coordinates of the pixel that was clicked.. and then do a GetPixel on the location?
I cant use Mouse event args e.x/e.y because that gives me the position of the click on the whole screen... not the position of the click on the picturebox...
any ideas?
ps. i cant just find the xy position of the click on the screen and then trace it back to the form and the position of the picturebox becase of form borders and different XP Styles...
Thanks in advanced.
Finn
|
|
|
|
|
If you're handling the MouseDown event of the PictureBox control, the X and Y properties return corrdinates relative to the upper left corner of the PictureBox , not the screen. If you're accessing the static X and Y properties of the MousePosition class, you can translate them in to coordinates on your PictureBox by calling the PictureBox 's PointToClient method (inherited from Control ). There is also a PointToScreen to translate the other way.
Charlie
if(!curlies){ return; }
|
|
|
|
|
d'oh ! stupid me :p
thanks
|
|
|
|
|
I want to know that how a canvas should be made which have ability to manipulate bitmaps and handle reactanlges. My abjective is to put in rctangles in which i can put bitmaps and then i could resize them, and after doing this working i store them all bitmaps as one image and as a template in a XML file.
Thanks & Regards
Sheraz Saeedy
|
|
|
|
|
Sheraz Saeedy wrote:
My abjective is...
Do you mean "objective"? "Abjective", while not strictly a word in the English language, would imply that you are looking for a hopeless, unfortuanate or miserable solution.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Oh, and welcome to www.SpellingProject.com
Charlie
if(!curlies){ return; }
|
|
|
|
|
question was'nt put for the english teachers. well any C# expert can comment.
|
|
|
|
|
It was meant as a joke. I don't normally correct people's English language skills, as (1) I know there are many people here that have English as a second language and (2) I make mistakes myself from time-to-time. However, I found the misspelling to be somewhat ironic.
Do you want to know more?
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
obviously no one expect answers like that. when u r dealing in a technical forum there are so many other things to be obsereved, if someone can ...
|
|
|
|
|
|
Hi Duell
I don't know how to contact you
Derrick
|
|
|
|
|
Anonymous wrote:
I don't know how to contact you
That makes two of us. Neither do I.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
aren't you afraid the entire board would chime in?
I still crack at Mr. Beans "Me too, too!"
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist Fold With Us! || Agile Programming | doxygen
|
|
|
|
|
Pah! I say to thee! I know no such fear!
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Hi group,
I have a dataset which contain two tables of same structure (Same data type, same number of column). Say tab1,tab2. I want to merge tab1 to tab2.Then i will clear the content of tab1.
Eg; int tab1cnt=dataset.tables["tab1"].rows.count;
int tab2cnt=dataset.tables["tab2"].rows.count;
After merging
the row count of tab2 need to be the sum of tab1cnt and tab2cnt.
Which one is the beast way to achive this result without iterating through any of the row in any of tables.
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
You can use the Merge method of the DataSet class, but you'll need to create a couple of temporary variables along the way.
DataSet temp = new DataSet("temp");
DataTable tab1Copy = tab1.Copy();
temp.Tables.Add(tab1Copy);
temp.Tables["tab1"].TableName = "tab2";
temp.Merge(ds.Tables["tab2"]);
temp.Tables.Remove("tab2");
ds.Tables.Remove("tab2");
ds.Tables.Add(tab1Copy);
ds.Tables["tab1"].Rows.Clear();
tab2 = ds.Tables["tab2"];
temp = null;
tab1Copy = null; I'm sure this isn't the only way of doing this, but it works.
Charlie
if(!curlies){ return; }
|
|
|
|
|
hi,
So you got my question properly and you got i what i don't want to do for merging (unwanted iterations for filling the record). Thanks .
.
Let me use your concept first and if i get anything beeter than this from this concept then surly i will post in the same thread. Sometime it may help others.
finally thanks;)
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
Hi,
I want to change the LicenseURL for already encrypted movie file,
i tried it with the help of download.download(Windows Media Rights Manager 9 Series SDK), but at the time of calling this function i get exception as
The object was not created with Server.CreateObject.
Please help me reagrding this.
Vaibhav
|
|
|
|
|
G'Day ppl...
currently am working on my project by using C#, but am not familiar with its running environment. As its part of my project, i have to creating database from MSDE, and using C# to reading those data. I am not so sure whether the commands are, and plz someone help me. ( I know how to use the command for MS ACCESS)
Pls help !!!
ppck
|
|
|
|
|
Hello:
this is an example for take data from SQL, we use a formBase that contains a property ConnSQL, and all the forms inherit from it, we have 3 elements
1 )This is the connection String = (on the login form)
this.ConnSQL="data source="+this.Srv+";initial catalog="+this.DbN+";password="+this.loginControl1.Password+";persist security info=True;user id="+this.loginControl1.Username+";workstation id="+this.Ter+";packet size=4096";
2 ) this is the call for data = (on the customers form)
public void EjecutarBusqueda(string Comando)
{
System.Data.DataSet Ds = new System.Data.DataSet();
System.Data.DataSet Contactos = new System.Data.DataSet();
string cadenaBuscar = ("Select * From Customers Where " + Comando);
Ds=General.TraerDatos(this.SQLConn,cadenaBuscar);
....
}
the string "Comando" is the condition for the select, is provided for the user
3 ) this is the method that return the data = (on General Class, for use it everywhere on the proyect)
public static System.Data.DataSet TraerDatos( string SQLConn,string Commando)
{
DataSet mDataSet=new DataSet();
SqlConnection ObjConn=new SqlConnection(SQLConn);
SqlDataAdapter ObjDato = new SqlDataAdapter(Commando,SQLConn);
try
{
ObjConn.Open();
ObjDato.Fill(mDataSet);
ObjConn.Close();
return mDataSet;
}
catch
{
MessageBox.Show ("Error al ejecutar la consulta " + Commando);
return null ;
}
}
I hope that it help you!!
bye
Vanesa Addicted To DJ Tiësto's Trance
|
|
|
|
|
Hi,
As I mentioned in the subject the question is simple... I have a web form in my site and I have to periodically send data to this form by using a windows form application written in C#
Thank you,
Cem Louis
|
|
|
|
|
hi,
I got your submition. But where is your queary or what is your doubt ?
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
Do you need the query? I didn't want to post the url to a high known forum...
|
|
|
|