472,807 Members | 1,668 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Threads, Processes .NET 2.0 - Drag and Drop Registration

Hi, I have a Drag and Drop registration problem (See http://www.thescripts.com/forum/thread434707.html for similar problem post), can anyone out thereadvise on the best solution?
I have a .NET 2.0 application (actually in C#) called from a third party piece of software via VBScript. The VB script passes an object as a parameter which my application applies changes to.
My C# application dynamically creates a form, which includes controls extended from the RichTextBoxControl. These controls need to support drag and drop.
I also need to ensure that the calling application can not receive mouse/keyboard events until my application stops.

If I call my application directly from the VB script I get a drag and Drop registration exception.

I have tried starting my application via a bridging application which starts the app as a separate process (and waits for it to exit) - my app works OK but I can't pass the required parameter using this method.

I have also tried the following code to create my form in a new STA thread:
//public method called via VB script
public void launchApp(object oParam)
Thread t = new Thread(new ParameterizedThreadStart(formCreator));


//Form creator in separate thread to avoid Drag Drop registration problems
static public void formCreator(object oParam)
frmMyDynamicForm frm = new frmMyDynamicForm(oParam);

This has two problems.
1. Although I don't get Drag and Drop regestration exception, drag and drop still does not work. Another form allows a drag operation to start OK, and my DragEnter event handler on my extended richTextBoxControl is called but the code " e.Effect = DragDropEffects.Link;" line is ignored and the "Can't drop" icon is displayed.
2. The calling application can get focus.

I am tearing my hair out (I have only documented a 2 of many attempted solutions), can anyone offer advice?

Any suggestions would be much appreciated. Thanks!
Aug 21 '06 #1
0 2401

Sign in to post your reply or Sign up for a free account.

Similar topics

by: SamSpade | last post by:
There seems to be two ways to put things on the clipboard ( I don't mean different formats): SetClipboardData and OleSetClipboard If I want to get data off the clipboard do I care how it was put...
by: Ajay Krishnan Thampi | last post by:
I have a slight problem implementing 'drag and drop' from a datagrid to a tree-view. I have pasted my code below. Someone please advice me on what to do...pretty blur right now. ==code== ...
by: Dante | last post by:
Has anyone ever successfully gotten a web deployed exe to have Drag Drop capabilities? I'm currently getting the message: An unhandled exception of type 'System.InvalidOperationException'...
by: Barry Moon | last post by:
Hi Can anyone give me any help with passing an object across processes, via drag and drop? I've written a custom ListView control, which supports dragging and dropping of its items. The...
by: Urs Vogel | last post by:
Hi I sometimes encounter an exception saying that the drag&drop registration failed. What could be the cause of this exception? I couldn't find any documentation. Any hints are appreciated,...
by: jojobar | last post by:
Hello, I look at the asp.net 2.0 web parts tutorial on the asp.net web site. I tried to run it under firefox browser but it did not run. If I want to use this feature in a commercial product...
by: Eric S. Johansson | last post by:
I have a small problem that may be best solved by dragging and dropping a mail message to an icon. But I'm honestly not sure what the data will look like from different e-mail clients. Since most...
by: Raj Wall | last post by:
I have threads with event handlers to watch for new files placed in directories. The handler has a Using { ... } block to process the file which is then deleted. In testing I can drag/drop FileA...
by: haplo | last post by:
Hello! I recently tried using threads in my winForms application in c# along with a form containing a drag& drop listbox which resulted in recieving the infamous "DragDrop registration did not...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Sept 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.