Click here to Skip to main content
15,914,642 members
Home / Discussions / C#
   

C#

 
JokeRe: New to C# with Asp.Net!! Pin
Sandeep Akhare4-Jun-07 0:17
Sandeep Akhare4-Jun-07 0:17 
AnswerRe: New to C# with Asp.Net!! Pin
M. J. Jaya Chitra4-Jun-07 0:14
M. J. Jaya Chitra4-Jun-07 0:14 
GeneralRe: New to C# with Asp.Net!! Pin
Kumar!4-Jun-07 0:28
Kumar!4-Jun-07 0:28 
GeneralRe: New to C# with Asp.Net!! Pin
Christian Graus4-Jun-07 0:34
protectorChristian Graus4-Jun-07 0:34 
GeneralRe: New to C# with Asp.Net!! Pin
Muammar©4-Jun-07 1:18
Muammar©4-Jun-07 1:18 
AnswerRe: New to C# with Asp.Net!! Pin
blackjack21504-Jun-07 0:16
blackjack21504-Jun-07 0:16 
AnswerRe: New to C# with Asp.Net!! Pin
Sathesh Sakthivel4-Jun-07 2:01
Sathesh Sakthivel4-Jun-07 2:01 
Questiondrag drop javascript living together DHTMLEventHandler ? [modified] Pin
lulaleila3-Jun-07 23:18
lulaleila3-Jun-07 23:18 
Hi EveryBody! sorry for the trouble, I have a problem, for delivry of my thesis by ten days.
My problemi s that:

I would like to manage onmousemove, onmouseup, onmousedown events on the web document opened in the browser.

I used the following code for that.

public delegate void DHTMLEvent(IHTMLEventObj e);
public class DHTMLEventHandler
{
//DHTMLEvent è un delegato

public DHTMLEvent Handler;
HTMLDocument Document;
public DHTMLEventHandler(HTMLDocument doc)
{
this.Document=doc;
}
[DispId(0)]
public void Call()
{
Handler(Document.parentWindow.@event);
}
}

DHTMLEventHandler Handler1;
DHTMLEventHandler Handler2;
DHTMLEventHandler Handler3;

public void controller_seleziona()

{
mshtml.HTMLDocument doc = this.br.Document as mshtml.HTMLDocument;

object old_move=doc.onmousemove;
if(old_move.GetType()==typeof(DHTMLEventHandler))Handler1=((DHTMLEventHandler)old_move);
else doc.onmousemove=Handler1=new DHTMLEventHandler(doc);
Handler1.Handler+= new DHTMLEvent(controller_Document_onmousemove);

object old_down=doc.onmousedown;
if(old_down.GetType()==typeof(DHTMLEventHandler))Handler2=((DHTMLEventHandler)old_down);
else doc.onmousedown=Handler2=new DHTMLEventHandler(doc);
Handler2.Handler+= new DHTMLEvent(controller_Document_onmousedown);

object old_up=doc.onmouseup;
if(old_up.GetType()==typeof(DHTMLEventHandler))Handler3=((DHTMLEventHandler)old_up);
else doc.onmouseup=Handler3=new DHTMLEventHandler(doc);
Handler3.Handler+= new DHTMLEvent(controller_Document_onmouseup);

}

It's all ok unless I also want to manage drag-drop over a div appended bymyself on the dom of the page.
To manage the drag drop I appended dynamically the javascript library wz_dragdrop.js v. 4.88
The latest version is available at http://www.walterzorn.com

Now the situation is that the management of onmousemove, onmouseup, onmousedown events on the document builded bymyself continues to work fine, but the drag-drop of the div doesn't work anymore, unless I don't handle the management of onmousemove, onmouseup, onmousedown events on the document anymore. If I don't handle the events, overthat if I don't call the method controller_seleziona then drag-drop work fine.

Even if I handle the management of onmousemove, onmouseup, onmousedown events and then in a second moment I remove that management with the code:
Handler1.Handler -= new TMLEvent(controller_Document_onmousemove);
Handler2.Handler -= new TMLEvent(controller_Document_onmousedown);
Handler3.Handler -= new DHTMLEvent(controller_Document_onmouseup);

The drag-drop continues not working.
Is there a way for let drag-drop live together with my personal handling of the onomousemove,onmouseup, onmousedown events on the document ?

Thanks in advance! I hope in some help please. I'm bit worried

Lula


-- modified at 5:29 Monday 4th June, 2007
QuestionMessage Queue Processing Pin
M. J. Jaya Chitra3-Jun-07 23:18
M. J. Jaya Chitra3-Jun-07 23:18 
AnswerRe: Message Queue Processing Pin
originSH3-Jun-07 23:41
originSH3-Jun-07 23:41 
GeneralThank you Pin
M. J. Jaya Chitra3-Jun-07 23:53
M. J. Jaya Chitra3-Jun-07 23:53 
GeneralRe: Thank you Pin
originSH3-Jun-07 23:57
originSH3-Jun-07 23:57 
QuestionNetwork Information Pull Pin
FatalPuls33-Jun-07 23:15
FatalPuls33-Jun-07 23:15 
AnswerRe: Network Information Pull Pin
originSH3-Jun-07 23:42
originSH3-Jun-07 23:42 
GeneralRe: Network Information Pull Pin
Niiiissssshhhhhuuuuu4-Jun-07 0:53
Niiiissssshhhhhuuuuu4-Jun-07 0:53 
GeneralRe: Network Information Pull Pin
originSH4-Jun-07 1:35
originSH4-Jun-07 1:35 
GeneralRe: Network Information Pull Pin
Niiiissssshhhhhuuuuu4-Jun-07 2:12
Niiiissssshhhhhuuuuu4-Jun-07 2:12 
Questiondeveloping a Drawing Editor in C# using OpenGl Pin
a_david1233-Jun-07 23:00
a_david1233-Jun-07 23:00 
AnswerRe: developing a Drawing Editor in C# using OpenGl Pin
Ilya Verbitskiy3-Jun-07 23:17
Ilya Verbitskiy3-Jun-07 23:17 
AnswerRe: developing a Drawing Editor in C# using OpenGl Pin
blackjack21503-Jun-07 23:45
blackjack21503-Jun-07 23:45 
AnswerRe: developing a Drawing Editor in C# using OpenGl Pin
Christian Graus3-Jun-07 23:52
protectorChristian Graus3-Jun-07 23:52 
GeneralRe: developing a Drawing Editor in C# using OpenGl Pin
a_david1234-Jun-07 0:14
a_david1234-Jun-07 0:14 
GeneralRe: developing a Drawing Editor in C# using OpenGl Pin
Christian Graus4-Jun-07 0:17
protectorChristian Graus4-Jun-07 0:17 
GeneralRe: developing a Drawing Editor in C# using OpenGl Pin
a_david1234-Jun-07 0:30
a_david1234-Jun-07 0:30 
GeneralRe: developing a Drawing Editor in C# using OpenGl Pin
Christian Graus4-Jun-07 0:38
protectorChristian Graus4-Jun-07 0:38 

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.