473,386 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Is it true that ListBox does not select on MouseDown

I think I found in VB6 that when mousedown occurs the item is highlighted
but it is not selected until MouseUp.

I believe that may be happening in VB.NET also.

Anyone have any info pro or con?

Has anyone dragged out of a ListBox? Just knowing you didn't have to do
anything special would be helpful.
Thanks
Cal
Nov 20 '05 #1
4 1551
Correct, it happens on MouseUp, if you dont do this you willl run into
trouble.

OHM

active wrote:
I think I found in VB6 that when mousedown occurs the item is
highlighted but it is not selected until MouseUp.

I believe that may be happening in VB.NET also.

Anyone have any info pro or con?

Has anyone dragged out of a ListBox? Just knowing you didn't have to
do anything special would be helpful.
Thanks
Cal

Nov 20 '05 #2
What kind of trouble?

How can I drag if I don't know what is being selected?

Thanks for this and your other reply
Cal

"One Handed Man" <Bo****@Duck.net> wrote in message
news:bp**********@sparta.btinternet.com...
Correct, it happens on MouseUp, if you dont do this you willl run into
trouble.

OHM

active wrote:
I think I found in VB6 that when mousedown occurs the item is
highlighted but it is not selected until MouseUp.

I believe that may be happening in VB.NET also.

Anyone have any info pro or con?

Has anyone dragged out of a ListBox? Just knowing you didn't have to
do anything special would be helpful.
Thanks
Cal


Nov 20 '05 #3
Maybe setting AllowDrop to True will help you out? I've never used drag and
dropping so I'm not certain it will do anything.

Andrew

" active" <ac****@REMOVEa-znet.com> wrote in message
news:Ow**************@TK2MSFTNGP09.phx.gbl...
I think I found in VB6 that when mousedown occurs the item is highlighted
but it is not selected until MouseUp.

I believe that may be happening in VB.NET also.

Anyone have any info pro or con?

Has anyone dragged out of a ListBox? Just knowing you didn't have to do
anything special would be helpful.
Thanks
Cal

Nov 20 '05 #4
Yes, AllowDrapDrop is required, but you need to use other events like
beginDrag etc. There are examples somewhere in the help.

Regards OHM

Andrew Christiansen wrote:
Maybe setting AllowDrop to True will help you out? I've never used
drag and dropping so I'm not certain it will do anything.

Andrew

" active" <ac****@REMOVEa-znet.com> wrote in message
news:Ow**************@TK2MSFTNGP09.phx.gbl...
I think I found in VB6 that when mousedown occurs the item is
highlighted but it is not selected until MouseUp.

I believe that may be happening in VB.NET also.

Anyone have any info pro or con?

Has anyone dragged out of a ListBox? Just knowing you didn't have to
do anything special would be helpful.
Thanks
Cal


Regards - OHM# OneHandedMan{at}BTInternet{dot}com
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Spare Change | last post by:
Given for a ListBox this.HLinks.MouseDown += new System.Windows.Forms.MouseEventHandler (this.HLinks_MouseDown);// this.HLinks.SelectedIndexChanged += new...
8
by: Oddball | last post by:
Ok - I have a ListBox control and I'm ready to write my own DrawItem event handler. What I want to draw as the item is another control. I have created a user control that I would like to list in...
1
by: Edward | last post by:
I am having a terrible time getting anything useful out of a listbox on my web form. I am populating it with the results from Postcode lookup software, and it is showing the results fine. What...
18
by: Dave Sauny | last post by:
Ok, its a friday, I'm at work and I cant get this to work: I have 3 listboxes on one tab control page. when i select an item in listbox1 i want whatever is selected on the other 2 listboxes...
1
by: andrew nott | last post by:
Can anyone tell the the recommended way of performing mutiple-item drag-n-drop from a MultiExtended listbox? The problem is the ListBox selection isn't completed in the MouseDown event, when the...
3
by: Mark Lauser | last post by:
I have a Windows app (.net v1.1) and I am dragging from a list box. The first drag works fine, but all subsequent drags continue to pull the first item that was dragged. It appears that...
3
by: thomasp | last post by:
Has anyone got some sample code to do drag and drop from one listbox to another listbox using VB.Net 2005. The below code works for draging and droping one at a time, but not for multiselected...
4
by: tbrown | last post by:
I have a listbox on my form and I set it to invisible. When a particular button on the form is pressed, I make the listbox visible and allow the user to select from it. When the selection occurs,...
3
by: Joe Cool | last post by:
I have a ListBox on a form than has some items. The select mode is one item only. I select one, it is selected and hightlighted. I then click somewhere in the listbox not on any item, in the clear...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.