Click here to Skip to main content
15,905,508 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: using store procedure to insert selected checkboxlist values into database Pin
TheComputerMan22-Oct-08 23:39
TheComputerMan22-Oct-08 23:39 
AnswerRe: using store procedure to insert selected checkboxlist values into database Pin
Dave Kreskowiak23-Oct-08 2:01
mveDave Kreskowiak23-Oct-08 2:01 
QuestionSFTP activex? Pin
hatemtaleb22-Oct-08 21:27
hatemtaleb22-Oct-08 21:27 
AnswerRe: SFTP activex? Pin
Dave Kreskowiak23-Oct-08 7:18
mveDave Kreskowiak23-Oct-08 7:18 
QuestionVariables.. Pin
Subjugate22-Oct-08 17:34
Subjugate22-Oct-08 17:34 
AnswerRe: Variables.. Pin
Rupesh Kumar Swami22-Oct-08 20:42
Rupesh Kumar Swami22-Oct-08 20:42 
AnswerRe: Variables.. Pin
Jon_Boy23-Oct-08 2:55
Jon_Boy23-Oct-08 2:55 
QuestionProblem with Drag & Drop between list boxes Pin
TheComputerMan22-Oct-08 12:38
TheComputerMan22-Oct-08 12:38 
No no no, not how to do it! Big Grin | :-D

I can drag and drop lines between list boxes no problem either as a move or a copy and I have got it to check that the item does not exist in the target box BUT.....

Where I am stuck is that if I drag a line, and drop it in the SAME box, it checks that it is there and does nothing EXCEPT if it is a move, rather than a copy, the line has already been removed from the source box.

The boxes are in separate child forms (of the same type) in a MDI comtainer. Looking at the properties of sender it gives the handle - which actually would be useful - if I could get at it. If I can see this information by hovering over the sender, why can I not get at it with intellisense?

Does any one have any ideas how (otherwise) I can differential between the source and target list boxes?

What I find a bit strange is that the list still seems to contain the string being dragged, even though it was removed in the MouseMove routine.


If (e.Effect = DragDropEffects.Copy Or e.Effect = DragDropEffects.Move) Then

    'See if the name is already in the list
    If lstCollection.FindStringExact(item) = ListBox.NoMatches Then
        'The font does not exist in the list
        If (indexOfItemUnderMouseToDrop <> ListBox.NoMatches) Then
            'There is something under the mouse so insert
            Me.lstCollection.Items.Insert(indexOfItemUnderMouseToDrop, item)
        Else
            'There is nothing under the mouse so add
            Me.lstCollection.Items.Add(item)
        End If
    End If
End If


This is where it is removed

' If the drag operation was a move then remove the item.
If (dropEffect = DragDropEffects.Move) Then
    lstCollection.Items.RemoveAt(indexOfItemUnderMouseToDrag)

    ' Select the previous item in the list as long as the list has an item.
    If (indexOfItemUnderMouseToDrag > 0) Then
	lstCollection.SelectedIndex = indexOfItemUnderMouseToDrag - 1

    ElseIf (lstCollection.Items.Count > 0) Then
	' Selects the first item.
	lstCollection.SelectedIndex = 0
    End If
End If


Thanks
David
AnswerRe: Problem with Drag & Drop between list boxes Pin
sumit703422-Oct-08 22:47
sumit703422-Oct-08 22:47 
GeneralRe: Problem with Drag & Drop between list boxes Pin
TheComputerMan22-Oct-08 23:01
TheComputerMan22-Oct-08 23:01 
GeneralRe: Problem with Drag & Drop between list boxes Pin
Mycroft Holmes22-Oct-08 23:39
professionalMycroft Holmes22-Oct-08 23:39 
GeneralRe: Problem with Drag & Drop between list boxes Pin
TheComputerMan22-Oct-08 23:44
TheComputerMan22-Oct-08 23:44 
QuestionDesignMode Dilemma! [modified] Pin
Saul Johnson22-Oct-08 8:49
Saul Johnson22-Oct-08 8:49 
AnswerRe: DesignMode Dilemma! Pin
Dave Kreskowiak22-Oct-08 11:43
mveDave Kreskowiak22-Oct-08 11:43 
GeneralRe: DesignMode Dilemma! Pin
Saul Johnson24-Oct-08 4:54
Saul Johnson24-Oct-08 4:54 
QuestionLinkLabels and Data Source Pin
KrisnNala22-Oct-08 8:28
KrisnNala22-Oct-08 8:28 
AnswerRe: LinkLabels and Data Source Pin
Wendelius22-Oct-08 9:40
mentorWendelius22-Oct-08 9:40 
GeneralRe: LinkLabels and Data Source Pin
KrisnNala23-Oct-08 7:08
KrisnNala23-Oct-08 7:08 
GeneralRe: LinkLabels and Data Source Pin
Wendelius23-Oct-08 7:55
mentorWendelius23-Oct-08 7:55 
GeneralRe: LinkLabels and Data Source Pin
KrisnNala23-Oct-08 8:22
KrisnNala23-Oct-08 8:22 
GeneralRe: LinkLabels and Data Source Pin
Wendelius24-Oct-08 7:49
mentorWendelius24-Oct-08 7:49 
GeneralRe: LinkLabels and Data Source Pin
KrisnNala24-Oct-08 22:13
KrisnNala24-Oct-08 22:13 
GeneralRe: LinkLabels and Data Source Pin
Wendelius25-Oct-08 0:42
mentorWendelius25-Oct-08 0:42 
QuestionUsing ODBC or OLE to handle database with LONG column? Pin
John Wadleigh22-Oct-08 3:00
John Wadleigh22-Oct-08 3:00 
AnswerRe: Using ODBC or OLE to handle database with LONG column? Pin
Dave Kreskowiak22-Oct-08 5:04
mveDave Kreskowiak22-Oct-08 5:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.