Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Is it possible to load *.tga file in picturebox?
Actually i need to create a container that can display pictures and also video clips, but first i was looking for something to load TGA files.
Sure you can! Look at TargaImage.
Alternatively, you could look at DevIL but that might be a bit of an overkill depending on your situation.
By Default, TGA files are not readble by .NET as no internal TGA file handler is there in the Framework...
But If External Class Libraries are OK,
You can use The .NET Targa Image Reader from CodeProject to read TGA image in a PictureBox...
You will find some example codes at the Linked Page to load TGA images in normal PictureBoxes...
And Dont forget to check the comments there, there is a Simple But Necessary Fix mentioned there...
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a short[] array filled with 16-bit pcm values.
I want to be able to play it without adding any header, and without saving any files to my memory.
I know that I might need a class that gives parameters like bit rate and stuff like that - but I want to do it all in my program without and files.
I am working in C#.
Thanks ahead,
Ofek
Install CSCore through nuget.
Then write all your shorts into a memorystream (you can use the binarywriter to do that).
After that use the CSCore.Codecs.RAW.RawDataReader to create an audiosource from your memorystream by specifing the format (16 bit, pcm, samplerate, channelcount).
After that you can use for example the CSCore.SoundOut.WasapiOut class to playback the stream.
You can take a look at the little sample on codeplex (bottom of the page). http://cscore.codeplex.com/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I would like to read in a .cs file from my project which contains a code sample for use by clients of my company's API.
What's the best way to read in this file and pretty-print it to the page with indentations etc. The goal is to just have the code on the page automatically change when I update the contents of this file so that the code sample will always be up to date as published on the live site.
An example of what I'm attempting to accomplish is something similar to this: http://msdn.microsoft.com/en-us/library/vstudio/ezwyzy7b.aspx
I'd use this...
http://www.manoli.net/csharpformat/
http://www.manoli.net/csharpformat/CSharpFormat.zip
It transforms C# code into html. You can read the file run it through the CSharpFormat then output the HTML to a panel in the page.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to decrypt the files that are on a VB6 install package. Once files are in the installer are like file.bm_ and when I decrypted this file, this file is named file.bmp. I try with the program win.rar and saw recognized as encrypted files and decrypted well, but I don't know how to do this from an application in c#.
Thank you.
Ok, had to find these.
If GZip doesnt work and you need a last resort. There are some DOS files bzip.exe, bunzip.exe and a win32 version that you can still likely find somewhere on the net. Mine are dated 2007 but they still work as far as I know (last I think I needed them was on XP 64, 2011). The upside is that they handle several compression formats.
Like I said, a last resort.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to write an employee maintenance program (in C#) that can add, change and delete from a text file. I have the HTML all put into an .aspx file but I have NO clue on how to set it up to read from a text file and populate the input fields with the employee to maintain.
If I could get some insight on how to read a text file and populate the input fields(form fields) that would be great. Even a link that explains it since I haven't been able to find one. The text file will have to have a record ID as the first field so I know which one to grab for editing(to display) or deleting.
There's a toolkit of functions to manipulate files in the system.io.file class. That's a reasonable start for the project.
You might also consider using a database instead of a text file. They're designed to handle storage and retrieval of data that changes a lot. A text file is doing it the hard way.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Is there a way of removing the text from a pdf file using c#?
Yes, using the open source project iTextSharp
Creating a basic PDF file:
http://www.devshed.com/c/a/Java/Creating-Simple-PDF-Files-With-iTextSharp/
http://www.developerfusion.com/code/5682/create-pdf-files-on-fly-in-c/
You will need to create a new PDF, open the original.
Iterate through all the objects you find, remove the text and add the old objects to the new file.
The icky part is that after you remove the text, you will have to reposition objects in the pages following the deleted text.
If you do happen to do it, you got yourself a very interesting blog post...
There are several libraries, free and commercial that can assist.
I'm most familiar with pdfNet by pdfTron. However, I've only used it in a read-only context
I assume it will work for you as "...Add/remove/edit images, text, and vector graphics..." is one of the uses they claim its capable of.
Below is a link to their documentation online. It's a rather detailed API so be prepared to read.
http://www.pdftron.com/pdfnet/html/main.html
As for other vendors, I know Adobe has a reseller that licenses their API in a C# form. I don't recall the product name off the top of my head. If memory serves me correctly it's pricey by comparison to pdfNet and it resembles an old style c (not even C++) method of programming. It won't be a comfortable fit if you're only used to C#.