|
Look up the EM_FORMATRANGE , EM_DISPLAYBAND and EM_SETTARGETDEVICE messages. See here for details.
Steve
|
|
|
|
|
I have seen the EM_FORMATRANGE but i have already used it
for the main Richtextbox i.e the editor that i have created.
now when i use the same method for the richtextbox of the table
the text in the last cell of the Table is printed on the main page
and the table cells are displayed blank
any other idea or code will be very useful for me
Thanks
Pramod
|
|
|
|
|
Take a look here[^] for an extended RichTextBox that can perform printing.
Regards,
mav
|
|
|
|
|
Hi Mav
i have already used a Richtextbox to create the editor and then i place these
richtextboxes to form the table
so i have used this printing method for the editor and now i also want
to print the table and its contents with the formatted text.
Thanks
Pramod
|
|
|
|
|
hi guys, i have a parent datalist in which i add child datalist and in child datalist i have some contols like label and image. can any 1 tell me how can i catch the child datalist event like parent datalist event i caught by writing it on initialize components like
initialize components
this.parentdatalist.ItemDataBound += new System.Web.UI.WebControls.DataListItemEventHandler(this.parent_ItemDataBound);
private void parent_ItemDataBound(object sender, System.Web.UI.WebControls.DataListItemEventArgs e)
{}
but i have no idea where should i write my child datalist event like parent datalist child event written in initialize component...
|
|
|
|
|
Anyone know why this repeats Horizontal twice and LargeGrid three times? Was the same enumeration values declared more than once?
foreach(HatchStyle a in Enum.GetValues(typeof(HatchStyle)))
{
MessageBox.Show(a.ToString());
}
|
|
|
|
|
Hi all,
I am trying to deploy my application.
So users can install and use the app. on their systems.
I tried following the below article but get stuck because my visual studio express edition seems not to have deployment features. (or maybe im doing something wrong i have the lasted version of express edition visual studio c#)
http://www.c-sharpcorner.com/Code/2002/July/BuildnDeployUsingVSNet.asp[^]
In particular i dont get the option to choose "Setup and deployment projects" when creating a new project. So i cant follow the artical.
Someone please help or send me in the right direction
Thanks in advance
|
|
|
|
|
You could
a) Write your own installer-program
b) use a free installer (Nullsoft et al) or
c) use a free msi-compiler and write the setup-scripts by hand.
I suggest you use option b).
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
Thanks for the info but where can i find Nullsoft et al free installer?
I tried googleing but nothing pertaining to an free installer...
You have a tutorial or article on any of the 3 steps you listed above.
Would be helpful...
Thanks.
So i take it i cant build and deploy using visual studio express edition?
Paul
|
|
|
|
|
I have a table with a column containing prices in which the format is currency. When reading from this table into a listview by way of a Dataset > DataView.
The code is:
DataRow drow = purchDV.Tables.Rows[0];
ListViewItem lvi = new ListViewItem(drow["Price"].ToString());
When the list is displayed it shows the Price column as numbers and not currency values. eg. 15000 instead of $15,000. I believe it is when it is converted to a string.
How do I change the format for the column so that the values display correctly???
|
|
|
|
|
string.Format[^] is what you need.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Sorry for being such a newb but how do I include that in the code i have?
|
|
|
|
|
ListViewItem lvi = new ListViewItem(String.Format("{0:C}", drow["Price"].ToString()));
I believe.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hmm... Doesn't appear to be working. Still doesn't show the $ sign.
I appreciate your help
|
|
|
|
|
|
Comes up with "no overload for method 'ToString' takes '1' arguments"
|
|
|
|
|
OK, that'll be because it's an object coming out of the DB
ListViewItem lvi = new ListViewItem(Convert.ToDouble(drow["Price"]).ToString("C")));
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
I got it to work by using:
double dbprice = Convert.ToDouble(drow["Price"]);
ListViewItem lvi = new ListViewItem(dbprice.ToString("C"));
Perhaps you can't convert it twice in one line of code?
Thanks for your help Chris
|
|
|
|
|
object o = 2.56;
string s = Convert.ToDouble(o).ToString("C");
This code works. If your code is crashing, then there's some other problem here. At some point, you need to write your own code - the ToString method on a double which takes a letter will produce a currency output as you're seeing here. You need to look into what's coming out of your database and make it work with this method.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Sorry, what code can i use to remove the cents from the value.
Something to do with the NumberFormatInfo ??
|
|
|
|
|
If you want to remove the cents ( sorry, did you say that ? ) then build your own format string using the info on those pages. You'd then be locale independent, i.e. it would always say $.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Yeah, thanks, figured it out and all is working ok
Thanks for your time.
|
|
|
|
|
Christian Graus wrote: I believe.
Been watching The Matrix again?
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
i dont mind to be
a stupid,better than being a moron - Adnan Siddiqi.
|
|
|
|
|
I would like to know if anybody have used the new serialport class available in the new Dotnet framework V2.
If yes, I would like to know if some events like :
- RX buffer is empty or not;
- TX buffer is empty;
- Time Out expired;
- ...
If I can retreive the size of the RX/TX buffer and many other parameters.
Because now I using my wrapper class of serialport (c++ to C#) but sometimes it is difficult to realize some functionality.
Best Regards
youssef
|
|
|
|