|
Mark,
BinaryReader/Writer should be much faster, however as you are using it only on a small settings file that will propably only be read at startup and saved only when the user changes something. The BinaryFormatter should be fine.
However writing your own file format is somewhat additional work, it simplify upgrades of your software. The formatter might fail when you add, change or remove fields in your settings.
Why can't you use System.Configuration do the work for you, it was made to handle settings (stored in .config files so you can put them on your USB stick).
Regards,
Jelle Hissink
|
|
|
|
|
Jelle Hissink wrote: Why can't you use System.Configuration do the work for you, it was made to handle settings (stored in .config files so you can put them on your USB stick).
Because the settings files are written to the user's "%UserName%\Application Data\Program_Name\" folder, and these are also XML (text) files. The binary disk file, is in the same folder as the application and is always available. So, if I move the application to another PC my settings are there too.
This obviously wouldn't work with registered DLL's and other support files that would require a hard disk install.
Mark
|
|
|
|
|
|
I'm trying to recieve information from my MIDI keyboard, a Casio CTK-800, to be exact. It connects to the computer via USB. So, what I need to know is...
1. How can I find out which keys are being pressed down?
2. Is it possible to play sounds through the MIDI keyboard's speakers (as in, not midi sounds, sounds like vocals)?
3. Is it possible to recieve input from the microphone connected to the computer?
Help would be much appreciated. Thanks!
Hippophobia - Fear of horses. What?
|
|
|
|
|
The very first search result for MIDI keyboard c# returns this result[^]
Why don't you use search?
|
|
|
|
|
I tried searching, but couldn't find anything... Guess I was typing the wrong words! Thanks for the help, anyway.
Hippophobia - Fear of horses. What?
|
|
|
|
|
Hi,
I was wondering if it would ever be possible to do things like
for example: put music into 1kb without quality loss or something like that?
I didn't know in what forum to place it and since I program in C# I thought let's post it here.
|
|
|
|
|
It doesn't seem likely to me. It would requre on heck of an algorithm.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Let's face it, you can't store any sensible amount of data (music, video, code) in 1024 values with a range of -127 to +127.
It's just not possible.
|
|
|
|
|
That will depend entirely on your definitions of music and quality.
If you want to reproduce an existing recording, you will need lots more.
If you have the perfect electronic instrument and all you want to remember is a few pages
of the score, then it can be done.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
No, that's not possible.
Any piece of data contains a specific amount of information. You can't compress anything to be smaller than that amount without losing quality.
Generic lossless compression, like rar or zip, can typically compress data to 50%. Specialised compression, like png, can do slightly better, perhaps 30-40%. The theoritcal limit perhaps is 20%, and future compression algorithms will get closer to that, but never below.
If you are talking about compressing a song into 1 kb, that would mean compressing it to something like 0.005%.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hello
I create a DataSet and i fill it from the table i want from the database
how i can fill the datagridview from the dataset with a specific data
i use to fill the dataset just just by the data that i want and i assign the source and members for the datagridview so it show everything in the datagridview
i need to know how i can show a specific data in the datagridview from the dataset
Thanks very much
Assaf
|
|
|
|
|
I saw an article here on CP long ago which saves images to a dll at runtime and we can also retrieve them at runtime, do you have the link for that
or
any way to save and retrieve resources to resource manager at runtime
Thanks And Regards
Amar Chaudhary
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
I don't know which article do you mean by this articles shows a similar thing: SlideShowBuilder[^]
|
|
|
|
|
A quick look shows that I can find solution in this after some cropping
Thanks and Regards
Amar Chaudhary
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
Yes you will need to make some modifications but not major ones.
|
|
|
|
|
its working
Thanks a lot
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
Can any one tell me how to load xml grammar from file? In sapi 5.1 using sppechlib namespace, we can load it through SAPIGrammarfromfile("name of file"), but how to do this in .net 3.0 using system.speech lib?
Heres the method for loading Grammar in .net 2.0, using SpeechLib namespace.
SAPIGrammarFromFile("XMLActivate.xml");
|
|
|
|
|
How i can delete a sepecific table from a dataset
Thanks in advance
Assaf
|
|
|
|
|
myDataset.Tables.Remove ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
well i remove the table from the dataset but the datagridview didn't show the new data
i put dtgCreditInfo.Refresh();
Thanks in advance
Assaf
|
|
|
|
|
You can use mydataset.Tables.Remove() or mydataset.Tables.RemoveAt()
|
|
|
|
|
well i remove the table from the dataset but the datagridview didn't show the new data
my code is:
ds.Tables.Remove("CreditCardInfo");
adap.SelectCommand = cmd;
adap.Fill(ds, "CreditCardInfo");
dtgCreditInfo.DataSource = ds;
dtgCreditInfo.DataMember = "CreditCardInfo";
dtgCreditInfo.Refresh();
thanks in advance
Assaf
|
|
|
|
|
hi
i'm using mssql server express edition like server with a internet connection.
i wanna connet my database remote machine which have internet connection from anywhere for only select statement.
But i dont wanna using ISS.
how can i solve this??
murat
|
|
|
|
|
hi
you dont need iss to run remote connections in sql server 2005 express.
try this link:
link
i've also had to set a specific dynamic port for all ip's.
In SQL Server Configuration Manager choose SQL Server 2005 Network Configuration and Protocols for server name (default SQLEXPRESS).
Now choose TCP/IP and in IP Addresses tab in IP ALL set TCP Dynamic Ports to something else.
If your SQL Server is on pc which connects to internet thats all, if not you must direct chosen port to your pc with SQL Server (it's IP adress in LAN)
Pawel
|
|
|
|