|
Hi,
Can anyone tell , how can I get duration of audio file with c#
|
|
|
|
|
This google search[^] yeilds plenty of results
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
is there a location in the hard drive where one can find windows toolStrip icons?
|
|
|
|
|
IIRC they are in a subfolder of the common folder in the Visual Studio install. If you did a custom install, you may not have selected them so you will have to run set up and modify.
If you are running an express version, then they do not exist for you.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
I'm using express ):
i'll printScreen them... thanks!
|
|
|
|
|
Hi all.
I wanna convert a string ( eg : "0110101" ) to equal of it in Binary ( 0110101 )
Could you please guide me ?
Thanks.
|
|
|
|
|
You can use:
int i = Convert.ToInt32 (binaryString, 2); If you are doing a lot of this in your application you may find my article[^] useful.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Beat me to it. I had half a mind to post a home-made binary conversion function - I've been thinking about it for weeks
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
I really need to revisit that article. It served the requirements that I had at the time so that's as far as I went with it, but it could be more useful with a little work. I was resonably new to C# then too so there are probably a few things that could do with refactoring.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Convert.ToInt32("0110101", 2);
That converts 0110101 to an integer. The '2' is the base. You can find the documentation here
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Hi,
How to add an item to listbox (means both value and text).in asp.net i use to do with listitem here in 3.5 there is no list or listitem or item class.can any body help me regarding this
hi
|
|
|
|
|
//I am using this in 3.5 only... Check whether you have used using System.Collections; namespace.
code:
ListItem lst = new ListItem("value", "text");
listbox.Items.Add(lst);
|
|
|
|
|
i tried it already but not working
hi
|
|
|
|
|
but the code which is sent is a working example.... can u send the code which u have tried......
|
|
|
|
|
simply. listbox1.items.add("new item")
or if you have item to add in a variable,
listbox1.items.add(strVariable)
|
|
|
|
|
|
A ListBox takes an object for each item. The item's ToString method is called for the text that is displayed. To retrieve the initial object back, you just need to cast/convert it.
public class MyClass
{
public MyClass(string text, int value)
{
Text = text;
Value = value;
}
public string Text
{
get;
set;
}
public int Value
{
get;
set;
}
public override string ToString()
{
return string.Format("{0}, Value={1}", Text, Value);
}
}
listBox.Items.Add(new MyClass("Hello World", 1));
MyClass myClass = listBox.Items[0] as MyClass;
MessageBox.Show(myClass.Text);
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
it is adding datarowview in listbox
hi
|
|
|
|
|
Listbox stores only item as a Object (String, int, bool,...). You can't store Value and Text in a single item. If you wan't, use ListView instead. If you program it right it can be shown as with multiple colums or a grid.
ListView listView1 = new ListView()
lv.Items.Add("Key", "Text", null)
You can use next example with more control for each item
ListViewItem lvi;
lvi.BackColor = Color.Blue;
lvi.Focused = true;
lvi.Selected = true;
lvi.Text = "This is text of an item";
lvi.Name = "This is hidden name of an item";
listView1.Items.Add(lvi);
|
|
|
|
|
Saksida Bojan wrote: Listbox stores only item as a Object (String, int, bool,...). You can't store Value and Text in a single item
Of course you can if you have a class/struct that is one object with multiple properties as I showed in the sample code I posted.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hi Devs,
I am really sick and tired with writing html template in C#.
I am trying to append each html code using stringbuilder but it's just not give me good result as there is a lot of html code...So what would be the best way in this situation.Is this the only way i can write html template in C#?
Thank You
Andyyy
|
|
|
|
|
|
actually it's a windows service that i am writing and it should generate a html page. so i am not sure if i can do it using asp.net?
|
|
|
|
|
The ASP.NET runtime can (also) be hosted from a desktop-application (that's one of the links provided), and probably much the same way in a Windows Service.
It might be a bit overkill, so be sure to check out whether it's worth the investment in time
I are Troll
|
|
|
|
|
If your page conforms to a fairly well defined specification, you might want to consider using XML and XSLT to output your HTML page. Here's[^] more information.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|