473,779 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems dragging and dropping between two forms

Hi there,

I have a main form with a textbox on it. I have a secondary form that, when
a button is clicked on the main form, pops up with a treeview. I want to be
able to drag nodes onto the main form so that I can put the text of the node
into the textbox.

However, I can get the main form to 'see' the dragged data by setting it's
allowdrop to true, but if i then set it to false and set the textbox's
allowdrop to true, it can't drop. But, if I drag text off anywhere else on
the screen (so outside my app) I can drag it onto the textbox.

Any ideas as it's driving me bonkers!

Cheers

James Slade
Nov 16 '05 #1
0 1010

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

Similar topics

5
1792
by: joe | last post by:
I have an image database that I'd like to populate by dragging an image off the desktop and dropping onto a form (cut/paste would work equally as well) Any suggestions? Thanks, Joe
0
1324
by: Fred Heida | last post by:
Hi, I try to implement dragging (and dropping) of text inside a rtf control (similar as word i guess) I have set AllowdDrop = true and setup the handlers for DragDrop, DragOver, DragEnter. is there anything else i need to do ? becuase if i now select some text in the control and start dragging this, the very first time i see the 'no entry' sign (none of my handlers getting
1
1913
by: Seraph | last post by:
I've never posted here before, but I have lurked for quite some time, and have been frustrated to my whits end on what to do about this. Since there is limited support in previous posts (and many of them being outdated by years at a time) I've decided to post my findings so that hopefully someone else might benefit from my frustration. If you've stumbled upon this post, you most likely already know, in theory, how to define your own...
2
1446
by: Christian Blackburn | last post by:
Hi Gang, I would like to be able to drag and drop documents onto my application and have them open immediately thereafter. Can somebody point me towards a KB article or example? I could find a lot of examples pertaining to dragging and dropping objects within a form, but nothing about dragging external documents over a form. Thanks in Advance, Christian Blackburn
3
2911
by: Dean Slindee | last post by:
In a checked listbox, I am allowing drag/drop of the items within (resequencing). Problem is, when dropping a checked item, the checked state always reverts to unchecked (unwanted). Anyone know how to set the checked state of a checked listbox item in code. Here is the drag/drop code, which works fine, except for unchecking the dropped item: Private Sub clbQueryItems_DragDrop(ByVal sender As System.Object, ByVal e As...
16
1673
by: Geoff Jones | last post by:
Hiya Could anybody direct me to some examples of code to do the following: Display a bitmap on a form which can then be moved about i.e. dragged, using the left down button of the mouse. Thanks in advance Geoff
0
873
by: Mark | last post by:
I am using VB.Net 2003. I have an application that is executed by dropping a file on a shortcut. If I use a shortcut that was created through VB.Net the application doesn't work and shows a circle with a slash through it when I try dropping a file onto the shortcut. If I create a shortcut by right-dragging it to the desktop the alpplication will work as expected. Any ideas what can be done to fix this? Thanks in advance. Mark
11
1813
by: John Dann | last post by:
I'm still struggling to find a way of reordering the items within the same single listbox with drag and drop. I think I've got the drag working but it's the drop code I can't figure out. What I have currently is (with the listbox set to AllowDrop): Sub MyListBox_MouseDown(args etc...) DoDragDrop(MyListBox.SelectedItem, DragDropEffects.Move) End Sub Sub MyListBox_DragEnter(args etc...)
4
1516
by: spectecjr | last post by:
Hey folks; I've got a weird problem... whenever I try to drag and drop a toolbox item onto a form in the Window Forms editor, the control is automatically added on the first click. This gives me very little control over where it ends up, and as you can imagine, is somewhat inconvenient. Anyone know a fix for this? My work system doesn't do this.
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10306
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10138
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9930
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6724
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.