|
Quaspam wrote: From the analysis that i did, i realized that the method **Encoding.ASCII.GetString() ** somehow stopped when it encountered a null character i.e binary 0.
Of course, strings are null terminated. Why would you want to see an MP3 in a textbox ? How do you expect that to be worth anything ? I know the ID3 tags are at the end ( null terminated text for V1 tags, V2 are compressed ), but why show them in a textbox ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Christian Graus wrote: Of course, strings are null terminated
That's why romans were not using strings. They were not not used to 0's (just I, II, III, ...)
SkyWalker
|
|
|
|
|
Can a classlibrary detect an event occurrance in the main form which uses the class library. if so how to detect that?
|
|
|
|
|
If a class exposes an event, and another class subscribes to it, then where those classes come from is irrelevant.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Events are only detected on Windows Forms. So you can pass whatever action you want to your class library from your Form's raised event. Dont worry about the class library being unable to handle events.
Allow the Form to do that.
Live in fragments no longer. Only connect.
|
|
|
|
|
Hi.
This one is realy nasty.
Does anybody know if there is a free .NET library for handleing MIME messages(used for SOAP attachments)?
I'm accessing a java-powered web service and I need to send attachments to it. The standards it supports for receiving atachments from clients are MIME and DIME. However, there are also functions that send files from the service back to me. And here is the problem: THE ONLY FORMAT USED BY THE SERVICE FOR SENDING ATTACHMENTS IS MIME. AND .NET HAS NO SUPPORT FOR MIME. So I get exceptions when getting the response from the server.
Is there any way to work with MIME in .NET??
Thanks.
|
|
|
|
|
hi guys
i have about this
if i click on textbox in any program such as Msn messager or notepad etc. how do i find them by using C#?
thanks
|
|
|
|
|
You want to find the textbox control ? There are windows APIs for that, you can PInvoke them in C#. I think it's WindowFromPoint, or something like that.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Can you give me some sample code? please!
|
|
|
|
|
Does google not work where you live ? The API just takes a point ( well, an X and a Y ), and it returns a HWND ( so, what's returned needs to be an IntPtr and you create a control, and set the Handle property to be the return value, to get a instance of the control.
If you google for C++ help, then you'll find all the help you need, if you add the bits I just told you.
You know, just because we know how to find info, that doesn't mean we've used this API. I've never written C# code that uses WindowToPoint.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
[DllImport("user32")]
public static extern int WindowFromPoint(int x, int y);
SkyWalker
|
|
|
|
|
Woo Hoo - my guess was right !! What do I win ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
my respect
SkyWalker
|
|
|
|
|
how can i use that? please sample code!
|
|
|
|
|
|
hello
i'm stuck on the problem of accessing the sub items of a listview control. the values of sub columns are not being accessed.
i'm using the following code
private void ColumnList_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)<br />
{<br />
ListViewItem selection = ColumnList.GetItemAt(e.X, e.Y);<br />
if (selection != null)<br />
{<br />
MessageBox.Show("Item Selected: "+selection.Text);<br />
}<br />
<br />
}
how ever the following code only accesses the values of the left most column only.
how do i access the values in sub items.
plz do reply.
Saira
|
|
|
|
|
The item has a sub items property, you can iterate over that.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
through the sub item property, items can only be 'added, cleared or removed' and those too only statically.
i want to access the values of the sub items at runtime when the mouse is pressed down on a value.
how can i do this?
|
|
|
|
|
|
well
u can do it ur way but i don't want to give a specific index to lookup its value statically.
i want to give the index od the subitems at runtime, choosing the value of the index by clicking with the mouse on the respected cell of the listView subitem.
can u guide me about it??
|
|
|
|
|
OK, then you need to work out the subitem from the point that was clicked, that's another problem. I'm sure it can be done, doesn't the control expose it's column list, with widths ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
yes the control does expose its column list with widths but i don't need those column widths.
i need to work out a way to give the mouse focus on the rows of the subitem and their different cells.
|
|
|
|
|
Saira Tanwir wrote: but i don't need those column widths.
Of *course* you do...
ListViewItem selection = ColumnList.GetItemAt(e.X, e.Y);<br />
<br />
This is your code. It finds the item, right ? And you need to find the subitem, right ? So, you walk along the column widths and find out which one contains e.Y, that's the one you need.<br />
<br />
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
.... you mean e.X ...
SkyWalker
|
|
|
|
|
Yeah, I do. I am both flabbergasted, and trying to do my own work, so I have not one, but two excuses
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|