|
The other option would be to add all the items and then attach the sorter and do the sort at the end. I've done this in an app that had issues (don't recall what offhand) with leaving the comparitor permantly attached. I *think* they were related to using different rules based on the type in the column in question.
|
|
|
|
|
Aha! That's what it was. I figured that using BeginUpdate() would disable sorting the items until I called EndUpdate(), but apparently not. Now I just set the sorter to null before filling it, then set the sorter to my sorter after filling it, and it is DRAMATICALLY improved (takes less than a second). Thank you both!
-- modified at 13:34 Wednesday 25th January, 2006
|
|
|
|
|
Greetings
Lately I've been using the "System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName" as a language code for my project(s) where I have text translated.
The system I'm working up against uses for instance "gb" as english langauge code for translated texts whereas "us" covers american.
However TwoLetterISOLanguageName gives out "en" for both, making it impossible for me to distinquish between the two.
I could use other variables in the culture object but these all gives out longer then 2 characters, and not the result I wanted, which means that I'll have to use session variables to hold langauge code (which I find bad because this culture object is already there).
So - is there anyway I can connect for instance the variable "gb" with en-GB culture object withouth having to create my own new culture object for each culture I want to use?
(yes, I could use substring :p - but that wouldn't help much because then I need to know when to do substring etc and that kind of voids the reason I'm starting to use culture )
Regards.
---------------------------
127.0.0.1 - Sweet 127.0.0.1
|
|
|
|
|
Derive a class from CultureInfo adding your own code as a new property. You will obviously need to map the constructor as well.
Remember this is a hack, and you should migrate to RFC3066 as soon as possible (or rather, the modified RFC3066 used in the .NET framework as the real RFC3066 can't handle Chinese correctly). You might still run into problems with Spanish though.
|
|
|
|
|
Anyone has a good example how to call InvokeMember when you are calling a COM-server with late bindning and the you have a [out] parameter?
Im working in C#... but VB .NET will do fine as well.
Ex:
virtual /* [id] */ HRESULT STDMETHODCALLTYPE bcGetUserRoles(
/* [out] */ VARIANT *pvarrUserRoles,
/* [retval][out] */ INT *piRetval) = 0;
How do you retrieve the pvarrUserRoles ?
Thanks in advance!
/T
-- modified at 2:50 Tuesday 24th January, 2006
|
|
|
|
|
Anyone know if there are (or will be) posters available for .Net 2005 like there are for 2003?
"My dog worries about the economy. Alpo is up to 99 cents a can. That's almost seven dollars in dog money" - Wacky humour found in a business magazine
|
|
|
|
|
Jack,
Have you tried contacting Microsoft?
Paul
|
|
|
|
|
We just moved to Visual Studio 2005, and previously we were using a manifest file to make our vc6 apps look ala Windows Xp theme.
1. First of all, what the heck is this manifest file? Does it really do anything useful?
2. What is the correct way to use it for apps created in vc2005?
3. Is there any way to get menus to look half decent without integrating one of the xp-style menu implementations found here in CodeProject?
Cheers and thanks!
swine
[b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.
|
|
|
|
|
Hello All,
I would like to use the solid dots that one encounters when logging onto Windows XP. How can I make this happen with a textbox that will be password protected? I've tried setting PasswordChar to * and * is what I get. Any help would be groovy. I'd probably just be able to google it, but I'd like to see what fellow CPians have to say
Thanks in advanced,
Paul
|
|
|
|
|
Have you tried changing the font to one with those dots in it and changing the Password Character to that dot? Open Character Map to find one.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave,
Thanks for the post. I found that Symbol font has a dot and has the value of \xB7. Very simple solution to something I thought was going to be complicated. Wish everything could be like this.
Thanks again,
Paul
|
|
|
|
|
Hmm..."checks ASCII charrt" - there is a black dot character - ascii is
DEC: 007
HEX: 07
Hope that helps
|
|
|
|
|
James Gupta wrote: DEC: 007
HEX: 07
I just see squares when I try and it doesn't seem matter which font I use.
PC
|
|
|
|
|
the squares are because it cant read the code....
thats strange - i've never used ASCII codes in strings before but if you could get the name then you could append Keys.(code) to it should work.
Otherwise try this:
this.maskedTextBox1.PasswordChar = "●";
|
|
|
|
|
Thanks James,
I think I'll stick to Dave's approach. It seems like the easiest one.
Regards,
Paul
|
|
|
|
|
lol ok - although all you have to do with mine is copy and paste that line
|
|
|
|
|
At least with my method, he knows how to go get a different character if he wants. I didn't write anything for him...he's writing it himself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave Kreskowiak wrote: he knows how to go get a different character if he wants
Exactly, I've experimented with some odd characters, such as some of the ones from Symbol font and that yields some fun results. As far as copying and pasting the code James supplied, VS 2005 Express complains about unicode issues. So Dave's approach floats the boat
Paul
|
|
|
|
|
I have not used the Express version, but my guess is that all it does is ask you to save the file in Unicode. It really should be default using Unicode anyway - use of ANSI should carry the death penalty.
|
|
|
|
|
Hello Imoelleb,
I went ahead and let it save as unicode and everything was fine. I still would prefer Dave's solution. It is requires only setting the textbox control's properties and it is simple enough
Paul
|
|
|
|
|
Dave Kreskowiak wrote: get a different character if he wants
I've used Symbol font with ascii hex 4A which is a Happy Face and it could be used to really throw people off
PC
|
|
|
|
|
Hello,
I am studing and trying to understand just when and where to use the Enum in the format below.
can someone please let me know how they use this and where and when to implement this?
thanks,,,
erik
Dim s As String
For Each s In [Enum].GetNames(GetType(Colors))
Console.WriteLine(s)
Next s
|
|
|
|
|
[Enum].GetNames() is a static (shared in VB.NET) function that returns an array names for the constants defined in a Type. In your case, this will return an array of names for constant values define in the Colors class.
Enum.GetNames Method[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The following is code written in C# using .NET Framework 2.0 and
VS 2005. I'm getting an exception, error #10022, when I call IOControl().
I tried different values for the parameters to IOControl(), and still get the same error.
Can anybody help clear this up as to why I'm getting this error?
Thx,
T
socket.SetSocketOption(SocketOptionLevel.IP,SocketOptionName.HeaderIncluded,1);
byte []IN = new byte[4]{1, 0, 0, 0};
byte []OUT = new byte[4];
int SIO_RCVALL = unchecked((int)0x98000001);
int ret_code = socket.IOControl(IOControlCode.ReceiveAll, IN, OUT);
ret_code = OUT[0] + OUT[1] + OUT[2] + OUT[3];
if(ret_code != 0)
ret_val = false;
|
|
|
|
|
10022 means Invalid Argument in the Sockets API docs, here[^].
One of the parameters you sent wasn't correct for the mode you've setup or was just plain grabage. You might want to check the parameters you're sending against the docs[^] for WSAIoCtl.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|