|
mmhh i see thanks for all your time and help i will try the hash stuff
|
|
|
|
|
hello
i working on my assignment for win form app. there are 2 tables related. and now final part is to create crystal report i have created one report showing bill details it works fine there is no issure.
now i want to display amounnt in words so i have created one class and to convert number to words and again it's working fine but i am not storing this amount in words in sql database.
so in reporting how can i convert this amount in number into words?
is there any way to call my numbertoword class into crystal report?
or is there any tool in crystal report to do this?
this is my code for loading crystal report
public partial class InvoiceBill : Form
{
public InvoiceBill()
{
InitializeComponent();
}
public GenerateInvoice invRpt = new GenerateInvoice();
private void InvoiceBill_Load(object sender, EventArgs e)
{
sqlDataAdapter1.Fill(invoiceDS1 , "BillDetail");
crystalReportViewer1.ReportSource = invRpt;
invRpt.SetDataSource(invoiceDS1);
}
waiting for your kind help
|
|
|
|
|
ok it's done now
there is inbult function for this in crystal report
ToWord()
|
|
|
|
|
hi guys
how to send file with bluetooth with socket programing ?
thanks a lot
|
|
|
|
|
|
Please consider the following code fragment:
<br />
protected override void OnPaint( PaintEventArgs paintEventArgs )<br />
{<br />
Graphics grfx = paintEventArgs.Graphics;<br />
int width = this.ClientSize.Width;<br />
int height = this.ClientSize.Height;<br />
grfx.TranslateTransform( width / 2, height / 2 );<br />
I now claim that after executing the call to TranslateTransform the point 0,0 will
be the center of the screen. However, increasing y values still bring be down. That
is, the point (0,3) will be below, the point (0,0). I would like increasing y values
to bring me up the screen. Is there a way to do this, and if so, how?
Thanks
Bob
|
|
|
|
|
While I haven't actually done so, I expect there are a couple, related, ways to achieve this.
The simplest would be to append the statement:
grpf.ScaleTransform(1.0f, -1.0f);
An alternative would be to specify the entire transformation matrix (with lots of zeros, your width/2 and height/2, and a single -1 in there). In the end, I expect such matrix is what is used internally, all the XxxTransform calls simply modify said matrix (starting from a unity matrix).
|
|
|
|
|
Hello,
i have excel from which i need to read the data though c# code.
Excel having groued columns so iam not able to read those columns.
can any one tell me how to un group excel column and save tht changed excel.
My code is as follwes which failed
private void UnGroupRowsAndColumns(Workbook workbook)
{
Worksheet worksheet = workbook.Worksheets[0];
worksheet.Cells.UngroupRows(0, 9);
worksheet.Cells.UngroupColumns(0, 1);
}
|
|
|
|
|
Please do not post to multiple forums. You have already received a response in the C++ forum for this exact question.
It's time for a new signature.
|
|
|
|
|
I never tried drawing using C#.
I have a medical software which has th head image and I want to know how to do the following:
1. when the mouse is over the head then i should do nothing other than mark or unmark
2. when the user clicks on the head image on area which doesn't have x mark then it should mark it
3. when the user clicks on the head image on area which has x mark then it should unmark it
I want a small tiny x mark, something like 14X14 and in RED.
|
|
|
|
|
I'm afraid quite some information is missing.
1.
How is the image being displayed (Graphics.DrawImage, PictureBox.Image, Panel.BackgroundImage)? Is it your app that uses C# and needs some functionality added? or do you hope to get the extra's on top of some existing app you can't change?
2.
how many marks can there be at any one time? and what is the size of an "area" (each of the ones that are either marked or not marked)?
|
|
|
|
|
jrahma wrote: I want a small tiny x mark, something like 14X14 and in RED.
That sounds more like an assignment than a question..
Anyway, to get you started; Set the head as a background image. Use a Panel to display the bitmap. Now, the computer doesn't distinguish between area's like humans. There's no way to distinguish between 'unmark that x' and 'put a mark very, very close to that one'. You could divide the bitmap into square blocks to represent clickable area's. That way you could create an array to represent the marked and unmarked blocks. It would otherwise be hard to "find" an X when it's painted on the head-picture itself. The best alternative would be to divide it into two layers, a background and a list of markers;
- Create a generic list of points.
- When the user clicks on the head, add the location to the generic list. Wipe the control, draw bitmaps (with a red X) on all the locations in your list.
- When you reload the picture (e.g. user opens the app on the next day), load your backgroundhead and paint the markers over it.
- When the user wants to delete a marker, show the list and ask which one. If the user selects an item in the list, then highlight it on the picture (e.g. a blue X instead of red, so they can see which one is going to be deleted)
See Google Earth if you want to try the concept
I are Troll
|
|
|
|
|
hi all!
i need c# control for tracing logs that can contain a lot of lines and be quick to scroll and to draw like in the application "registry monitor", "file monitor" or output window in VS, etc...
i tried to make virtual list in the list view, but it didn't help. may be i did something wrong...
could you please help me? may be you know how to implement or some links in the internet with the ideas or implementations?
thanks,
Pavel
ISQ 469907496
|
|
|
|
|
I like ListBox a lot as it is line-oriented and knows to handle millions of lines pretty well. Here[^] is a typical use.
When necessary, I make it UserDrawn so I can have more control on formatting (quite often all I need is some text lines in bold and/or a different color).
|
|
|
|
|
thanks, but i need multi-column control... so, listbox will not be helpfull
ISQ 469907496
|
|
|
|
|
again, OwnerDrawn allows for lots of formatting. I've done columnar output with ListBox. You can make it look like a DataGridView (without the column sort facilities).
|
|
|
|
|
ok, i'll try, but i'm really not sure that this implementation will be faster than listview virtual mode...
ISQ 469907496
|
|
|
|
|
whatever control you choose, performance will depend very much on how you use it. If your control is large, and you are adding/updating/scrolling it all the time, then those actions will end up consuming almost all available CPU cycles. You may want to look at:
- SuspendLayout/ResumeLayout
- AddRange
- only updating TopIndex at regular intervals (say with a 1-second periodic timer).
|
|
|
|
|
Hello.
In the project i am working on i am face these days with the task of creating a p7m file.
I have at my disposal the following :
- Public key Certificate in Base64
- Signature in Base64
- The file in byte array.
I cannot seem to find a way to create a p7m file with a already existing signature.
Could i please get some help if anyone bumped into this issue ?
|
|
|
|
|
I have been doing some playing with a generic print class to add header/footer/lefter/righter support, so have been implementing my own print preview. But for some reason, it seemed really sluggish. When I switch orientation from Landscape to Portrait, it could take a noticeable time - maybe half a second, or more. So, I filled the routine with Stopwatch tests, and got some odd results. Create a new C# Winforms project and drop a button on, hook up this code:
using System;
using System.Windows.Forms;
using System.Drawing.Printing;
using System.Diagnostics;
namespace PrintTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
TimeIt();
}
private static void TimeIt()
{
PrintDocument pd = new PrintDocument();
Stopwatch sw = new Stopwatch();
TimeSpan ts1 = new TimeSpan(0);
TimeSpan ts2 = new TimeSpan(0);
TimeSpan ts3 = new TimeSpan(0);
sw.Start();
int Width;
PageSettings pageSettings = pd.DefaultPageSettings;
ts1 = sw.Elapsed;
PaperSize ps = pageSettings.PaperSize;
ts2 = sw.Elapsed;
Width = ps.Width;
ts3 = sw.Elapsed;
sw.Stop();
MessageBox.Show(sw.Elapsed +
"\n ts1: " + ts1 +
"\n ts2: " + ts2 +
"\n ts3: " + ts3);
}
private void button1_Click(object sender, EventArgs e)
{
TimeIt();
}
}
} The first time the message appears, it is slow as I expect - assemblies loading, etc. But it remains consistant after that.
I get numbers such as:
00:00:00.2231302
ts1: 00:00:00.0000010
ts2: 00:00:00.2231289
ts3: 00:00:00.2231297 Which means that this line of code takes 0.2 seconds:
PaperSize ps = pageSettings.PaperSize;
And testing show that it is 0.2 seconds each and every time you use it. So if your code looks like:
Width = page.Document.DefaultPageSettings.PaperSize.Width;
Height = page.Document.DefaultPageSettings.PaperSize.Height;
That takes 0.4 seconds.
But here's the rub: It only takes time if it is a networked printer. Local, or PDF printers don't take any significant time.
Is this just me?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Hi Griff,
OriginalGriff wrote: Is this just me?
You can breathe again, it is not just you.
In my experiments the line "PaperSize ps = pageSettings.PaperSize;" takes:
- 800 msec the very first time my app runs on Vista (and a dual-core)
- 280 msec later on (same app executing it again, or same app restarted)
- 300 msec the very first time my app runs on Win7 (different machine, comparable CPU power, well, actually a quad-core but I won't believe that is a factor)
- 130 msec later on
This once again proves complex dereferencing such as
Width = page.Document.DefaultPageSettings.PaperSize.Width;
Height = page.Document.DefaultPageSettings.PaperSize.Height;
is to be avoided. I suggest
PageSettings dps=page.Document.DefaultPageSettings;
Size pSize=dps.PaperSize;
Width=pSize.Width;
HeightpSize.Height;
That is the "one period per sentence" rule!
|
|
|
|
|
Thanks Luc, I thought I was going slightly mad.
Now try it to a non-network printer and see those times drop like a stone!
I've done a bit more Googling, and it seems this is an old-but-known feature of XP / Vista
Luc Pattyn wrote:
PageSettings dps=page.Document.DefaultPageSettings;
Size pSize=dps.PaperSize;
Width=pSize.Width;
HeightpSize.Height;
This is the way I would normally write it - I don't trust compiler optimisers to spot commonality like that...
What I will actually do is cache the PaperSize info as part of my class and reload when the user changes the printer settings.
It was just such a silly result that I wanted to check I hadn't suddenly lost the plot - it is Monday, after all!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
OriginalGriff wrote: I don't trust compiler optimisers to spot commonality like that.
The compiler would have a hard time at optimizing this. While most properties are supposed to return the same value each time, the language spec does not enforce this. So your Document, DefaultPageSettings, and PaperSize need to be fetched each time, unless code analysis (or some attribute?) of said properties tells otherwise.
I'm not going to test a local printer, I only have the one (networked) printer in my current set-up.
|
|
|
|
|
I cannot find a significant difference between our HP Color LaserJet (net work) and Microsoft XPS Document Writer (local) on Windows 7. Re-running the program several times gets a list of quite variant results even for one type...
|
|
|
|
|
Is there any way to keep control in front of another one at all times? I've been searching for quite a while and I've found nothing that really works. I've also tried with BringToFront method whenever the control beneath it gets focused and it doesn't really work as I want it to.
Thanks in advance!
|
|
|
|