|
GDI+ is not hardware accelerated (although I heard that some Radeon and Matrox cards do accelerate GDI+).
This means that all the burden of drawing will be on the CPU. Since you're mentioning that the machines will be older, this means that the drawing will be slower, and you'll only be able to significantly speed it up by changing the whole machine (mobo, processor and memory). It's hard to get this upgrade for under $250, and this will only get your drawing 2x or 3x faster.
Managed DirectX is supported by MS and will use all hardware capabilities avaliable. If not available, it'll be emulated (and quickly) by the main CPU. If the user needs to upgrade, he/she can simply buy an el-cheapo $50 NVidia GeForce4 MX 440 and the drawing will get up to 20x faster. If the user chooses a $250 card, it may get up to 60x faster when compared to a pure main CPU drawing on an old machine.
I don't like OpenGL wrappers, both because they're not supported by MS, and because in my past experience, OpenGL showed to be way slower and limited when it depended on emulation.
Remember also that you'll have to deal with the whole 3D drawing if you choose GDI+. Both DirectX and OpenGL are more like scene descriptions and the drawing is done by the back end.
The .NET environment will add a bit of overhead over anything you choose when compared to native C++, but it'll probably go unnoticed (tipically 5%~10% plus a slower startup time).
Yes, even I am blogging now!
|
|
|
|
|
Thank you and the other poster!
By saying: AUTOCAD I don't mean I want to compete with Autocad and implement all features it supports but most of the graphics functions like: drawing arcs, line, polylines in 2D/3D, trimming, extending etc and I'm not talking about Autolisp, etc.
I'm asking this because eventually if someday Mono supports Windows.Forms and GDI+ properly I would like to be able to run this program on other OSs too.
Of course Managed DirectX is the better alternative for Windows.
The only really complex Windows.Forms program I've ever used is: #Develop and it isn't an example for a fast running application. That's why am asking this question.
|
|
|
|
|
Hello everyone,
I'm trying to make an application that will select any file like .doc, .txt, .excel, .pdf and etc and the file will be printed to printer.
If anyone can give me the idea about that. I will appreciate.
khurram rathor
|
|
|
|
|
It's already been done and it's called Windows Explorer. Right click on any file and click Print. It's what your going to be using anyway. You can't possibly add support for every file type and every version of each file type to your app to print it correctly. You'll just end up shelling out the job to the app that is associated to the file and it will do the printing.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I wouldn't mind doing something similar, but only for word and publisher files. Can you tell us how to use the shell to talk to these programs? Or would that be program independant?
|
|
|
|
|
Word and Excel use DDE (not support by the .NET BCL) to let the Shell tell Word or Excel what to do with the file. It's easy enough to see the commands. ALl you have to do is open Explorer, go to Folder Options/File Type and find the DOC type. Click on it and then click Advanced at the bottom of the window. You'll find the Print and PrintTo commands there plus the command line to launch Word and the DDE commands to send to it to get it to print the doc.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi...
Is it possible to move the cursor to center of the screen when my app is loading?
and if it is....can someone please tell me how to do it?
I have thought about to use the Draw method... But i dont know how to use it
QzRz
|
|
|
|
|
You can set the position of your cursor by using the System.Windows.Forms.Cursor.Position property. The following code should center it on the screen.
using System.Drawing;
using System.Windows.Forms;
Cursor.Position = new Point(SystemInformation.WorkingArea.Width / 2, SystemInformation.WorkingArea.Height / 2);
www.troschuetz.de
|
|
|
|
|
Thanks... it works!
QzRz
|
|
|
|
|
Hi,
Please consider that there are many
users that have graphical tablets/pen
as pointing devices instead of/in parallel with
a mouse. (i have a Genius tablet)
Your method is in that case instantly overriden by the
next pen position event (which occur at a rate
of > 100-1000 times/sec), therefore:
For these devices it is always the absolute position
of the pen where the cursor will be, no matter where
your program puts it.
This also is the case of course for Tablet- and Pocket PC's
IMHO, moving the cursor programatically is not very user
friendly, because if you move it out of the area where the
attention is, the user then has to look where it is.
It's like taking control away from the user
Mouse drives often have a feature to move the cursor
to the default dialog button. I always disable this.
Regards
Ted
|
|
|
|
|
How to measure sound level on sound card input in decibel? I need to write a program in C#, which alert when the sound level is less the threshold (n db).
|
|
|
|
|
It's not possible to do because the sound cards do not support input based on decibels. You would need to set the levels on the the Microphone to known values, and keep them there, then you would need a calibration device that measures decibels and a source of calibrated sound to know at what levels the Microphone is hearing the sound. Once you have the input levels mapped to known decibel values, then you can just monitor the mic for known decibel levels of sound.
Someone asked this very same question about a month or two ago...
Hmmm....
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
But how programs like SoundForge, Adobe Audition (CoolEdit) or any other audio programs show the level in db of the sound without any Microphone or calibration?
> Someone asked this very same question about a month or two ago...
I try to found in this board messages about this problem? but i found nothing.
Many years ago i create such ptogram on pascal under dos. But now i need to write it on C# under Windows. I can't find any docs about this theme.
|
|
|
|
|
That's because you're under the impression that "decibel" is a measure of the loudness of a sound. It's not. It's a measure of relative signal strength. Those programs are showing you the decibel power of a small sample of a signal relative to itself, or the signal strength around the sample. There is absolutely no way a sound card can tell you what the decibel power of a sound is because it has no reference to compare it to.
Don't bother searching for the answer to the previous question. It's the same as this one.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
For my application i need grid control having future of typing data in grid cells. like billing. any suggestion or any samples send to me. make cc to murali_utr@vsnl.net
thanks in advance!!!!!!!!!!!
Have A Nice Day!
Murali.M
|
|
|
|
|
I have written a billing system using the dataGrid control. Let me know exactly what you are looking for and I might be able to help you out. But please, keep it in the forum instead of private e-Mails, as it may help others as well.
|
|
|
|
|
hi,
thanks for ur reply. in case of DataGrid is faced some problems in vb 6.0. so afraid about datagrid then only searching any other control. I don't know how this working on C#.Net. How u feel datagrid in ur project. it's ok to do?
Have A Nice Day!
Murali.M
|
|
|
|
|
The .Net datagrid seems to be very stable and easy to use. I wouldn't hesitate to include it in your form. The simplest method I have found for using the datagrid for this type of project is once you have an invoice or order ID, you bind your datagrid to a dataset with "items" that are being purchased. Each of these items has a column for Invoice/Order ID as well.
I think if you use the datagrid, you'll be happy with your choice. For a project such as this, there are a few details you have to keep in mind, such as calculating line totals from the price and quantity. If you need help with things like this, just keep replying in this post, or start another one...I don't respond much, but I read the questions on codeproject almost every day!
- D
|
|
|
|
|
Hello everybody
Can anybody tell me how to generate Msn Messnager 6 or higher's chat log styled XML Decuments.
Cheers
take care byee
Rizwan Ahmed
|
|
|
|
|
Can you be a little more specific? Have you even read the .NET Framework SDK for the System.Xml[^] namespace, or are you just looking for someone to do the work for you. You won't find the latter here.
This forum is for asking specific questions, not finding free help. Read the documentation for classes like the XmlTextWriter or the XmlDocument and, if you have questions, ask here.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
thank you sir. actually i wanted a quick hellp coz i have never studied it nut want to use some where in my project.
1. for a little data base
2. dor genrating well formed documents.
any wayz thnx for reply
God bless
byeeee
Rizwan Ahmed
|
|
|
|
|
There's plenty of articles here on CodeProject dealing with such topics - just search or browse the categories. "quick help" won't teach you anything.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thnkxx again sir
|
|
|
|
|
Hi
Now I try to work with C#,but my trouble common and with COM programmin in standart C++. My application had to process an *.xml file through Excel COM. Cause of I use native Excel help for VBA : “VBAXL9.CHM” .But there is any troubles .When C# generate proxy for excel object it not consider about optional argument and cause of I should explicit pass this arguments every time in methods call. In many places into excel help referenced behavior of an methods with parameters by default (optional parameters which omit), but I don’t know what it are.
Where I can learn about definition of this defaults parameters????
|
|
|
|
|
Use Missing.Value , or something like this for optional parameters:
object missing = Missing.Value;
excel.Save("filename.xls", ref missing, ref missing, ...); (Note: this is sample code; it won't compile)
The help still applies. Since the RCW (Runtime Callable Wrapper) is generated over the typelib, the types and members are the same (may marshal a little differently; knowing comes from reading and experience).
Read Interoperating with Unmanaged Code[^] in the .NET Framework SDK - especially the parts about COM interop and COM marshaling - for more information.
Microsoft MVP, Visual C#
My Articles
|
|
|
|