|
This is actually what i suggested to friend doing database a couple years back having had similar problems when i knew nothing about SQL or ASP, but logic was the answer
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
Hi all
If anyone is interested, and I'm sure that there are many can test my sound library for .NET. It is basically a wrapper for BASS, a multipurpose commercial quality sound library ( BASS Homepage [^]). Most of the functionality has been implemented.
I felt as this hasnt been implemented fully and there are still some bugs, it doesnt quite deserve an article yet. The library is accompanied with a Windows help file (nDoc) with most functions included.
If you have queries or suggestions, do not hesitate to contact me This is all work in progress, so dont complain .
Hope u have fun
Before i forget, the URL nBASS 0.9 Source, Bin & Doc[^]
I will try add a few examples when i have time.
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
No problem.
43 68 65 65 72 73 2c
4d 69 63 68 61 65 6c
|
|
|
|
|
I have updated the source a bit after the Timer suggestion from James.
I have also included tests, a CD Player (plays from default CD drive) and a MOD player (plays range of formats) and a Stream Player (WAV files, MP3 ,OGG).
nBASS-0.9.1-src.zip[^]67kB
and i upload bass.dll[^]110kB
The tests/examples will should how easy it is to use
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
Just and FYI...
There is already a free full .NET api wrapper for BASS, provided by them. If you want to check it out, you can download the source.
However, just compile it to a DLL and use if you want also.
Aalst
|
|
|
|
|
Yes I know, but #1 that is written in VB.Net and #2 it is NOT "managed" or OO. If you have look at my code you can see how I have implemented this.
So if you wanna worry about handles, marshalling, releasing resources and running events as delegates directly from your your program, feel free to use the VB.Net one
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
how to use vc++ function SetWindowsHookEx in c#?
is its equal function exit in c#?
r00d0034@yahoo.com
|
|
|
|
|
[DllImport("USER32.DLL")]
public static extern HHOOK SetWindowsHookEx(int idHook, HOOKPROC lpfn, HINSTANCE hMod, DWORD dwThreadId)
this is all the informaion that i can give. im not sure if the DWORD in C++ and C# are the same, so u may have to use a diferrent type there, icant help you there, maybe someone else can.
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "All programmers are playwrights and all computers are lousy actors."
|
|
|
|
|
Hi,
How can I use Raster Fonts in TextBoxes?
(it seems raster fonts are not supported in .Net!)
Thanks,
Nima.
|
|
|
|
|
Try this, create 3 propertygrids, assign any objects to their selectedobject property, then call a timer every say 100ms doing a refresh on all the propertygrids. You will notice that all propertygrids collapses and expands when the plus or minus sign has been clicked.
Im sure this is not meant to happen...
This is very easily recreatable. Now if I only knew how to upload samples...
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
|
It appears to be a bug with Refresh; you don't even need the timer object.
I modified your sample to put buttons below each grid, each button called refresh on the grid above it. Closing or opening one grid would cause the others to follow suit when their button was pressed.
BTW, there is a bug in your test program. You call Refresh from the System.Timers.TimerElapsed event; this results in the delegate being called on another thread where you shouldn't call any methods or set any properties except for BeginInvoke, EndInvoke, Invoke, and CreateGraphics.
To make it compliant I just made a minor change:
The code added first checks to see if it can execute properly, if it can't (InvokeRequired returns true) then I call Invoke on Form object passing in a delegate of the same type as the method (System.Timers.ElapsedEventHandler) and the two parameters as an array of objects. After the call to Invoke I return since the rest of the method has already completed.
void Timer(object sender, System.Timers.ElapsedEventArgs e)
{
if( InvokeRequired )
{
Invoke(
new System.Timers.ElapsedEventHandler(this.Timer),
new object [] { sender, e }
);
return ;
}
...
}
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
Thx James
James T. Johnson wrote:
BTW, there is a bug in your test program.
Would programming it "unthreadsafe" make such a big difference in something as small as this? Could this cause a CreateHandle() error I sometimes see?
What other side effects could happen or is this just the "safe" way to go to make 100% sure?
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
leppie wrote:
What other side effects could happen or is this just the "safe" way to go to make 100% sure?
The known side effects are just odd behavior; which is what makes this type of bug so bad. Sometimes the code will work other times it won't.
Better to be safe than sorry
It appears that you could also have set the SynchronizingObject property of the Timer to a control (such as the Form).
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
How can I find out if some a file or a directory is access denied for read or write?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
How about this if you check for a files read/write protection:
FileAttributes fa = File.GetAttributes(@"C:\TheFile.txt");
if((fa & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
{
}
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
ReadOnly attribute is not a file security.There are some directories or file that maybe you can't even read.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
I saw a post about 2 weeks ago regarding the NTFS File Security attributes, unfortunately my GPRS connection takes ages to surf, so mite just wanna try a search for it or the article (metioned in the post) on CodeProject.
Hope u find it, else i'll post the link later
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
This article?:
NT Security Classes for .NET
Thank you.I'll check it out.Of course its MC++.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Along with Anakrino, I recommend that one (MS shared source) to get to know how all this works behind the wheel,
Anyone ever tried to attach these symbols to a debug session by the way ?
-- modified at 10:59 Friday 14th October, 2005
|
|
|
|
|
How can I find out if a string exist in another string.Something like strstr in C++.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
|
Hmmmm,Good idea.Thanks.
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
an alternative to that is to use te StrringBuilder class, but that would mean initialising extra variables that arent really needed.
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "All programmers are playwrights and all computers are lousy actors."
|
|
|
|
|
Why can't you set an instance of a struct to null? And therefore you cannot test a struct for null.
Which if this cannot be done really really sucks big time. I get compiler errors when I try to set an instance of a struct to null or test it for null.
I have checked my 3 C# books, and none of them even talk about it, and none of them never even use the word null in the book even once.
If this is true this is very stupid, it creates more work for some coding solutions.
In case it is important the struct in question is a "System.Drawing.Rectangle".
The errors:
#1: error CS0037: Cannot convert null to 'System.Drawing.Rectangle' because it is a value type
#2: error CS0019: Operator '==' cannot be applied to operands of type 'System.Drawing.Rectangle' and '<null>'
This is one reason I dislike structs.
Thanks,
Aalst
>> UPDATE
I figured a way around this. Setting a instance of a Rectangle to Rectangle.Empty, and then testing with IsEmpty property.
This works, but still doesn't tell me why, just that the implementor was prepared for it.
Anyway... still would like to know why (besides that it is a value type). Why Structs which are so similar to objects, and act like them in so many ways, can not act like them in this way thats all.
Thanks again,
Aalst
|
|
|
|