VB RezQ - Source Recovery for Visual Basic vbrezq.com
   Home   |   Overview   |   Download   |   Buy Now   |   Support
VB RezQ

Example - Part 2      Previous     Next


Recovery of the UserDocument File, Firstdoc.dob

Compare the information recovered by VB RezQ on the right with the original source file on the left.
Comments on differences are shown in red.

    1. VB RezQ recovers the procedure declaration but not its executable code.
    2. This procedure is commented out as VB RezQ cannot determine its argument list or its type (Sub, Function, Get, Let, Set).






Buy Now

Download Demo

Product Overview

More Information

Recovery Example

FAQ


Original Source File Diff As Recovered by VB RezQ
VERSION 5.00
Begin VB.UserDocument FirstDoc 
   ClientHeight    =   2130
   ClientLeft      =   0
   ClientTop       =   900
   ClientWidth     =   4770
   HScrollSmallChange=   225
   ScaleHeight     =   2130
   ScaleWidth      =   4770
   VScrollSmallChange=   225
   Begin VB.TextBox txtFirstDoc 
      Height          =   285
      Left            =   1800
      TabIndex        =   4
      Top             =   1080
      Width           =   2655
   End
   Begin VB.TextBox txtURL 
      Height          =   285
      Left            =   1800
      TabIndex        =   3
      Text            =   "http://www.microsoft.com"
      Top             =   465
      Width           =   2775
   End
   Begin VB.CommandButton cmdNavigateTo 
      Caption         =   "NavigateTo"
      Height          =   255
      Left            =   240
      TabIndex        =   2
      Top             =   480
      Width           =   1455
   End
   Begin VB.CommandButton cmdShowForm 
      Caption         =   "Show Form"
      Height          =   255
      Left            =   240
      TabIndex        =   1
      Top             =   1680
      Width           =   1455
   End
   Begin VB.CommandButton cmdGoNext 
      Caption         =   "Go Next"
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   1095
      Width           =   1455
   End
   Begin VB.Menu mnuHelp 
      Caption         =   "&Help"
      NegotiatePosition=   3  'Right
      Begin VB.Menu mnuAbout 
         Caption         =   "About FirstDoc"
      End
   End
End
Attribute VB_Name = "FirstDoc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Private Sub cmdGoNext_Click()
    Dim strPath As String    ' String to be parsed
    Dim strAbsPath As String ' Result of parsing
    Dim intI As Integer      ' Character position counter

    ' Return the path of the current ActiveX document.
    strPath = Trim$(UserDocument.Parent.LocationName)
    
    ' Find the position of the last separator character.
    For intI = Len(strPath) To 1 Step -1
        If Mid$(strPath, intI, 1) = "/" Or _
            Mid$(strPath, intI, 1) = "\" Then Exit For
    Next intI

    ' Strip the name of the current .vbd file.
    strAbsPath = Left$(strPath, intI)
    
    ' Set the global variable to Me, allowing
    ' the SecndDoc document to get any public
    ' properties, or call any public functions.
    
    Set gFirstDoc = Me '

    ' Navigate to the second ActiveX document.
    UserDocument.Hyperlink.NavigateTo _
        strAbsPath & "SecndDoc.vbd"
End Sub

 Private Sub cmdNavigateTo_Click()
   ' Use the Hyperlink object method NavigateTo
   ' to go to the URL in txtURL.
   
   Hyperlink.NavigateTo txtURL.Text
 End Sub

Private Sub cmdShowForm_Click()
   ' Show the auxiliary form, and set the Text
   ' property of txtAux to the URL of FirstDoc.
   frmAux.txtAux.Text = txtURL.Text
   frmAux.Show vbModal

End Sub

Private Sub mnuAbout_Click()
   frmAbout.Show vbModal
End Sub

Private Sub txtFirstDoc_Change()
   PropertyChanged
End Sub

 Private Sub UserDocument_Hide()
    ' Count the number of times this instance of the
    ' document is hidden. Declare a static variable,
    ' and increment it by one every time the event occurs.
    Static i As Integer
    i = i + 1
   Debug.Print "FirstDoc Hide " & i
 End Sub

