|
Humpo wrote:
I've just discovered that the titles of some mp3s have nuls not just at the end. e.g {O,n,e, ,\0,U,2}. so have written my own method to remove chracters less then 0x20 and greater than 0x7f
Then they are maybe ID3v2 tags...... My class strictly conforms to the ID3v1.1 specification. If it doesnt work, the TAG it self is WRONG!
Cheers
PS: Good luck if you are try to implement ID3v2, I gave up before even attempting it.
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
No ID3v2 tags.
I have over 8,000 MP3s, my program scans the disks for them and produces a list of mp3s in html. Unfortunately I never created the mp3s for most of the tracks, so some may have no tag at all, or a corrupt tag depending on how they were created – not seen any ID3v2 tags yet. If there is no tag, I simply use the file name.
thanks
|
|
|
|
|
I am writing Windows application in C# (VS .NET Release). When exception is thrown by framework in some function (for example, I try to call function of the object which is not created), Visual Studio debugger doesn't point to the line which caused the exception. Instead of this it points to the last line of Main function:
static void Main()
{
Application.Run(new Form1());
} // <- debugger points here
Stack window contains this line and all other lines point to .NET functions.
I found some workaround. In Debug - Exceptions dialog there is exception handling algorithm:
When exception is thrown:
- Break into debugger
- Continue
Standard choice is "Continue". If I change it to "Break into debugger", I have full exception information (stack contains all my functions, debugger points exactly to the needed line).
However, this is not a good solution. If I throw exception in my program, debugger breaks on it also.
|
|
|
|
|
Does anyone have a list of the equivilent data types in C# of the MS defined data types of HWND, HANDLE, DWORD, etc..
I need it so I may use it to define some WinAPI calls I need.
Thank you
Raiko
|
|
|
|
|
IntPtr
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|
|
You can use Marshal.PtrToStructure to convert your unmanaged to managed object.
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
|
|
|
|
|
Raiko wrote:
HWND, HANDLE, DWORD
HWND, HANDLE = IntPtr
DWORD (double word) = int (or uint if data is to big)
Have a look at this table(sorry no web link):
Marshaling Data with Platform Invoke[^]
Have a look at the Platform Invoke Data Types link, it has a nice table for most conversions
Cheers
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
That helped out alot
unfortunately, my findwindow call always returns 0.. That is, when I output it in a messagebox by converting it to a string. How do you put NULL into a string?
[DllImport("user32")]
public static extern System.IntPtr FindWindow(string lpClassName, string lpWindowCaption);
How it's declared..
|
|
|
|
|
I implement ::FindWindow in this[^]article.
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|
|
Raiko wrote:
How it's declared..
[DllImport("user32")]
public static extern System.IntPtr FindWindow(int makemezero, string lpWindowCaption);
NULL = 0, not null
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
|
There is no tool as far as I know (someone from MS responded this in a public MS NG).
But it's an interesting challenge. After all, controls declared in the .rc file must be mapped to C# code. For the set of common controls, I guess it should be easy to do it. The only issue is about dialog units, and stuff like that.
Sh*t...another item in my tasklist..
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|
|
Does anyone know if this value is where your executable will be installed from an install package. I need to be able to reference a database that will be packaged with the setup and want to make sure the connection string points to the proper location. Right now I am testing in Debug mode and so of course the value that Application.StartupPath.ToString(); returns in inside the Debug subfolder. Does this change with a release version build?
Nick Parker
The goal of Computer Science is to build something that will last at least until we've finished building it. - Unknown
|
|
|
|
|
|
how to use it OutputDebugString ?
or its equvalient method in dot net?
r00d0034@yahoo.com
|
|
|
|
|
Look at System.Diagnostics.Debug
In particular the WriteLine method.
Paul
|
|
|
|
|
Hi Code Gurus,
(in a C# Windows Form application) How can I access a public member of the form that defines the static Main() member function from another form? I have two forms, frmMain (defind in frmamin.cs) and frmDialog (defined in frmDialog.cs), I want to access a member of frmMain (a property or a function or whatever member) from within frmDialog. When the application runs, the frmMain form is displayed as the application's main window, if the user chooses Connect... from the application's menu, the other form frmDialog is displayed as a dialog using ShowDialog(), now what I want is to access some member fields of frmMain from within frmDialog while frmDialog is displayed as a dialog box (that was extremely easy in VB).
Well, to be more specific, what I want to do exactly is to enable the user to connect to a database, when the user selects Connect... from the menu, a dialog box is displayed to allow the user to enter the database connection information. There is an OleDBConnection object (public member), defined in frmMain, that I want to use in frmDialog (there is a button in frmDialog whose caption is "Connect"). In the event handler of that button I want to use the public member of frmMain (System.Data.OleDB.OleDBConnection m_OleDBConn). For example like this:
myfrmMain.m_OleDBConn.ConnectionString = ... etc
Regards,
Waleed
(a.k.a. Wal2k) www.wal2k.com
|
|
|
|
|
Hi again
Waleed wrote:
that was extremely easy in VB
Even easier in C#
define a construtor for the dialogform that takes a parameter of the same type as your mainform. IOW:
public class DialogForm : Form
{
private MainForm parent;
...
public DialogForm(MainForm parent)
{ this.parent = parent;}
...
void SomeFunction(){
parent.OleDbConnection.Connect();
}
}
Thats it Also , dont make OleDbCOnnection public , but rather create a Property for it.
Give them a chance! Do it for the kittens, dear God, the kittens!
|
|
|
|
|
Well, actually I've done this (another way I used was to move Main() to a startup class and define a static member of the main form) but I was wondering whether we can do it the VB way:
in Form2
Form1.MyMethod()
(a.k.a. Wal2k) www.wal2k.com
|
|
|
|
|
Waleed wrote:
another way I used was to move Main() to a startup class and define a static member of the main form
I guess you can do this , although some peolpe might not agree to having a static member on a form.
RE: Properties, thats just way MS wants it . A property is basically just a get/set function() for a private member. Again, its not strictly required, but rather recommended.
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
That was the VB6 way, you can't do that anymore under VB.NET or C#. It's part of the whole OOP thing...
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
Waleed wrote:
Form1.MyMethod()
IMNSHO, I always considered that a BAD thing to do; instead you should have created an instance of Form1 and passed that to Form2.
If you didn't create an instance of it, you can only use the window once; which is a pain when you are showing inter-related data and the same window needs to be used twice.
James
Sig code stolen from David Wulff
|
|
|
|
|
Funny sig!
Norm Almond: I seen some GUI's in my life but WTF is this mess
Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough
Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children
Leppie:My sister is 25
-Norm on the MailMagic GUI
|
|
|
|
|
Thanks, I was cleaning the root of my C drive when I came across my quotes.txt file so I just had to share that one
James
Sig code stolen from David Wulff
|
|
|
|
|
BTW, why not to make OleDBConnection public?
(a.k.a. Wal2k) www.wal2k.com
|
|
|
|