|
Ok this might sound like a very dumb questions to many ppl but I have got to understand it so ignore the dumbness of the question .
Anyways, in windows applications (for e.g. Quicken, QuickBooks, MS Money or any other data-extensive application) how and where do they store the data? Do they use a database? if they use a database then why don't they ask us to install a database engine (which should be a prerquisite - MSDE for instance)?
If they don't use database then how in the heck do they keep up with the relational data?
Your help will be appreciated . Thanks in advance.
|
|
|
|
|
I don't know how they store their data, but I guess it's some custom binary format.
But for your own applications you might want to use SQLite.
It's a database similar to MySQL (though lacking some feaetures) which stores a database into a single file
For C# (and .NET) you can use the Mono.Data.SQLite class in your applications
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
How can i play a simple wav file with my application?
rzvme
|
|
|
|
|
Not sure if there's anything built in ( for C# 2.0, I thought there was ), but the PlaySound API can be interoped for wavs, for mp3, you can use the Windows Media Player control.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i know there is a playsound function and i read on msdn that it is on coredll.dll. the only problem is that i don'y have a coredll.dll.
rzvme
|
|
|
|
|
|
You are looking for one of these functions
[DllImport("Winmm.dll", CallingConvention=CallingConvention.Cdecl)]
static extern int sndPlaySound(IntPtr buffer, int dwFlags);
[DllImport("Winmm.dll", CharSet=CharSet.Ansi,
CallingConvention=CallingConvention.Cdecl)]
static extern int PlaySound(string filespec, int hModule, int dwFlags);
Luc Pattyn
|
|
|
|
|
|
I have bound a DataTable to a DataGrid:
_ds = new System.Data.DataSet("ResultsDataSet");
_resultsTable = new System.Data.DataTable( "ResultsTable" );
_ds.Tables.Add( _resultsTable );
dataGridResults.SetDataBinding(_ds,"ResultsTable");
When the user clicks on a row, I want to get information about that row:
System.Data.DataRow currRow = _resultsTable.Rows[dataGridResults.CurrentRowIndex];
This works fine until I sort the DataGrid by clicking on the column headers. Now the dataGridResults.CurrentRowIndex is out of sync with the _resultsTable. I either need to have the DataTable sort with the DataGrid, or be able to get information directly from the DataGrid. Am I doing something wrong, or do I need to add something?
|
|
|
|
|
Hi,
try this:
System.Data.DataRow currRow = _resultsTable.DefaultView[dataGridResults.CurrentRowIndex].Row;
Robert
|
|
|
|
|
That helped. I had to tinker with it a bit more, but it is working now.
Thanks
|
|
|
|
|
Hi everyone,
Here's what I'm trying to do. I create a RichTextBox object and set some text (in code, I'm not adding it to the form). I want to take what it would look like and draw it onto another control (like a panel).
Am I able to do this somehow? Is it possible without Interop junk?
Thanks,
Nick Spacek
|
|
|
|
|
Are you trying to add one programatically created control to another programatically created control ?or are you trying to add that text box to control added Via the designer?
|
|
|
|
|
Nope, not at all. I just want to take what the RTB control would be drawing and draw it onto the panel control somehow.
|
|
|
|
|
I thought that .NET controls have a method for painting to a bitmap ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
On that note, I went searching. I managed to come across this article where they draw a web browser control onto a picture box and save it:
http://www.developerfusion.co.uk/show/4712/[^]
Thanks for idea, hopefully there's something a little more .NETish though...
Nick
|
|
|
|
|
No, I thought there was a framework method for rendering a control.
But, I can't see it now, so I could be wrong.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I tried this out and should have realized it wouldn't work quite the way I wanted. For this to work, I think it actually needs to be a visible control since that's the way the BitBlt works...
Nick
|
|
|
|
|
nickspacek wrote: I want to take what it would look like and draw it onto another control (like a panel).
I'm going to ask a silly question. Why not put a RichTextBox control on the panel instead? Seems like you want to do things the hard way?
|
|
|
|
|
Haha, well, it's a good question. I sorta had this idea that this is the best direction to go but I could be completely wrong. Basically I want to have this panel be a media container (stupid name) or something. I stumbled upon another class here that uses DirectShow to render a video given a handle and bounding rectangle. So the idea is to use just some generic control to draw everything on. I could probably have my app switching between different controls I guess...
There's probably a completely better way to do it all. If I want to use DirectShow for videos I suppose I should use DirectX to render the text and stuff too, but then I'd have to write some sort of class for describing rich text, etc. I may go that way in the future I suppose.
Nick
|
|
|
|
|
hi
i want to set opacity of picturebox (like Form), But how to do ??
thanks ..
|
|
|
|
|
Don't. Instead, draw your picture directly onto the form and set the opacity that way. ImageAttributes is the class you need to create and pass in to the DrawImage method of the Graphics class in your paint method.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi
thnaks for reply .
but i want to add picturebox and other controls in form and set opacity of picturebox.
but how to set opacity of picturebox ? do you know a way ??
thanks
|
|
|
|
|
hdv212 wrote: do you know a way ??
erm... what did I say ? Picture boxes are great for drawing a bitmap quickly, espcially if you prefer to drag and drop components, to writing code. But, they won't let you do what you want, you need to write actual code to do that.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello! I'm trying to write a function that checks whether a given value is in a range defined by a minimum and a maximum. I tried this:
public static bool ValidateNumber<T>(T tNum, T? tMinimum, bool bMinInclusive,
T? tMaximum, bool bMaxInclusive)
where T : IComparable<T>
I think it's pretty obvious what I'm trying to do The minimum and the maximum should be optional, therefore nullables. Anyway, the declaration above gives me a compiler error CS0453 ("Type T must not allow NULL values, if it is used as T parameter in the generic type or in the generic method System.Nullable<T>").
How does the correct declaration look like in this case?
Best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|