|
Boy, all that typing and you haven't written a single line of code.
You're not going to get anyone here to write this for you. You've got to do the research to get something started. At least an ATTEMPT to write the code.
Start simple. Just get the OS version and see what you can do with it.
Environment.OSVersion[^] docs
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Try looking within the System.Environment namespace for a variable storing the OS.
|
|
|
|
|
I'm writing an application that displays the rtf documents in RichTextBox. It is read only. My documents use 4 ttf fonts those cannot be found on the system. I want to embed these fonts in my application and when my application starts, the RighTextBox in my application can show my rtf documents properly. I have found some samples that embed the font file in the application and the embedded font can be use in runtime. But I don't know how to assign my embedded font to RichTextBox because it can display multiple font and I cannot use font property in RighTextBox . TextBox Control is OK because I can assin my embedded font to the font property of TextBox.
Ant
|
|
|
|
|
|
Thank your your response. I already have PrivateFontCollection object in my program. But I don't know how can use that object to RichTextBox control. There is font property in RichTextBox. My rtf files use more than one font and assigning to that property does not work.
Ant
|
|
|
|
|
Hi Ant Htoo,
I was excited to see the topic you posted. i am eagerly looking for solutions to display MS Word Document in RichText Editor. Can you give me any clue link or easy Code snippet for that ?
Thanks
Emran
|
|
|
|
|
Hi Emran,
Im my case, I try to display rtf files not MS Word files in RichTextBox. Here is code snippet for that.
FileStream fs = new FileStream(fileName, FileMode.Open);
richTextBox1.LoadFile(fs, RichTextBoxStreamType.RichText);
But it cannot display MS Word file. I don't know is there any ActiveX control or .NET Control to display MS Word Documents. But the similar problem we have solved is to display Power Point files in the application. In that case we convert them into html files and display in the application. We can create PowerPoint object in the application and load the PPT file and convert it into html file from application. Just like Save As html. In you case, you can do the same thing.
Ant.
|
|
|
|
|
Thanks Ant. I got the Idea.
|
|
|
|
|
I would like to launch my mail client (outlook or norvell for e.g.) from my application, some guys suggested this code:
System.Diagnostics.Process.Start("mailto:someone@foo.com?subject=TEST&body=SOMETEXT&attachment=C:\\outtall.pdf");
but it just ignores the attachment and opens a new email with just the subject and body filled out
anyway got a clue?
|
|
|
|
|
|
I am very new to C# and I am strugging, could you perhaps give me the code, I am unsure of where to look etc?
|
|
|
|
|
Hi,
Guess the following link will help you.
http://dotnet247.com/247reference/msgs/49/245383.aspx
Thanks and Regards
Pani
|
|
|
|
|
Will nobody think of the Clicketies[^]
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"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
|
|
|
|
|
Hello All,
I design a server which can do audio & video streaming which is captured by different media player.
I complate audio section. But I don't know how to do video streaming. Can I anybody know how to do this. Plz help me as soon as possible.
regards,
Divyang Mithaiwala.
|
|
|
|
|
|
hello leppie,
I see your link bu they provide complate software not any tool that we can use via C#.Net.
|
|
|
|
|
You said you can't use that SDK in C#?? Hmmm...I guess those C# examples in the documentation are just a dream then.
I guess the "SDK" part of that name doesn't stand for Software Development Kit.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Sorry sorry sorry Dave,
I am very sory. Because i go to wrong Link. & I found nothing which is telling by you.
Any way I got that SDK. & It is very usefull to me.
Thank you very much
Regards,
Divyang Mithaiwala
|
|
|
|
|
Hello all, Can you provide me any good article or Available Control's Resource Website to Perform Email Attachment (BLOB : MS Word) Directly from MS SQL Database ( Windows Form ) in C# ?
|
|
|
|
|
Hi ,
Recently I read an article and I came to know that, C# application actually is an Assembly which can be easily DisAssemble with some software and people will be able to see the source code. If it is true, then, is C# is kind of a HTML language which is open for all ? or There is really some way I can wish not to disclose my Source Code. Moreover, If I make my Application to check a Liscence Serial number to verify genuine User, The pirator can DisAssemble my Assembly and See the Serial number part of the code and fool the software, right ? So, What is the solution ?
Emran
-- modified at 3:19 Wednesday 1st February, 2006
|
|
|
|
|
emran834 wrote: C# application actually is an Assembly which can be easily DisAssemble with some software and people will be able to see the source code
All .NET applications (whether they are written in C#, VB.NET or whatever) compile to MSIL. The .NET Framework SDK comes with an application called ILDASM that disassembles this IL code.
There are some tools, such as Reflector for .NET[^] that will generate C# code that looks somewhat similar to the original.
emran834 wrote: If it is true, then, is C# is kind of a HTML language which is open for all ?
No, it is nothing like HTML. For a start you cannot edit it in a text editor. However, it is open and it can be read with a suitable application. It needs to be for things like reflection to work.
emran834 wrote: There is really some way I can wish not to disclose my Source Code
You can use things like obfuscators to make it more difficult. But rememeber that even native assemblies can be disassembled. The bottom line is that the application code will have to be readable at some point in order for the computer to actually run it. There is no solution that will work in its entirity - only solutions that make it more difficult.
emran834 wrote: If I make my Application to check a Liscence Serial number to verify genuine User, The pirator can DisAssemble my Assembly and See the Serial number part of the code and fool the software, right ?
If it is a serial number then are you compiling a different version of the software for each and every user? I think you really need to think about your licence management strategy a bit better. You may want to think along the lines of producing an digitally signed encrypted file that your application can decrypt and verify came from a genuine source.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"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
-- modified at 4:12 Wednesday 1st February, 2006
|
|
|
|
|
Hi Colin Angus Mackay,
Thank you for clearing my concepts. Ok, I have a confusion. Is it really possible for anyone to modify my distributed program in his own way and start reselling it ? I mean, he can do reverse Engineering and get the code and change the CopyRight Infor into his name and modify anything he wants ?
About Liscence matter, I am planning to distribute my software and user will have to be registered in my website. And then, everytime he use the software, software will connect to internet and send the User's Id number, and my Online PHP program will check if the ID is a Valid User, if So, then PHP will send back Position Permission to run the software. And Software will wait for the response from Website. Once Website confirms then it will run. So, Is this way safe way to protect my software or someone can modify the software so that the software will not need to wait for Website Response to Run.
Thanks and regards
Emran
-- modified at 4:59 Wednesday 1st February, 2006
|
|
|
|
|
emran834 wrote: Is it really possible for anyone to modify my distributed program in his own way and start reselling it ? I mean, he can do reverse Engineering and get the code and change the CopyRight Infor into his name and modify anything he wants ?
Yes, and that applies equally for any application regardless of how it was developed or the operating system it runs on (or even if it is the operating system). Obfuscators just slow down an attempt to do this.
emran834 wrote: And then, everytime he use the software, software will connect to internet and send the User's Id number, and my Online PHP program will check if the ID is a Valid User, if So, then PHP will send back Position Permission to run the software.
And if the user doesn't have an internet connection at the time they run the application? There are also privacy issues to deal with. Will users agree to have the application call home each time it is run? They could consider it a breach of privacy.
emran834 wrote: So, Is this way safe way to protect my software or someone can modify the software so that the software will not need to wait for Website Response to Run.
Yes, it would be possible (although improbable) that someone might modify the software to bypass this. So far, there hasn't been any licence manager that hasn't been cracked by someone.
The way I see it is that a licence manager is just a device that slows down potential software pirates and irritates genuine customers by you treating them like criminals.
As I mentioned there could be a licence file that contains details of the licence, how long it is valid and so one. This would be digitally signed (so the application would know it comes from you) and would be encrypted. This would be a one time action (or once per licence period). The file would be encrypted with a public/private key. You hold the private key, everyone has the public key (so everyone can decrypt the licence file - this is just to prove the authenticity of the file). The file would also contain a hash value (the digital signature) which shows that the file has not been modified or tampered with. If a cracker wants to create their own licence file then they would have to find the private key (which you never give out). It doesn't matter that anyone can read the file as to modify it they would need the private key.
This is what I would see as a reasonable compromise. The bottom line is that all the security measures you put in place to keep your application out of pirates' hands cost you money. How likely is it to be pirated? Who are your user base? How much are you charging for the software?
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"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
|
|
|
|
|
Hi Colin Angus Mackay,
Thanks for your reply with valuable information. So, it tooks like, only digitally signed liscence file is an efficient way to give the pirator Hard Time. Would you please show me any URL of an Article about how to perform this operation , I mean how to make Digitally Signed liscence key, Private Key, etc.
Thanks again.
Emran
|
|
|
|
|
emran834 wrote: So, it tooks like, only digitally signed liscence file is an efficient way to give the pirator Hard Time
Not the only way, just the way that I would suggest is a balance of costs and effectiveness.
emran834 wrote: Would you please show me any URL of an Article about how to perform this operation , I mean how to make Digitally Signed liscence key, Private Key, etc.
The best souce I've come across is actually from a book: C# Data Security Handbook[^] - It is quite a complex area (which is why many people buy pre-built licence managers) but the book does a very good job of building up knowledge from little or no existing knowledge of cryptography.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"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
|
|
|
|