|
Hashtables dont except duplicate keys, and im not sure there is a class that would allow you to store items in order and allow duplicated.
U could try deriving a new class from the HashTable table and replacing the comparer property with a new one that will allow you to add duplicates.
|
|
|
|
|
I have a simple question. If I have a form with some buttons inside, how can I recieve keyboard messages for the arrow keys? If I hook the KeyDown event of the parent form, I recieve notification just fine, until I press one of the buttons, at which point the event is no longer triggered; the focus jumps through tab order instead.
Joel Holdsworth
|
|
|
|
|
Im not a 100% sure on this, but the form has a KeyPreview property. This passes the keyboard presses to the form before passing to the active control.
|
|
|
|
|
Yes I've got it set already, but it doesn't help!
Joel Holdsworth
|
|
|
|
|
Have u tried overriding the DefWndProc (or WndProc) methods to detect the key presses there.
|
|
|
|
|
Hi. How do I created an update installer. Say I already installed the whole app on the client machine, made a few changes, no I just want to update their app, I don't want to remove the whole app and re-install.
Thans in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
The .Net setup wiz allows you to 'update' the app. When you change the version number, the product gui will get updated, while the upgrade gui remains.
|
|
|
|
|
Hi
I want to merge two avi file and save the result on disk.
With "merge" I mean enqueue the content of a file at the end of another.
heeeeeeeelp me please
PS:...excuse me for my owful english...
|
|
|
|
|
You can search in google for "VirtualDub".
There is also with source code in it. But in C++.
|
|
|
|
|
Hi
What is the best way for remove item from System.Collections.ArrayList (most rapid) :
Remove(object Obj) or
RemoveAt(int Index)
Thank
|
|
|
|
|
What dou you mean with the "best way" ?
If you have the object, the best way is Remove(object obj);
If you have the index, the best way is Remove(int index);
|
|
|
|
|
RemoveAt(int Index) faster, look at the following code of Remove(object Obj):
<br />
public virtual void Remove(object obj)<br />
{<br />
int num1 = this.IndexOf(obj);<br />
if (num1 >= 0)<br />
{<br />
this.RemoveAt(num1);<br />
}<br />
}<br />
As you can see Remove(object obj) actually calls to RemoveAt(int Index)
|
|
|
|
|
|
RemoveAt() is safer in case the ArrayList contains duplicate objects.
/ravi
|
|
|
|
|
Hello I have a CSV file which contains matters like
"Title","First Name","Last Name","Address","City"
"Mr.","Yogee","Talokar","007,A-Wing,M.G road","Pune"
"","Radhika","Talokar","007,A-Wing,M.G road","" etc.
I wana to split it & seperate First Name,Last Name,Address,City etc,.
I tryed it by using delimiter ","
but it also split "007,A-Wing,M.G road" like
007
A-Wing
M.G road
I dont want to split "007,A-Wing,M.G road" ,bcos I have to count no. of strings.
is there is any other way to split it Like
"Yogee""Talokar""007,A-Wing,M.G road"
"Radhika""Talokar""007,A-Wing,M.G road"
-- modified at 5:59 Friday 28th July, 2006
Yogesh_T
|
|
|
|
|
Why don't split it by "," ?
Then you will have an array like:
"Mr.
Yogee
Talokar
007,A-Wing,M.G road
Pune"
Now you only have to delete the first and last " and you're finished. or if you want to add the " , you can simply add them to every one of them (except for the first and the last one) in the beginning and the end of the string.
|
|
|
|
|
is there any way to split by string like ", not by char ,
Yogesh_T
|
|
|
|
|
You can use the string.Split(string[] seperator, StringSplitOptions options) version of split. Use StringSplitOptions.None in the second parameter, and in the first parameter you put you delimiter.
|
|
|
|
|
You have used the wrong delimiter. That means in your text, you must write something but not delimiter. Just take another delimiter, like ";".
|
|
|
|
|
I use this regex:
Regex regExp = new Regex(",(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))");
|
|
|
|
|
Hello Sir Its nice one ,Its working properly.
Thanks for this.
but I am unable to understand this code ,could u plz explain it or give me site referance for this.
bcoz I have a file like
"G.H.",,"","","",,,"Company Friend
Office
Lute
",,,,"Normal","False",,,"Normal"
//my code is
StreamReader r=File.OpenText(file_location);
strUserInfo = r.ReadLine();
if( strUserInfo != null)
{
Regex reg = new Regex(",(?=(?:[^\"]*\"[^\"]*\"])*(?![^\"]*\"))");
string[] split = reg.Split(strUserInfo);
//code
}
in this it read above code as 5 lines(in CSV file it seperate "notes" field) but it should be only one line,what should I do for this?
Thank you again
-- modified at 4:00 Wednesday 2nd August, 2006
Yogesh_T
|
|
|
|
|
Hi there - hope someone can help with this
I've read a little about impersonating users in .Net, but is it possible to impersonate a different PC?
In other words, is it possible to make it look like I am logged in on "PC 1" when actually I am logged in on "PC 2"?
Cheers!
Baz
P.S. I know this sounds kinda dodgy - but it's not at all!!! I do have a legitimate reason for wanting to know this info!!!
|
|
|
|
|
Baz wrote: I do have a legitimate reason for wanting to know this info
Such as?
|
|
|
|
|
I noticed that when the XP visual styles are on, the Panel control sometimes adds a horizontal scroll bar when it is not necessary. The controls in the Panel fit the visible area fine (including the scroll margin and vertical scroll bar). This does not happen when the visual styles are off, i.e. in the Windows classic style ! It doesn't matter if the AutoScroll property is set to true or false.
To fix this problem I wanted to hide the horizontal scroll bar manually. I tried to use the HScroll property. The MSDN documentation on the ScrollableControl (from which Panel is derived) class says:
"To manually override which scroll bars are visible, set the VScroll and HScroll properties. If either property is set to false, the corresponding scroll bar is not visible, even if the AutoScroll property is set to true."
This simply isn't true . You can set the property HScroll to false, but the horizontal scroll bar is still there and remains functional. The method SetScrollState doesn't work either.
Does anyone know how I can suppress a horizontal scroll bar in a panel?
Thanks.
|
|
|
|
|
I still haven't been able to suppress the scroll bar. The panel totally ignores the property HScroll and other scroll bar methods . However, I can now hide the scroll bar using the Interop function ShowScrollBar, although it doesn't prevent the scroll bar to appear briefly.
|
|
|
|
|