|
DoubleClick event occurs when the control is double-clicked.
This is a normal behaviour.
Regards,
Bhupi Bhai.
|
|
|
|
|
quiteSmart wrote: do u have another suggestion?
Of course...
You can retrieve the Rectangle of the selected item (if there is one) and then check if it contains the point where DoubleClick occurred.
It follows an ugly example, using VB.NET (was handy, 'cause I had a VB project easyly available... Conversion to C# is straightforward):
Sub ListBox1DoubleClick(sender As Object, e As System.EventArgs)
Dim index As Integer
index = listBox1.SelectedIndex
Dim ev As System.Windows.Forms.MouseEventArgs
ev = e
If index <> -1 Then
Dim rc As Rectangle
rc =listBox1.GetItemRectangle(index)
If rc.Contains(ev.X, ev.Y) Then
MsgBox("Hello")
End If
End If
End Sub
Hope that helps.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
in your click handler, try using ListBox.IndexFromPoint()
and test for ==ListBox.NoMatches (which equals -1 I guess)
Luc Pattyn
|
|
|
|
|
Hi there,
In my project (C# Win) .NET 2.0 VS 2005, I am getting an error "Exception has been thrown by the target of an invocation". Can you please give me a clue how to debug this problem ?
Thanks
Emran
|
|
|
|
|
|
Be sure to (recursively) check the InnerException [^] property of the throwed exception.
|
|
|
|
|
hi everybody,
does anybody know how to read from excel sheet through C# coding.
If so please tell me how?
thanks in advance
|
|
|
|
|
|
Thnaks for your response,
but can u give me some code example that uses the OleDB/Jet provider.
thanks,
|
|
|
|
|
how to populate ComboBox using c# as in lookin combobox of open dialog box in windows OS?
i tried, but invain.
thanks in advance
tirumal
|
|
|
|
|
|
Hi there,
I wanna use dockpanel class, MSDN2 example shows to use 'using system.windows' and 'system.windows.controls. The need is when i add these to using directives, there is no such thing exists in C# 2005. Can u please tell me, how can i add these two things or where from i can get these.And also if possible some examples using dockpanel.
|
|
|
|
|
You need .NET Framework 3.0 (I assume you have 2.0)
SkyWalker
|
|
|
|
|
Thanks a lot. I will get back to you, if i need further clarifications.
|
|
|
|
|
How can I install, .net framework 3.0? I installed it from MSDN specified location. But still i am not getting it in VS2005?
|
|
|
|
|
The DockPanel is part of WPF ( Windows Presentation Foundation ) which is part of .Net 3. To install .Net 3 goto http://www.netfx3.com/.
Once you have installed .Net 3 you can get to the DockPanel by referencing "PresentationFramework.dll" then your using statements will work.
|
|
|
|
|
If you say you did, then probably you have to add a reference to PresentationFramework (presentationframework.dll).
SkyWalker
|
|
|
|
|
|
Hi,
how can i detect that my application is running somewhere in LAN?
Want make access to let say 5 running instances in LAN, not more.
Any idea?
Greetings
|
|
|
|
|
Have a central repository where the application logs in/out when starting/terminating.
E.g. by having a central database or using a web service.
|
|
|
|
|
Thar sounds dangerous: what if a logout gets missed (e.g. client app crashed).
After some of these, the server will report the maximum allowed number of users
has been reached though no one is actually using the app ?? SO there is need for
a way to get out of there, and once that solution is known, the whole thing becomes
pointless.
I prefer a broadcast + timeout solution where a starting app tries to get a response
from it's sibblings on all other machines; only the machines running the app would
repond and it there are too many of those, the most recent client would refuse to continue.
AFAIR FileMaker has used such a scheme, and it did not need anything special set up
on any Firewall or so (I guess they used TCP/IP with one of the ports that are open
by default...).
I havent seen any source code on this though...
Luc Pattyn
|
|
|
|
|
How to implement single sign on in c#?
please help
Thanks & Regards,
Venkat
|
|
|
|
|
You'll need to give a bit more detail as to your intended usage, environment, etc. before that question can be adequately addressed.
However, a simple search of Google yields 816,000 hits. Maybe you could read a little first.
only two letters away from being an asset
|
|
|
|
|
I need to implement single sign on for an intranet application using c#
Thanks & Regards,
Venkat
|
|
|
|
|
I'm curious as to the which method one would choose, and why. My preference for this would be Method B, it seems cleaner, easier to read and runs faster (though moderatly depending on the code inside the block). I also try to avoid conditions like while(true) in multi-threaded situations.
Method A
<br />
int x = 0;<br />
do<br />
{<br />
if( x < some_number )<br />
break;<br />
<br />
...do some work...<br />
<br />
x++;<br />
}while(true);
Method B
<br />
int x = 0;<br />
do<br />
{<br />
...do some work...<br />
}while(x++ < some_number);
only two letters away from being an asset
|
|
|
|