-
Dec 17th, 2007, 10:09 AM
#1
Thread Starter
Frenzied Member
DragDrop on own control
I have two listviews and I don't want the user to be able to drop data onto it's original listview control.
How Can I stop this?
Thanks
-
Dec 17th, 2007, 10:34 AM
#2
Re: DragDrop on own control
Do you have the listview set for DragMode mode of lvwManual or OLEDropMode to none?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Dec 17th, 2007, 10:39 AM
#3
Thread Starter
Frenzied Member
Re: DragDrop on own control
I have two listviews, and I want to be able to drag data either way.
Both have the following properties:
DragMode = vbManual
OLEDragMode = vbDragAutomatic
OLEDropMode = vbDropManual
-
Dec 17th, 2007, 10:40 AM
#4
Re: DragDrop on own control
Um, you are using them for dragdrop but you dont want one to dragdrop?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Dec 17th, 2007, 10:44 AM
#5
Thread Starter
Frenzied Member
Re: DragDrop on own control
Originally Posted by RobDog888
Um, you are using them for dragdrop but you dont want one to dragdrop?
lvwSource has a list of names for emailing. I drag the chosen names to lvwSeletced then click on email and it opens a new email using Shell etc.
I was wanting to be able to unselect a selected name by dragging it back to the original lvwSource.
Is this not a good idea, or not usual practise?
I do also have command buttons to move the names either way.
-
Dec 17th, 2007, 10:46 AM
#6
Re: DragDrop on own control
Well personally I would just use one listview with multiple selections enabled. Then loop through it emailing only the selected ones.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Dec 17th, 2007, 10:52 AM
#7
Thread Starter
Frenzied Member
Re: DragDrop on own control
I was just copying Outlook Express this way.
If I do use two listviews, would you just go with dragging just the one way, and use the buttons, and maybe a context menu to remove any unwanted items?
-
Dec 17th, 2007, 10:56 AM
#8
Re: DragDrop on own control
Well it should be symetrical actions. If you allow drag to one lvw then you should allow removal by drag back to the source. A context menu would be good too as most users expect most actions to use one somehow.
so with that are you also meaning you need to "filter" out non destination dragdrop items?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Dec 17th, 2007, 11:01 AM
#9
Thread Starter
Frenzied Member
Re: DragDrop on own control
Originally Posted by RobDog888
so with that are you also meaning you need to "filter" out non destination dragdrop items?
Could you elaborate a bit more on this point please.
-
Dec 17th, 2007, 11:03 AM
#10
Re: DragDrop on own control
If you set a control to accept dragdrop objects then it will accept anything that is dragdropped on to it.
You would want to check the type of object and if not a listviewitem type then abort or if a listviewitem thats source is not your listview then abort.
Basically error trapping to prevent errors where something will be drpeeded that is not contained in the lvwsource.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Dec 17th, 2007, 11:05 AM
#11
Thread Starter
Frenzied Member
Re: DragDrop on own control
Thanks RobDog888
(can't rep you again yet, sorry)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|