Public Property Get strDocProp() As String
   strDocProp = txtFirstDoc.Text
End Property

Public Property Let strDocProp(ByVal NewStrDocProp As String)
   txtFirstDoc.Text = NewStrDocProp
End Property

Private Sub UserDocument_Initialize()
   Debug.Print "FirstDoc Initialize"
End Sub

Private Sub UserDocument_InitProperties()
   Debug.Print "FirstDoc Init Properties"
End Sub

Private Sub UserDocument_ReadProperties(PropBag As PropertyBag)
   txtFirstDoc.Text = _
   PropBag.ReadProperty("StrDocProp", _
   "Hello")
   Debug.Print "ReadProperties"
End Sub

Private Sub UserDocument_Show()
    ' Count the number of times this instance of the
    ' document is shown. Declare a static variable,
    ' and increment it by one every time the event occurs.
    Static i As Integer
    i = i + 1
   Debug.Print "FirstDoc Show " & i
End Sub

Private Sub UserDocument_Terminate()
   Debug.Print "FirstDoc Terminate"
End Sub

Private Sub UserDocument_WriteProperties(PropBag As PropertyBag)
   PropBag.WriteProperty "StrDocProp", _
   txtFirstDoc.Text, "Hello"
   Debug.Print "WriteProperties"
End Sub 


































































1>

















2>


2>



















VERSION 5.00
Begin VB.UserDocument FirstDoc
   ClientHeight    =   2130
   ClientLeft      =   0
   ClientTop       =   900
   ClientWidth     =   4770
   HScrollSmallChange =   225
   ScaleHeight     =   2130
   ScaleWidth      =   4770
   VScrollSmallChange =   225
   Begin VB.TextBox txtFirstDoc
      Height          =   285
      Left            =   1800
      TabIndex        =   4
      Top             =   1080
      Width           =   2655
   End
   Begin VB.TextBox txtURL
      Height          =   285
      Left            =   1800
      TabIndex        =   3
      Text            =   "http://www.microsoft.com"
      Top             =   465
      Width           =   2775
   End
   Begin VB.CommandButton cmdNavigateTo
      Caption         =   "NavigateTo"
      Height          =   255
      Left            =   240
      TabIndex        =   2
      Top             =   480
      Width           =   1455
   End
   Begin VB.CommandButton cmdShowForm
      Caption         =   "Show Form"
      Height          =   255
      Left            =   240
      TabIndex        =   1
      Top             =   1680
      Width           =   1455
   End
   Begin VB.CommandButton cmdGoNext
      Caption         =   "Go Next"
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   1095
      Width           =   1455
   End
   Begin VB.Menu mnuHelp
      Caption         =   "&Help"
      NegotiatePosition =   3
      Begin VB.Menu mnuAbout
         Caption         =   "About FirstDoc"
      End
   End
End
Attribute VB_Name = "FirstDoc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
 
' This form rebuilt by VBRezQ v2.0n.  12-Mar-2001 / 22:07:01
Option Explicit 
 
Sub cmdGoNext_Click()
End Sub
 
Sub cmdNavigateTo_Click()
End Sub
 
Sub cmdShowForm_Click()
End Sub
 
Sub mnuAbout_Click()
End Sub
 
Sub txtFirstDoc_Change()
End Sub
 
Sub UserDocument_Hide()
End Sub
 
'Sub strDocProp()
'End Sub
 
'Sub strDocProp()
'End Sub
 
Sub UserDocument_Initialize()
End Sub
 
Sub UserDocument_InitProperties()
End Sub
 
Sub UserDocument_ReadProperties(PropBag As PropertyBag)
End Sub
 
Sub UserDocument_Show()
End Sub
 
Sub UserDocument_Terminate()
End Sub
 
Sub UserDocument_WriteProperties(PropBag As PropertyBag)
End Sub 

Copyright © 2004 ThunderPeek Software - All Rights Reserved