Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

VB6 HTML Elements OffsetParent Recursive Problem

VB6 HTML elements offsetParent recursive problem
How to recursively go through all parent elements of the current element on html page?
I do this and get error
While (TypeOf elem Is IHTMLElement)
parentall = "-Parent Tag=" & elem.offsetParent.tagName & _ & ",l=" & elem.offsetLeft & ";t=" & elem.offsetTop & _
Set elem = elem.offsetParent

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
VB6 HTML Elements OffsetParent Recursive Problem
VB6 HTML elements offsetParent recursive problem
How to recursively go through all parent elements of the current element on html page?
I do this and get error
While (TypeOf elem Is IHTMLElement)
parentall = "-Parent Tag=" & elem.offsetParent.tagName & _ & ",l=" & elem.offsetLeft & ";t=" & elem.offsetTop & _
Set elem = elem.offsetParent

VB6 HTML Elements OffsetParent Recursive Problem
VB6 HTML elements offsetParent recursive problem
How to recursively go through all parent elements of the current element on html page?
I do this and get error
While (TypeOf elem Is IHTMLElement)
parentall = "-Parent Tag=" & elem.offsetParent.tagName & _ & ",l=" & elem.offsetLeft & ";t=" & elem.offsetTop & _
Set elem = elem.offsetParent

Applet And HTML Elements
How can I access DHTML elements from within a Java applet in IE4?

Loop Through HTML Form Elements!
I am using the WebBrowser control. I want to find out what are the different HTML Form elements existing in the web page a user is currently viewing. How do I do that?



How To Obtain HTML Elements In An IFrame
Hi to all !

I've started in VB an InternetExplorer OLE Control, navigated the IE to a WebPage containing an IFrame where I want to gather informations about the elements in that IFrame. But my problem is, that the IFrame in the VB DOM Model doesn't have any HTML elements, though there are many which are displayed in that frame.

Here's a part of my VB code:
Dim browser As InternetExplorer
Dim myFrame As HTMLIFrame

'start the browser
Set browser = CreateObject("InternetExplorer.Application")

'other code

'navigate the browser to the WebPage containing the IFrame
browser.navigate (newUrl)

'other code

'the IFrame "mainWindow" can be found, I get back a valid HTMLIFrame Object, but this Object has no childNodes or children
Set myFrame = getMainWindow()

'obtain the IFrame called "mainWindow"
Private Function getMainWindow() As HTMLFrameBase
    Dim frames As HTMLElementCollection
    Dim frame As HTMLIFrame
    Set frames = getElementsByTagName("IFrame")
    For Each frame In frames
        If = "mainWindow" Then
            Set getMainWindow = frame
            Exit For
        End If
End Function

Private Function getElementsByTagName(name As String) As HTMLElementCollection
    Set getElementsByTagName = browser.document.getElementsByTagName(name)
End Function

Is there an other way to get informations about HTML elements in an IFrame or I'm doing something wrong ?

Thanks for your help !

[UNRESOLVED] Can Control Any Html Elements With The WebBrowser, Except...
My application is filling a web page automatically with the WebBrowser control (textboxes, checkboxes and so on).

<td valign="top"> <font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000">
<input type="text" name="Date_Birth" value="">

I can easily fill this date of birth textbox with the following line of code:

WebControl.Document.Forms(0).Date_Birth.Value = strMyDOB

I can also usually submit a form by code with forms(0).submit, but now it doesn't work. The "SUBMIT" button is an image which I'd like to click, or use to properly submit the form...

<td class="whiteSm" colspan="2"><br>
<input type="image" src="/images/submit.jpg" width="85" height="25" border="0"></td>

