com >> Event Issues w/DHTML Designer App and IE6...

by QmlnYnk » Thu, 05 Jan 2006 02:13:02 GMT

I have an app written w/DHTML Designer in VB6 and it is not working in IE6.
Specifically, when using the DHTMLPage_Load event, the HTML page will not
load until the completion of the DHTMLPage_Load event (AsyncLoad is set to
False) so any page objects referenced in the load event have not been created
and their references are not valid. Also, the BaseWindow_OnLoad event is not
being passed down to the targets in a frames-based page. Can anyone offer up
a suggestion to get either of those events working under IE6?
In IE5 (and below) the BaseWindow_OnLoad event is passed down to the targets
on a frames based page, but the behavior for the DHTMLPage_OnLoad event is
the same (which, according to the docs it shouldn't be acting that way) so
that may be a VB issue.
As I said, AsyncLoad is set to False EVERYWHERE. I am using VB6 (SP6).
Rewriting the app right now is not an option and I would rather not run a
side-by-side copy of IE5 on the User machines. Any help would be
appreciated. Thanks!
--Brian


com >> RE: Event Issues w/DHTML Designer App and IE6...

by QmlnYnk » Thu, 05 Jan 2006 03:49:03 GMT


Nevermind, I found a workaround. If anyone is using a DHTML Designer app
still, first you have my sympathy. Next, to fix the problem below I added
the following to my affected pages:

Private Sub Document_onreadystatechange
BaseWindow_onload
End Sub

Thanks,
--Brian







Similar Threads

1. IE7 Appears To Restrict DHTML Page Designer in VB 6.0

2. VB 6 using DHTML page designer

3. DHTML Events

4. More of a designer rather than coding issue - Visual Basic/VB

5. VB6 App QueryUnload event problem when app minimized

Hello,

I have a VB6 app that checks in the QueryUnload event if the user has
finished doing certain things in the app before we let them close the form.
If it's OK for them to close the form (which is the whole application) then
the form closes OK whether or not it's displayed or minimized.  If it's NOT
OK for them to close the form, then we show a modal form (from within the
QueryUnload event) giving them a message that they must complete certain
things before they can close the application and we set the cancel flag so
that the form won't unload.  This works fine when the main form is displayed
on the screen, but if the user tries to close the application when the main
form is minimized on the task bar then they get the modal form all
greyed-out and the whole application is frozen.  If we use the regular VB
message box for the message to the user then it works OK, but it doesn't
give us the flexibility of showing a modal form that we have designed.

I have created a tiny VB6 project that demonstrates the problem.  I can't
debug it because it works OK if you run it VB debug mode.  It only freezes
up when you run the EXE.  The newsgroup won't let me attach the tiny zipped
VB6 project I wrote, so email me and I'll send it to you if you want to look
at it.  Also, since that's the case, I guess I'll put the code here below.
There are just two standard forms for this project.  That's it.

Here's the code for the main form (Form1):

Option Explicit

Private bUnload As Boolean

Private Sub Command1_Click()

    If bUnload = False Then
        Me.Command1.Caption = "You can unload now."
        bUnload = True
    Else
        Me.Command1.Caption = "You cannot unload now."
        bUnload = False
    End If

End Sub

Private Sub Form_Load()

    Me.Command1.Caption = "You cannot unload now."
    bUnload = False

End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

    If bUnload = False Then
        Cancel = 1
        Form2.Show 1
        Exit Sub
    End If

    Cancel = 0

End Sub



Here's the code for Form2:

Option Explicit

Private Sub Command1_Click()

    Unload Me

End Sub



Thanks to anyone who can help.

Sincerely,
William Hildebrand
 XXXX@XXXXX.COM 





6. Write an event to remote APP event log with custom values

7. DHTML issues with IE

8. DHTML / IE Display Issues