|
Thanks, but it isn't solution for my problem.
I'm looking for some advice how to play a video from a memory buffer or a stream.
File using is not efficient.
|
|
|
|
|
Hi,
Can we have a ListBox ValueMember Collection?
If we have SelectionMode as MultiExtended, and we select more than one values in the listbox, then can we show its respective value member as we can show the SelectedIndices (Collection of selected index)
If there is a way could you please post an example with it..
And if there is not then What are the alternatives (without using and temp array to kepp track of it..some memory mgmt is required here)
Thanks a lot
|
|
|
|
|
try out following codes
for(int i=0;i < listBox1.Items.Count;i++)
{
if(listBox1.GetSelected(i))
{
MessageBox.Show("",listBox1.GetItemText(listBox1.Items[i]));
}
}
rahul
-- modified at 5:25 Thursday 11th May, 2006
|
|
|
|
|
This would work absolutely fine, but you did not get my problem
I am displaying some value in the listbox and actually require some different value, say for e.g. i am showing names in the box whereas if the user selects a name i am retriving the corresponding employee ID for that name. Now this scenario is possible through ValueMember and DisplayMember property of ListBox.
DisplayMember = name
ValueMember = empId
Now the code which you gave me works fine if i need to retrive the DisplayMembers from listbox..
My question though,here was i needed the ValueMembers to corresponding selection
Thanks a lot
-- modified at 6:14 Thursday 11th May, 2006
|
|
|
|
|
Hi,
when I load an image using this
Bitmap bitmap = (Bitmap)Image.FromFile(pic.Path) ,
it is not possible to delete the file afterwards, unless you exit the program. I tried to call .Dispose() on the object, but it seems like a bug in the FromFile method.
I found out a workaround
Bitmap origbmp = new Bitmap(pic.Path);<br />
Bitmap bitmap = new Bitmap(origbmp);<br />
origbmp.Dispose(); .
I keep working with the copy of the original bitmap as it's not locked anymore.
But, loading an image using Bitmap 's constructor, it's impossible to load animated GIFs as it seems that Bitmap doesn't support them.
Now, how can I use animated GIFs and other image formats AND be able to delete the file afterwards?
Thx
Stefan
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
Don't pat yourself on the back too hard. This has been known for at least 4 years now, and it's not exactly a bug. Though, some people would probably argue that it is.
An eaiser method would be to load the bitmap from a FileStream instead of creating two Bitmaps to get one. You can read more about it in this[^] KB article on MSDN.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: This has been known for at least 4 years now, and it's not exactly a bug. Though, some people would probably argue that it is.
When you call .Dispose() and the handle won't get free, it's a bug!
Dave Kreskowiak wrote: You can read more about it in this[^] KB article on MSDN.
Thank you, that worked!
Regards,
Stefan
|
|
|
|
|
Hi to all
I am working on a project of developing client/chat server software in .net. The textual chatting software has been devoloped and is working well. But now I have been asked to add another feature of audio/video conferencing(chatting) into the chatting software. But i have no clues. Can anybody suggest me resources on net or any guideline..plz help.
-- modified at 7:40 Thursday 11th May, 2006
|
|
|
|
|
hi...
i just wanted to make an ftp client without making an ftp server... actually wanted to make a client that downloads files from an ftp server some where... now the problem that i am facing is that i can't get an ip to where i can submit my requests on port 20.... plz provide help in this regard that is ... is it possible to only develop a client and not a server... secondly wat ip would be used in this regard...
thanx
haseeb
|
|
|
|
|
|
What do you mean? If you want to download files from an FTP server, you have to know what server it is you want to download from.
---
b { font-weight: normal; }
|
|
|
|
|
This is for a freeware application. I am using the Nullsoft Installer and trying to customize it. I have to make an icon file with a number of icons in it that match a specification.
Three of the icons required have to have 16 Million colors. This is a problem. I use VS 2003 to create the icon file. VS 2003 only supports icons up to 256 colors. I know of no other tool that can make an icon file with multiple icons.
How do i do this?
|
|
|
|
|
Try this tool:
IconArt[^]
It's free for personal use, and $10 for commercial use.
|
|
|
|
|
Thanks. Too bad it does not support 32-bit icons. It pops up a warning when 32-bit icons are opened.
|
|
|
|
|
how to protect usb disc by password ?
|
|
|
|
|
Is there any Win32 API can change windows logon password?
|
|
|
|
|
|
|
i'm using console.. i've a big problem in "sorting" a text file (contents inside the file) and save as another file.. SOmeone help me to solve my problem or give me a sample codes for that... tnx... ((
regards,
JayR
|
|
|
|
|
What's the problem?
Are you sorting it numerically or alphabetically?
Line by line?
Please be more specific.
|
|
|
|
|
Here is an example from MSDN on how to use a SortedList object:
using System;
using System.Collections.Generic;
public class Example
{
public static void Main()
{
SortedList<string, string> openWith =
new SortedList<string, string>();
openWith.Add("txt", "notepad.exe");
openWith.Add("bmp", "paint.exe");
openWith.Add("dib", "paint.exe");
openWith.Add("rtf", "wordpad.exe");
try
{
openWith.Add("txt", "winword.exe");
}
catch (ArgumentException)
{
Console.WriteLine("An element with Key = \"txt\" already exists.");
}
Console.WriteLine("For key = \"rtf\", value = {0}.",
openWith["rtf"]);
openWith["rtf"] = "winword.exe";
Console.WriteLine("For key = \"rtf\", value = {0}.",
openWith["rtf"]);
openWith["doc"] = "winword.exe";
try
{
Console.WriteLine("For key = \"tif\", value = {0}.",
openWith["tif"]);
}
catch (KeyNotFoundException)
{
Console.WriteLine("Key = \"tif\" is not found.");
}
string value = "";
if (openWith.TryGetValue("tif", out value))
{
Console.WriteLine("For key = \"tif\", value = {0}.", value);
}
else
{
Console.WriteLine("Key = \"tif\" is not found.");
}
if (!openWith.ContainsKey("ht"))
{
openWith.Add("ht", "hypertrm.exe");
Console.WriteLine("Value added for key = \"ht\": {0}",
openWith["ht"]);
}
Console.WriteLine();
foreach( KeyValuePair<string, string> kvp in openWith )
{
Console.WriteLine("Key = {0}, Value = {1}",
kvp.Key, kvp.Value);
}
IList<string> ilistValues = openWith.Values;
Console.WriteLine();
foreach( string s in ilistValues )
{
Console.WriteLine("Value = {0}", s);
}
Console.WriteLine("\nIndexed retrieval using the Values " +
"property: Values[2] = {0}", openWith.Values[2]);
IList<string> ilistKeys = openWith.Keys;
Console.WriteLine();
foreach( string s in ilistKeys )
{
Console.WriteLine("Key = {0}", s);
}
Console.WriteLine("\nIndexed retrieval using the Keys " +
"property: Keys[2] = {0}", openWith.Keys[2]);
Console.WriteLine("\nRemove(\"doc\")");
openWith.Remove("doc");
if (!openWith.ContainsKey("doc"))
{
Console.WriteLine("Key \"doc\" is not found.");
}
}
}
---
b { font-weight: normal; }
|
|
|
|
|
Take a look at regular expressions.
|
|
|
|
|
tnx for the info...
regards,
JayR
|
|
|
|
|
Hello,
I have an application with a server part that I host in IIS. It was working fine, until earlier today when I updated the .dll files and it started throwing a SerializaionException on the client. Last time what I did was to remove the web site from IIS and add everything again. Now I have done it several times, and I can't get it to work.
I haven't changed anything in code or in my .config files.
The steps I use to set up the server in IIS are:
1. Create a web site with the wizard, allowing anonymous access.
2. Create an application for each of two subfolders (one is a web app, the other the remoting server).
3. For the web app, add default document Default.aspx .
The web app runs fine, but when it tries to create a remote object, I get an exception, which is the same I get from my Windows Forms client application: a SerializationException with this message:
The input stream is not a valid binary format. The starting contents (in bytes) are: 3C-68-74-6D-6C-3E-0D-0A-20-20-20-20-3C-68-65-61-64 ...
The bytes are simply the HTML/HEAD tags of a web page, so there's a configuration/permissions problem.
I've tried giving full access to both ASPNET and machine_IUSRmachine users, and nothing has worked. I have deleted the web site and recreated it, restarted IIS, and nothing works!
I know this might not be enough information, but that's everything I can't think of. The worst thing is that it was working before.
So, any ideas? I am really desperate!
Thanks in advance!
Luis Alonso Ramos
Intelectix
Chihuahua, Mexico Not much here: My CP Blog!
-- modified at 21:34 Wednesday 10th May, 2006
|
|
|
|