Click here to Skip to main content
15,918,967 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Spool size gets bigger.. Pin
Dave Kreskowiak3-Sep-07 16:24
mveDave Kreskowiak3-Sep-07 16:24 
QuestionRe: Spool size gets bigger.. Pin
Jwalant Natvarlal Soneji3-Sep-07 19:26
Jwalant Natvarlal Soneji3-Sep-07 19:26 
AnswerRe: Spool size gets bigger.. Pin
Dave Kreskowiak4-Sep-07 2:06
mveDave Kreskowiak4-Sep-07 2:06 
QuestionRe: Spool size gets bigger.. Pin
Jwalant Natvarlal Soneji4-Sep-07 3:35
Jwalant Natvarlal Soneji4-Sep-07 3:35 
AnswerRe: Spool size gets bigger.. Pin
Dave Kreskowiak4-Sep-07 11:45
mveDave Kreskowiak4-Sep-07 11:45 
QuestionRe: Spool size gets bigger.. Pin
Jwalant Natvarlal Soneji4-Sep-07 18:10
Jwalant Natvarlal Soneji4-Sep-07 18:10 
AnswerRe: Spool size gets bigger.. Pin
Dave Kreskowiak5-Sep-07 2:01
mveDave Kreskowiak5-Sep-07 2:01 
QuestionFinding all links absolute position X,Y relatively to the screen in VB6 WebBrowser Pin
eugeugeug12329-Aug-07 12:28
eugeugeug12329-Aug-07 12:28 
Finding all links absolute position X,Y relatively to the screen in VB6 WebBrowser
There is a Visual Basic 6 application with WebBrowser in it.
This application is about statistical information on what html tags were loaded, where they are being located - it's position X,Y

For example I want to find Document.getelementsbytagname("a") link and anchor position on the screen, how do I do it?
There is example in JS, that I could inject into webpage by scriptcontrol but could I do in in VB6 itself?
function getElementPosition(elemId)
{
var elem = document.getElementById(elemId);

var w = elem.offsetWidth;
var h = elem.offsetHeight;

var l = 0;
var t = 0;

while (elem)
{
l += elem.offsetLeft;
t += elem.offsetTop;
elem = elem.offsetParent;
}

return {"left":l, "top":t, "width": w, "height":h};
}

Trying by vb6 in webbrowser

Dim WithEvents doc As HTMLDocument
Dim elem As IHTMLElement
Set doc = ie.document

For x = 0 To doc.getElementsByTagName("a").length - 1

Set elem = doc.getElementsByTagName("a")(x)


I want convert this nonsense
'"-PParent=" & elem.offsetParent.offsetParent.tagName & "=" & elem.offsetParent.offsetParent.id & _
'"-3Parent=" & elem.offsetParent.offsetParent.offsetParent.tagName & _
'"-4Parent=" & elem.offsetParent.offsetParent.offsetParent.offsetParent.tagName & _
'"-4Parent=" & elem.offsetParent.offsetParent.offsetParent.offsetParent.id

To while loop, but I can't figure it out how Frown | :(

While (TypeOf elem Is IHTMLElement)
parentall = "-Parent Tag=" & elem.offsetParent.tagName & _
elem.id & ",l=" & elem.offsetLeft & ";t=" & elem.offsetTop & _
Set elem = elem.offsetParent
Wend

Next x

QuestionChecking If Path Contains Point Pin
Paul .29-Aug-07 10:55
Paul .29-Aug-07 10:55 
AnswerRe: Checking If Path Contains Point Pin
Dave Kreskowiak29-Aug-07 12:58
mveDave Kreskowiak29-Aug-07 12:58 
AnswerRe: Checking If Path Contains Point Pin
Luc Pattyn29-Aug-07 13:52
sitebuilderLuc Pattyn29-Aug-07 13:52 
QuestionDataGridView - Edit/Add available? Pin
Marcus J. Smith29-Aug-07 10:11
professionalMarcus J. Smith29-Aug-07 10:11 
QuestionHow to catch a SqlException? Pin
Benny_Lava29-Aug-07 8:42
Benny_Lava29-Aug-07 8:42 
AnswerRe: How to catch a SqlException? Pin
Burnsys229-Aug-07 9:14
Burnsys229-Aug-07 9:14 
GeneralRe: How to catch a SqlException? Pin
Benny_Lava30-Aug-07 4:13
Benny_Lava30-Aug-07 4:13 
QuestionLoading IE toolbars with a webbrowser control Pin
Ahmad Zaidi29-Aug-07 7:08
Ahmad Zaidi29-Aug-07 7:08 
QuestionParent - Child Question Pin
Trupti Mehta29-Aug-07 7:04
Trupti Mehta29-Aug-07 7:04 
AnswerRe: Parent - Child Question Pin
Ian Shlasko29-Aug-07 7:22
Ian Shlasko29-Aug-07 7:22 
GeneralRe: Parent - Child Question Pin
Trupti Mehta31-Aug-07 4:27
Trupti Mehta31-Aug-07 4:27 
GeneralRe: Parent - Child Question Pin
Ian Shlasko31-Aug-07 12:13
Ian Shlasko31-Aug-07 12:13 
GeneralRe: Parent - Child Question Pin
Trupti Mehta31-Aug-07 18:20
Trupti Mehta31-Aug-07 18:20 
GeneralRe: Parent - Child Question Pin
Ian Shlasko31-Aug-07 19:26
Ian Shlasko31-Aug-07 19:26 
Questiontextbox border color Pin
manisghouri29-Aug-07 5:43
manisghouri29-Aug-07 5:43 
AnswerRe: textbox border color Pin
Dave Kreskowiak29-Aug-07 7:05
mveDave Kreskowiak29-Aug-07 7:05 
GeneralRe: textbox border color Pin
manisghouri30-Aug-07 6:07
manisghouri30-Aug-07 6:07 

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.