(I think the class"whiteSm" is somehow interferring here, and since I'm not an html guru, I need you people to help me out)

Any idea would be greatly appreciated! Thanks!

Catch Events Of An Elements In HTML Page
I wrote this code for catching events of an elements in Html Page and it works fine(When the html page does not contains frames):

Private WithEvents HDoc As HTMLDocument

Private Sub HDoc_onfocusin()
Dim Elem As IHTMLElement
Set Elem = HDoc.parentWindow.event.srcElement
End Sub

The problem is that if the html page contains frames , that code is no longer working.
my question is how to catch events of an elements in html pages that contains a frame and the elements are in one of the frames.


Writing Contents Of HTML Page Elements (VBScript)
Someone help me.

My problem is I need to create a MSWord document and format it (2.75" down from the top of the page, centered, bembo font (don't ask)).

I can create, open, write-to, and save the document with no problem via the following code:

<script language="vbscript">
function createDocument()

Dim objWordObject
Dim objDocObject
Dim msWord

Set objWordObject = CreateObject ("Word.Application")
objWordObject.Application.visible = true
set objDocObject = objWordObject.Documents.Add(,, 1, True)

If document.form.EnterSection1.value <> "" Then
objDocObject.Content = document.form.EnterSectionI.value
objDocObject.Content = document.form.sectionOptionI.value
End If

objDocObject.SaveAS docFOlder & "C: est.doc"
End Function

What I need now is to plug in some formatting code (obviously before I write and save). Does anyone have any suggestions? Methods?

Thanks in advance...

Fetching Form Input Elements In A Html Document From Vb 6
In my VB6 program I'm trying to read a URL and then trying to fetch login and password field names. Can any one help me how to do this please.


How To Attach Events To HTML DOM Elements? (Webbrowser Control Gurus, Anyone?)
I use Webbrowser control to parse HTML DOM documents.
I want to attach new events to certain elements in this document.
There is such method .attachevent, but i just can't get into it's syntax!

ASSUMPTION: there is a function or procedure named Hello in the target document.

VB Code:
Private Sub Command5_Click()Dim docHTML As New HTMLDocumentDim TablesColl As IHTMLElementCollectionDim MyTable As New HTMLTableDim MyCell As HTMLTableCell Set docHTML = WebBrowser1.DocumentSet TablesColl = docHTML.getElementsByTagName("TABLE")Set MyTable = TablesColl(0)Set MyCell = MyTable.rows(1).cells(0) 'this doesn't workMyCell.attachEvent "onclick", docHTML.parentWindow.hello() 'this also doesn't workMyCell.attachEvent "onclick", hello() End Sub

Excel Dosn't Respond To Events When HTML Elements Pasted To Worksheet Have The Focus

I am building a workbook in Excel 2000 where I need to recreate drop boxes from web pages. I can do this by manually creating new controls in xl and pasting in the selection list data then programmatically assigning the corresponding HTML option value to a string by doing a select case. Problem is I have a few hundred to do, so this option is extremely time consuming. I can paste the control right off the web page into the workbook and use the function below to grab the HTML option value that is already contained in the control. Much easier. This code stops me from having to search out and type all of the options for the user to select and then adjusting those values from code to work with the web pages.

Code:Function dropboxvalue(objname As Object, tcell As Variant)
    Dim true1
    true1 = objname.Selected 'set true1 to string of true/falses
    Dim MyPos
    MyPos = InStr(1, true1, "TRUE", 1) 'find true in string
    pos1% = ((Val(MyPos) - 1) / 6) + 1 'determine increment of selected option
    Dim opt1
    opt1 = objname.Values 'opt1 = list of options
        opt1 = ";" & opt1 & ";"
    optpos1% = 0
    For q = 0 To Val(pos1%) - 1
        startpos1% = optpos1% + 1
        optpos1% = InStr(startpos1%, opt1, ";", 1) 'set starting point of correct option in string
    Next q
    optpos2% = 0
    For q = 0 To Val(pos1%)
        startpos2% = optpos2% + 1
        optpos2% = InStr(startpos2%, opt1, ";", 1) 'find end point
    Next q
    len1% = (optpos2% - optpos1%) - 1 'length of option string
    start1% = optpos1% + 1 'stasrting position of option
    dropboxvalue = Mid(opt1, start1%, len1%) 'set dropboxvalue = option string
End Function

This code works like charm, problem is I can't get Excel to respond to any events while one of these controls has the focus and I can't find a way to switch focus with the enter or tab key. The worksheet is not responing to and events while one of these HTML elements is active. This is a problem because it prevents being able to tab or enter through the fields and activate other things on the worksheet. Purhapse there is a way to get the controls to respond that I havn't tried yet. Any suggestions you have would be great, thanx.


Non-recursive Into Recursive
I am going to start to wrok on a project that converts a non-recursive procedure into a recursive one and the opposite.

Any ideas, links ,books ref, anything that would help ?

I could use either pseudocode,vb,c++, or any other stuff .

Thanx in advance

Recursive Help
Does anyone have any examples on how to use recursion or any tutorials. Thanks

Recursive SQL
I want to know how to create a recursive SQL in MS-SQL Server 6.5. The table contains PATH_ID, PATH_NM, PARENT_ID as columns.

The row look like this
1 C: 0
3 SYSTEM32 2

If i give 3 ie PATH_ID, then the query should me the output as follows C:WINNTSYSTEM332

Your help is much appreciated

FTP Recursive Properties
Hi, I'm using API calls to wininet.dll to connect to a FTP server, creating an effective FTP Client. The one thing I can't seem to find any information on is how to get Recursive properties from a file. You know, stuff like 0644 and 0777. File permissions, I guess. I've searched around, and there's either no information or I don't know what the correct term for it is. Anybody know how to get these numbers?

Recursive Use Of Forms
Is there a way to use the same form more than once at the same time?


A VB Project has two forms: Form A and Form B.

Form A has a listview control that lists a bunch of items.

Form B is the editor for the items in which you can add and update items.

The double click event on the listview on Form A calls the public LoadItem() function on Form B and then makes Form B visible. (Because I encountered some errors in the past, I actually unload form B from Form A first before calling the public LoadItem() function on Form B.)

User can then edit the item on Form B and click save to update the DB.
Then Form B is unloaded and that brings us back to form A.

Another scenario is the user double clicks the listview in Form A which again brings up the item in Form B. Then the user double clicks on another listview item. This then reloads Form B with the most recent item selected in the listview on Form A.

Using this logic, I can only have one item (Form B) at a time. I would like to be able to allow users to open multiple items at a time (one Form A that spawns many Form Bs)

Is that possible?


My initial thought is to just re-create the form a few time and impose a finite limit (N) on the number of items that can be simultaneously opened where N= the number of replicated forms in my VB project. Of course this would alos mean a little extra logic to see which is the lowest numbered Form B available.
So I would then have FormB_1, FormB_2, FormB_3,...etc

Recursive Sub Times Out
While the code is ASP.NET, I suspect the problem is not strictly a .NET issue. As I didn't get any response in the XML forum on the .NET sister site, I'm trying here.

Can anyone tell me why this code is timing out? I assume it has something to do with the ShowTree subprocedure, but I don't see exactly what that could be. I copied most of the code out of a book Sams Teach Yourself ASP.NET in 21 Days, 2nd Ed.

<%@ Page Language="VB" %>
<%@ Import Namespace="System.Xml" %>

<script runat="server">
Dim i As Integer
Dim strOutput As String = ""

Sub Page_Load (Sender As Object, e As EventArgs)

Dim xmlDoc As New XMLDocument()


Catch ex As Exception
strOutput = "Error accessing XML file"
End Try

lblOutput.Text = strOutput
End Sub

Sub ShowTree (node As XMLNode)

Dim attrnode As XmlNode
Dim map As XmlNamedNodeMap

If Not(node.HasChildNodes)
strOutput += "&nbsp;&nbsp;<b>" & node.Name & "</b> &lt;" & _
node.Value & "&gt;<br>" & vbCrLf
strOutput += "<b>" & node.Name & "</b>"
If node.NodeType = XmlNodeType.Element Then
map = node.Attributes
For Each attrnode In map
strOutput += " <b>" & attrnode.Name & "</b> &lt;" & _
attrnode.Value & "&gt;" & vbCrLf
End If
strOutput += "<br>"
End If

If node.HasChildNodes Then
node = node.FirstChild
While Not IsNothing(node)
node = node.NextSibling
End While
End If
End Sub

<title>Dark Age of Camelot : Servers Status</title>

<asp:label id="lblOutput" runat="server" />


Getting Permutations, Recursive?
Hello, nice forum, I registered a year or so back but forgot all my details so rejoined.

I dont do much coding and have hit a problem which is beyond my grasp and am requesting help.

I need something to output every permutation of a variable set of inputs. Let me give some examples of the inputs.

4-6N 1-3A 5-6A

This means 4 to six A's, followed by 1 to 3 N's, followed by 5 to 6 A's.

I could also have any number of input chunks.

So, 5-5A 2-3N 3-3N 1-3N 3-3A is also a valid input.

I have prepared this input by putting the information into a collection of collections. So if we take the first example input, 4-6N 1-3A 5-6A, I have a 3 element collection of collections, the sub collections containing:

in collection 1:

in collection 2:

in collection 3:

So. From there I want to output every permutation of the above into another collection, thats where my puny mind breaks down. I suspect it requires some sort of recursive sub routine which moniters the positions in the sub collections and header collection but I just cant work it out. Help?

Recursive Error
I'm trying to make a recursive procedure that will list all files in a folder (including its subfolders). The dir function returns an error .... It seems that it loose its argument...

Private Sub listFile(inPath As String)
Dim fn As String

fn = Dir(inPath, vbDirectory)
While fn <> ""
If fn <> "." And fn <> ".." Then
If GetAttr(inPath & fn) = vbDirectory Then
listFile (inPath & fn & "")
Debug.Print fn
End If
End If
fn = Dir 'Invalid procedure call or argument
End Sub

Help Please With Recursive Functions
I'm trying to learn Visual Basic and have this project to complete, Can someone help please?

I have an algorithm for the function called Mystery and the recursive function Search which is called by Mystery:

Output The answer is: Search(1, N, N)
END of Mystery

Search(First, Last, N)
Output “First = “, First, “Last = “, Last
Mid = (First + Last) DIV 2
IF (Mid * Mid <= N) AND (N < (Mid + 1) * (Mid + 1)) THEN
ReturnValue Mid
IF Mid * Mid> N THEN
ReturnValue = Search(First, Mid - 1, N)
Return Value = Search(Mid + 1, Last, N)
Search = ReturnValue
END Search

I have to work out the exact output when the function is called with Mystery(9) and Mystery(15). I thought the easiest way was to write the function as a VB program, but I'm haivng trouble with that, I'm just not sure where to start and then how to find theoutput with regard with the Mystery(9) and Mystery(15) input.

Anyone help plz? Much appreciated.

Recursive Scan
Does anybody know how I could list all files from a directory and its subdirectories in a ListBox, and all the directories and subdirectories to another (one listbox contains all files and their paths, the other one only the folders)?


Iterative &gt; Recursive
In this thread, BillSoo states that "A key concept in recursion is that any recursive function can be rewritten as an iterative function and likewise any iterative function can be written recursively.".

I am attempting to write a recursive function that will cycle through all possible permutations of a set of comboboxes. That is: I have a webpage with 4 comboboxes. Each combobox has N number of possible selections. I would like to, sequentially, select each and every possible combination and submit the form.

I have written an iterative function that works (below). However, I cannot seem to grasp how to convert this into a recursive function. I have searched here and elsewhere (as evidenced by my thread reference), but have not yet found a solution. Any ideas?

(I'm writing this in Segue's SilkPerformer. It's an automated performance test tool that uses a pseduo basic language. sPageData is the source from the entire webpage. The sub-functions parse the source data and return strings, numbers, etc.)

function fncLoop(sPageData:string)


sCB1 := fncComboboxName(sPageData, 1);
sCB2 := fncComboboxName(sPageData, 2);
sCB3 := fncComboboxName(sPageData, 3);
sCB4 := fncComboboxName(sPageData, 4);

for nCB1 := 1 to fncNumberOfComboboxSelections(sPageData, sCB1) do
for nCB2 := 1 to fncNumberOfComboboxSelections(sPageData, sCB2) do
for nCB3 := 1 to fncNumberOfComboboxSelections(sPageData, sCB3) do
for nCB4 := 1 to fncNumberOfComboboxSelections(sPageData, sCB4) do
sCB1S := fncComboboxSelectionName(sPageData, sCB1, nCB1);
sCB2S := fncComboboxSelectionName(sPageData, sCB2, nCB2);
sCB3S := fncComboboxSelectionName(sPageData, sCB3, nCB3);
sCB4S := fncComboboxSelectionName(sPageData, sCB4, nCB4);
SubmitForm(sCB1S, sCB2S, sCB3S, sCB4S);
end fncLoop;

Recursive Programming
Hello. I am kinda in a bind right now and I was wondering if any of you out there might be able to help me.

I am writing a FloodFill function for Lord Helmut's (yes, that guy) Level Editor. The current one he has just replaces every tile in the level with the selected tile. I am trying to write a true fill function. Here is the code I have so far.

Private Function FloodFill2(ByVal fillX As Integer, ByVal fillY As Integer, ByVal tileX As Byte, ByVal tileY As Byte, ByVal targetTileX As Byte, ByVal targetTileY As Byte) As Boolean

If (Map(fillX, fillY).tileX <> targetTileX) And (Map(fillX, fillY).tileY <> targetTileY) Then Exit Function

Map(fillX, fillY).tileX = tileX
Map(fillX, fillY).tileY = tileY

If fillX > 0 Then Call FloodFill2(fillX - 1, fillY, tileX, tileY, targetTileX, targetTileY)
If fillX < 63 Then Call FloodFill2(fillX + 1, fillY, tileX, tileY, targetTileX, targetTileY)
If fillY > 0 Then Call FloodFill2(fillX, fillY - 1, tileX, tileY, targetTileX, targetTileY)
If fillY < 63 Then Call FloodFill2(fillX, fillY + 1, tileX, tileY, targetTileX, targetTileY)
FloodFill2 = True

End Function
What I do is check if the tile can filled. If it cannot, I exit the function. If it can, I fill it, then call the function again, this time at different coordinates.

This function works fine in C, but when ran in VB, I get an "Out of Stack Space" message.

Is there any way that I can get a function to call itself many times? Recursive programming hates me X_X

Recursive Mishap
I am designing an application to search and compare 2 text files. To do so, I am creating a recursive function that passes 2 text streams as its parameters (one for each text file). My problem happens when I set a temp variable within the function to the value of the param. I want to be able to set the temp var equal to a new occurence of the text stream. The way I have it setup now, it is only pointing my temp to the param. This throws off the whole function because the idea is to change the temp without affecting the param. I know this sounds confusing, but I have added some of the code below to clarify a little. Does anyone know how to create a new instance of a text stream (my temp var) without having it point to the original?

Private Sub Process(tsA As Scripting.TextStream, _
tsB As Scripting.TextStream)

Dim tempA As Scripting.TextStream
Dim tempB As Scripting.TextStream
Dim textA As String, textB As String

tempA = tsA <-- error: pointing to tsA/ tsB instead of
tempB = tsB <-- creating a new instance

textA = tempA.ReadLine
textB = tempB.ReadLine

Recursive Subroutine
Hello everyone! I'm in a bit of a bind. I hate recursive logic and I am not very good at it. For the most part I think I can do what I want in this case, except for a file access issue.

Here's what I want to do, in psuedocode:

Private Sub File_Trace (Filename as String)
Open a LST file 'initial is specified by the user
while not EOF
Read in a new filename
If file extension is LST
add filename to a tree
Call File_Trace (filename)
insert filename into a list box
end if
close file
End Sub
The thing I am worried about is the file I/O numbers, and being able to correctly set the heirarchy of the files (this file goes under that one...). The tree portion I think I can manage, but what are your thoughts on the file access?

Thanks for looking at it.

Recursive Programming
can anyone help me with recursive proggin in visual basic, im seriously desperate cuz my book doesnt go over it to well and my boss wants me to make an app to test my skill on it

Recursive Renaming
What I wanted to do was make an application that would allow you to enter a directory (the root DIR of your music folder) and have the program go through all the files, and captilize the first letter of every word in the file's name.

NewFileName = StrConv(FileName, vbProperCase)
Name FileName As NewFileName

will rename it for me, and it works perfectly... however, I don't know how to loop through a folder and apply that line of code to every file found within...

Can anybody point me in the right direction?

Thanks in advance.

SQL Recursive Call?
The below table is a table of employees titled "tblPeople". The "B" column represents who that person's boss is (from the exact same table) with an integer code of that person's ID.

OK stay with me here, as shown in the below table both Bill Smith and Don Walton's boss is Bob Davis (whose boss is Ed Harris (who does not have a boss.))

My question is this: Is there an SQL statement that will allow you to extract the people into a Recordset who have bosses (B>0) and list both their name and their bosses name?

So, the desired outcome would be:

SmithBillDavis Bob
WaltonDonDavis Bob
DavisBobHarris Ed
...meaning that I could us something like RST.Fields("tblPeople.Last") to print column#1 and RST.Fields("tblPeopleAlias.Last") to print column#3

I know that "SELECT * FROM [tblPeople] WHERE [b]=4" would give you:

.... but I don't want just a "4" -- I want to get the boss's entire name (*without* having to refer to a secondary recordset)

Thanks in advance,

Recursive Database
i have a table with item information and an ID for each ITEM. Some item have parents. some parents have parents to

I want to search an item through all the item and its parent. the table Parent (Child, Parent)
I'm using ms Access .mdb table with data environment and connection.
how can i search through all the parents ? somebody can help me with code, links or anything please ?

thanx in advance.

Stauf's Game Isn't Over

Recursive Relation
How i can make Recursive Relation between tow fields in the same table

Recursive Query ?

I am a bit of a db newbie so here goes:

I need to perform a query on a table, then depending upon the results of this query (ie user choice), perform another query on the results of the first...

How is this best accomplished ? I understand I cannot query directly a recordset results, so would it be a case of a temporary table ?

Any advice seriously appreciated

Recursive Floodfill
Dear Expert

I am trying to find the area recltangle a point or maker within and image covers, useing a recursive floodfill Can anyone help.


Recursive Function
ok i need to create a recursive fuction that goes through an aray of 25 and finds the highest vallue, help?

Recursive Combinations [please Help]
How do I make the code below recursive? I'm trying to create all combination of the array. This gives all combinations where the length is exactly 5. I want it to give all combinatoin where the length is 1 to the ubound of array s. So for a length of 3 there would be 3 nested loops, for length of 8 there would be 8 nested loops and so on.

Ultimately what I want to accomplish is to have an array filled with numbers and find the sum of every possible combination and pick the combination that has a sum that is closet to a target number without going under, but I thought I'd start here first.

VB Code:
Sub CreateCombos()     Dim s(8)     s(1) = "A"    s(2) = "B"    s(3) = "C"    s(4) = "D"    s(5) = "E"    s(6) = "F"    s(7) = "G"    s(8) = "H"     lLen = 5     For i1 = 1 To (UBound(s) - lLen) + 1    For i2 = i1 + 1 To (UBound(s) - lLen) + 2    For i3 = i2 + 1 To (UBound(s) - lLen) + 3    For i4 = i3 + 1 To (UBound(s) - lLen) + 4    For i5 = i4 + 1 To (UBound(s) - lLen) + 5                            Debug.Print s(i1) & s(i2) & s(i3) & s(i4) & s(i5)        Next i5    Next i4    Next i3    Next i2    Next i1 End Sub

Any help?

Recursive Function
I am trying to write a simple recursive function in Visual Studio Express 2005. Any help would be greatly appriciated:

I am receiving the following error when I try to execute the below code:

Error: 61837 - Unable to write read-only property.

VB Code:
Public Function RemoveUserFromUserClasses(ByRef objUserClass As Object, ByRef objUser As Object) As Boolean         On Error GoTo Err_RemoveUserFromUserClasses         'Counter        Dim I As Long        'Hold the current User Class        Dim objCurUserClass As Object          ' For each UserClass remove the user.        If objUserClass.Count > 0 Then            For I = 1 To objUserClass.Count                objCurUserClass = objUserClass.Item(I)                objCurUserClass.Users.Remove(objUser)                RemoveUserFromUserClasses(objCurUserClass.UserClasses, objUser)            Next I        End If  Exit_RemoveUserFromUserClasses:        Exit Function Err_RemoveUserFromUserClasses:        If fLogFileOpen Then            PrintLine(intLogFileNumber, Str(Now.ToOADate) & ": * * * RemoveUserFromUserClasses Error: " & Err.Number & " - " & Err.Description)        End If        Resume Exit_RemoveUserFromUserClasses     End Function

Edit: Added [vbcode][/vbcode] tags for more clarity. - Hack

Recursive Sub... Im No Good At Em!
Basically I need this to be recursive... so
Start a folder "A" that is passed in...
and loop through all Mailitems.. then do the same for each subfolder
this will get 1st level of subfolders..

VB Code:
Private Sub PrintSubjects(oFLD As Outlook.MAPIFolder)For z = 1 To oFLD.Folders.Count    Set ssFld = oFLD.Folders(z)    For x = 1 To ssFld.Items.Count        If TypeOf ssFld.Items(x) Is MailItem Then            Set oMail = ssFld.Items(x)            Debug.Print ssFld.Name & ": " & oMail.Subject        End If    NextNextEnd Sub


Recursive Filling
Making good progress with my map editor, but I've hit a bit of a hurdle.

I want to include a tool that will fill an area of the map with a particular tile (ie. as in arrays, not bitmaps). I already have a recursive function for doing so, which works with small areas and maps. However, my program allows for huge maps - as big as 999 x 999 tiles even - and so on these larger maps I run out of stack space.

Anyone have any ideas how I can rewrite the function, so I don't run out of stack space?

Recursive Loop
I have written a program which runs a recursive loop. I have used sleep to let it sleep for 5 minutes. What it does is it checks another program state and changes it if it is not in the desired state. It does this every 5 minutes. Program works fine except when the computer goes into stand by mode. It doesn't work after that. I have to kill the process and start it again. Can any one help me with this? Also, is there any way I can change the program such that I don't have to use recursive loop but still have the purpose of checking the state of the other program after every 5 minutes.

Recursive Sorting
I need help with some ideas about recursion please. I have been asked to create a football league program. someone said that because of the leagues, team positions, goal differences, scores etc they said that repeated sorting would be needed, like recursion.

It is fairly easy to handle sorting the teams by the "points", based upon the games won, lost etc but I am not quite sure how to handle successive sorting ie

sorting on points AND goal diff

then by

points AND goals for

etc etc

can anyone please suggest a technique for this type of successive sorting based upon multiple data columns etc

Recursive Problem
I want to search number and if I go to the number 6 than it return something that I will know that I got 6. Here is the code if you doesn't understand me. It only need something something at the line in comment...How can I leave the function or return something that will told me that I have pass there?

VB Code:
Option ExplicitConst MIN = 0Const MAX = 8Const OUT = 6 Private Sub Form_Load()Text1.Text = ""Facto (MIN)End Sub Public Function Facto(i As Integer) As IntegerIf (i = MAX) Then    Facto = MAXElseIf i = OUT Then   'STOP ALL and leave the function |||||!!!!!||||!!!!!||   Else    Facto = (i + Facto(i + 1))    Text1.Text = Text1.Text & iEnd If  End Function

Recursive Sub Dirs Using Dir()
hello all.

ive done a search on this one and come up with various results but nothing solid. most of them are using the api, i just want to write a simple recursive function to retrieve all subdirs and their subdirs etc and return their paths in a string array, thats all....

only problem is that you cant use the Dir() function in a recursive...

i also dont want to use the filesytemobject as its way too much overhead...

any advice would be lovely..

Recursive Reads
I am building a documentation program for work. What this will do is open a CFM (ColdFusion HTML) file, find any FORMs that are called and list them out.

Here is what I what to do.

Select the starting CFM progam.
Find all the FORMs that it calls. (This is simple to do)
Next I want to open the FORM (CFM) found and do the same.

I want to build a flow chart (some what) of programs that are called.

The hard part for me is figuring how once I open the next program no to lose the other information I have.


I the calling program calls 3 different programs, I want to open the first program and find any other programs and so on.

I hope this is clear, and did a somewhat good job explaining it.

Thanks for the help.

Recursive Function Help
Last night I spent forever trying to figure out how to do this. Could somebody tell me how to get started, maybe provide some example code?


Recursive Structure In VB...
Is there any way to declare a structure in VB like C...
struct Tree {
struct Tree *LeftPtr;
struct Tree *RightPtr;
int data;
One of the component variables points to itself.
Declaring a pointer to itself...
Is it possible in VB?

Your help is really appreciated...

Recursive Function
Urgent!! I wrote a recursive function. This recursive function will start when I click on the 'Start' button. I need to stop this recursive function when I click on the 'Stop' button, but the 'Stop' button only responce after the recursive function finish, how can I always listen to the 'Stop' button event so I can terminate the recursive function any time as I want? Thanks.

Recursive Filesearch
Anyone know of a good recursive filesearching module thats free? I'd like to grab one for future apps...


Recursive Registry
Hi, how do I search a registry key for all strings and add them to a listbox:


The registry key: HKEY_LOCAL_MACHINESoftwareMy Project
contains strings such as

I would like the form to search the registry key above, and add any strings it findsto List1 (listbox).

(I already have the code to read the registry - I just dont know how to search all keys).

I am using Visual Basic 5.0 Professional.

Any help would be GREAT.


Recursive Directories
I have to write a program that gives me a list of all directories and sub directories from a given point.

'example dir structure:
' -dir1
' -prj1
' -prj2
' -dir2
' -dir3
' -prj3
' -obj1

should yield a list of 7 distinct items.
1. StartDirectorydir1
2. StartDirectorydir1prj1
3. StartDirectorydir1prj2
4. StartDirectorydir2
5. StartDirectorydir3
6. StartDirectorydir3prj3
7. StartDirectorydir3prj3obj1

order is not critical but it would seem more elegant.
fully qualified paths are needed because I am going to take this list and then find all the files in every directory.

is there some simple way to do this?
right now I have huge arrays and I am using the redim preserve statement.
my problem is I seem to get duplicate entities, lost, and just generally messed up
Any ideas on how to do this?
Thank you for your time and have a good day

Recursive Function
here is what am trying to do
let say i have a directory called

thats the root
in that directory there is let say 30 different artits
and in those artists SOME can have more than one album
those that dont have more than one album
the songs are located in just the name of the artist

so if artst1 had one album
all the songs would be located in c:Artistsartist1

and if artist2 had 2 albums
it would be like
c:artistsartist2album1 (songs for this album go here)
c:artistsartist2album2 (songs for album2 go here)

so i would like someone to help me out with making a function that when given c:artist
it will go into every directory
and copy artist name(directory), album name( sub directory), and song names (filenames)
into a table..

thank you

Copyright © 2005-08, All rights reserved