|
Lol,thanx.
P.s. What's ur fav. Football club?!
|
|
|
|
|
You can use wizard object if you want to use steps and you can use ajax Technique for quiz timeout.
|
|
|
|
|
Hi,
Is there any way to write Addins for Windows Explorer (like office Addins) through C #. Through which i want to place my application there and talk to local files?
Thanks
modified on Saturday, April 25, 2009 10:52 AM
|
|
|
|
|
satsumatable wrote: place my application there and talk to local files?
what exactly you want to do?
Books are as useful to a stupid person as a mirror is useful to a blind person. - Chanakya
|
|
|
|
|
I have created C# application, which creates a image file on Desktop. It works fine on XP and Vista (admin account) but it fails to create image file on Desktop in Vista (standard account).
Whether i have to include manifest file to the application to work properly?
If i add manifest, will it work on XP without any problems?
Sorry if it is lame question.
Thanks in advance.
|
|
|
|
|
A manifest file should work, and it shouldn't have any adverse effects on XP. Vista blocks or redirects accesses to files in certain places, two of them being the root installation drive (for Windows) and the Desktop. If you can, then avoid the whole issue by saving the image file somewhere else, like Documents
|
|
|
|
|
|
execute your code in your mind assuming the textbox holds "abc", for two iterations, and you will know.
|
|
|
|
|
Or - and this is just a suggestion, so I'll whisper - use the debugger You might find it helps...
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
I'll pretend I didn't hear that.
IMO debuggers are fine for solving hard problems, just looking at the code and executing it mentally is what always has to come first.
|
|
|
|
|
I know what you mean, but sometimes I can stare at code and only see what I meant to write!
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Why not use the built in methods?
if (e.KeyChar == 13)
{
if (Test1.Text.IndexOfAny(new char[]{'@', '.', ',', '!'}) < 0)
{
MessageBox.Show("The name can' t hold '.', '!', '[]'", "Info", 0, MessageBoxIcon.Error);
return;
}
if (Text1.Text != "")
{
ListBox1.Items.Add(Text1.Text);
}
Text1.Text = "";
}
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
|
Yep.
Now, I could say I left that as an exercise for the reader?
Or just admit it: I made a mistake - sorry!
Also, to work with your original code it needs to be:
if (e.KeyChar == 13)
{
if (Test1.Text.IndexOfAny(new char[]{'.', '!', '[', ']'}) >= 0)
{
MessageBox.Show("The name can't hold '.', '!', '[]'", "Info", 0, MessageBoxIcon.Error);
return;
}
if (Text1.Text != "")
{
ListBox1.Items.Add(Text1.Text);
}
Text1.Text = "";
}
because I added comma and atsign, and forgot your square brackets as well.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
why test after the unwanted characters have been added to the text? why not check them on entry, i.e. use the KeyDown event and refuse the characters. Or even override the IsInputChar() method.
|
|
|
|
|
Complicated - what happens if the user pastes it in?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Correct, one actually needs both kinds of validation to get immediate feedback.
IMO issuing a bad character message at the end of a line isn't part of a good UI.
|
|
|
|
|
Luc Pattyn wrote: issuing a bad character message at the end of a line isn't part of a good UI.
That throws most of t'interweb in the bin, then...
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
When updating a TreeView, I call BeginUpdate() before adding any nodes. Every now and again, when this is done the thread seems to halt and does not get past the BeginUpdate() call.
The problem is that this happens intermittently, thus sometimes I can spend 30mins trying to reproduce the problem, and it never happens, but other times it happens first attempt.
Has anyone seen this happen? or knows of a problem with BeginUpdate?
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
Gareth H wrote: Has anyone seen this happen? or knows of a problem with BeginUpdate?
Any chance of BeginUpdate being called on a different thread?
|
|
|
|
|
No, since i do a If (InvokeRequired) at the top of the method.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
Hmm. There's one problem I've seen with InvokeRequired - it returns false if the control's underlying Win32 handle hasn't been created. And that happens if the control hasn't become visible yet.
|
|
|
|
|
The control is visible but not enabled.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
Hi Gareth,
I know your post is 3 month ago ... but I have the same problem seen right now.
I can fill the tree a hundred time with no problem and then it happens after the third call.
I didn't found a way to unlock the control - did you ?
Until a better idea is supplied I don't use BeginUpdate()
Regards,
Frank
|
|
|
|
|
Frank,
The problem with my code was that i was doing an:
If (InvokeRequired)
On the main control class, which always returned false when the problem occurred, but the actaul TreeView control was returned true for InvokeRequired.
Thus, the solution was to invoke on the TreeView control. If you need some more info, just say.
Regards,
Gareth.
(FKA gareth111)
|
|
|
|