Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
inet
active_desktop
active_scrptng
asp.components
asp.db
asp.general
comctl32
comp.packaging
components.dev
dbweb
dhtml_editing
docobjects
html_authoring
html_objmodel
iis
iis.ftp
iis.security
iis.smtp_nntp
indexserver
misc
mshtml_hosting
scripting.jscript
scripting.vbscript
sdk_setup
shell_objmodel
urlmonikers
webbrowser_ctl
wininet
  
 
date: Mon, 21 Apr 2008 05:34:03 -0700,    group: microsoft.public.inetsdk.programming.webbrowser_ctl        back       


mouse clicked Area from C# DOM   
hi all, i have made IE toolbar, now i want when mouse is clicked on IE 
Area(that area will be inside the html element like div,td,table etc), i want 
to select that and highligh the whole area
 how to do that in C#.
date: Mon, 21 Apr 2008 05:34:03 -0700   author:   tasleem

Re: mouse clicked Area from C# DOM   
"tasleem"  wrote in message
news:5885C9F0-BC31-4B61-808B-6771F07123B4@microsoft.com
> hi all, i have made IE toolbar, now i want when mouse is clicked on IE
> Area(that area will be inside the html element like div,td,table
> etc), i want to select that and highligh the whole area
> how to do that in C#.

I'm not sure what you mean by "whole area", but see if 
document.elementFromPoint helps.
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Mon, 21 Apr 2008 08:44:15 -0400   author:   Igor Tandetnik

Re: mouse clicked Area from C# DOM   
hi, thanks for reply, area means html button of text will lie inside  
elements like table,div etc i am saying area to that, i have tried but 
problem is registering event handler for that, as onclick function of html 
document does not take any arguments which supply position that i use in 
below function,

"Igor Tandetnik" wrote:

> "tasleem"  wrote in message
> news:5885C9F0-BC31-4B61-808B-6771F07123B4@microsoft.com
> > hi all, i have made IE toolbar, now i want when mouse is clicked on IE
> > Area(that area will be inside the html element like div,td,table
> > etc), i want to select that and highligh the whole area
> > how to do that in C#.
> 
> I'm not sure what you mean by "whole area", but see if 
> document.elementFromPoint helps.
> -- 
> With best wishes,
>     Igor Tandetnik
> 
> With sufficient thrust, pigs fly just fine. However, this is not 
> necessarily a good idea. It is hard to be sure where they are going to 
> land, and it could be dangerous sitting under them as they fly 
> overhead. -- RFC 1925 
> 
> 
>
date: Mon, 21 Apr 2008 11:15:02 -0700   author:   tasleem

Re: mouse clicked Area from C# DOM   
tasleem  wrote:
> hi, thanks for reply, area means html button of text will lie inside
> elements like table,div etc i am saying area to that

What if I have a table inside a div inside a table? Which of them is 
"whole area"?

> i have tried but
> problem is registering event handler for that, as onclick function of
> html document does not take any arguments which supply position that
> i use in below function,

window.event.clientX and clientY
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Mon, 21 Apr 2008 14:25:09 -0400   author:   Igor Tandetnik

Re: mouse clicked Area from C# DOM   
it will be a table, i mean immediate parent in DOM will be his Area.

"Igor Tandetnik" wrote:

> tasleem  wrote:
> > hi, thanks for reply, area means html button of text will lie inside
> > elements like table,div etc i am saying area to that
> 
> What if I have a table inside a div inside a table? Which of them is 
> "whole area"?
> 
> > i have tried but
> > problem is registering event handler for that, as onclick function of
> > html document does not take any arguments which supply position that
> > i use in below function,
> 
> window.event.clientX and clientY
> -- 
> With best wishes,
>     Igor Tandetnik
> 
> With sufficient thrust, pigs fly just fine. However, this is not 
> necessarily a good idea. It is hard to be sure where they are going to 
> land, and it could be dangerous sitting under them as they fly 
> overhead. -- RFC 1925
> 
> 
>
date: Mon, 21 Apr 2008 22:20:00 -0700   author:   tasleem

Re: mouse clicked Area from C# DOM   
hi, i was successful in handling that event, i have use below code
 
mshtml.HTMLDocumentEvents2_Event DocEvents = 
(mshtml.HTMLDocumentEvents2_Event)Explorer.Document;
                    DocEvents.onclick += new 
mshtml.HTMLDocumentEvents2_onclickEventHandler(DocEvents_onclick);
and function which is implemented is 
 bool DocEvents_onclick(mshtml.IHTMLEventObj pEvtObj)     and
pEvtObj.srcElement.parentElement gives me desired area which i want, but now 
the issue is with the selection of above html element return using above line,
   what i want to do with that area is select that make it text size bold 
using execommand    

"tasleem" wrote:

> it will be a table, i mean immediate parent in DOM will be his Area.
> 
> "Igor Tandetnik" wrote:
> 
> > tasleem  wrote:
> > > hi, thanks for reply, area means html button of text will lie inside
> > > elements like table,div etc i am saying area to that
> > 
> > What if I have a table inside a div inside a table? Which of them is 
> > "whole area"?
> > 
> > > i have tried but
> > > problem is registering event handler for that, as onclick function of
> > > html document does not take any arguments which supply position that
> > > i use in below function,
> > 
> > window.event.clientX and clientY
> > -- 
> > With best wishes,
> >     Igor Tandetnik
> > 
> > With sufficient thrust, pigs fly just fine. However, this is not 
> > necessarily a good idea. It is hard to be sure where they are going to 
> > land, and it could be dangerous sitting under them as they fly 
> > overhead. -- RFC 1925
> > 
> > 
> >
date: Tue, 22 Apr 2008 05:37:06 -0700   author:   tasleem

Re: mouse clicked Area from C# DOM   
"tasleem"  wrote in message
news:AA5DCB15-44CD-435A-AB85-B8A5A260DD50@microsoft.com
> but now the issue is with the selection of above html element return
>   using above line, what i want to do with that area is select that
> make it text size bold
> using execommand

body.createTextRange, TextRange.moveToElementText, TextRange.execCommand
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Tue, 22 Apr 2008 08:42:14 -0400   author:   Igor Tandetnik

Re: mouse clicked Area from C# DOM   
thanks for your reply, it did help me out. now what i want to do is increase 
the image size if it is clicked, and increase the elements widht and height, 
i guess setattribute and getattribute function are used for that but  there 
is no documentation on msdn for that, mean what to supply in string to get 
the windth,
  thanks once again for continued support

"Igor Tandetnik" wrote:

> "tasleem"  wrote in message
> news:AA5DCB15-44CD-435A-AB85-B8A5A260DD50@microsoft.com
> > but now the issue is with the selection of above html element return
> >   using above line, what i want to do with that area is select that
> > make it text size bold
> > using execommand
> 
> body.createTextRange, TextRange.moveToElementText, TextRange.execCommand
> -- 
> With best wishes,
>     Igor Tandetnik
> 
> With sufficient thrust, pigs fly just fine. However, this is not 
> necessarily a good idea. It is hard to be sure where they are going to 
> land, and it could be dangerous sitting under them as they fly 
> overhead. -- RFC 1925 
> 
> 
>
date: Wed, 23 Apr 2008 00:27:00 -0700   author:   tasleem Tasleem

Re: mouse clicked Area from C# DOM   
"tasleem" <Tasleem arif@discussions.microsoft.com> wrote in message
news:BFF95917-1C53-4E8B-90E6-9147532A0AB3@microsoft.com
> thanks for your reply, it did help me out. now what i want to do is
> increase the image size if it is clicked, and increase the elements
> widht and height, i guess setattribute and getattribute function are
> used for that but  there is no documentation on msdn for that, mean
> what to supply in string to get the windth,
>  thanks once again for continued support

I'm not sure I understand the question, but see 
IHTMLElement::get_offsetWidth and get_offsetHeight.
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Wed, 23 Apr 2008 07:38:09 -0400   author:   Igor Tandetnik

Re: mouse clicked Area from C# DOM   
hi, thanks for reply, only thing which i want to do is increase the size of 
image or html element (height and width) i dont want to set the height and 
width not get.

"Igor Tandetnik" wrote:

> "tasleem" <Tasleem arif@discussions.microsoft.com> wrote in message
> news:BFF95917-1C53-4E8B-90E6-9147532A0AB3@microsoft.com
> > thanks for your reply, it did help me out. now what i want to do is
> > increase the image size if it is clicked, and increase the elements
> > widht and height, i guess setattribute and getattribute function are
> > used for that but  there is no documentation on msdn for that, mean
> > what to supply in string to get the windth,
> >  thanks once again for continued support
> 
> I'm not sure I understand the question, but see 
> IHTMLElement::get_offsetWidth and get_offsetHeight.
> -- 
> With best wishes,
>     Igor Tandetnik
> 
> With sufficient thrust, pigs fly just fine. However, this is not 
> necessarily a good idea. It is hard to be sure where they are going to 
> land, and it could be dangerous sitting under them as they fly 
> overhead. -- RFC 1925 
> 
> 
>
date: Wed, 23 Apr 2008 23:47:02 -0700   author:   Tasleem arif

Re: mouse clicked Area from C# DOM   
"Tasleem arif"  wrote in message
news:4B1E42FD-B90B-490C-8993-BEB346D46AAD@microsoft.com
>  hi, thanks for reply, only thing which i want to do is increase the
> size of image or html element (height and width) i dont want to set
> the height and width not get.

You can use setAttribute to assign width= and height= attributes. A few 
elements also have width and height properties (see 
IHTMLImgElement::put_width, IHTMLTable::put_width).
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925
date: Thu, 24 Apr 2008 08:33:30 -0400   author:   Igor Tandetnik

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us