Wrox Programmer Forums
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 10th, 2004, 06:09 AM
Registered User
 
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Events in an IE Window

Hello,

I have a IE window opened by the user. And, I need to capture the events happening in THAT window from a VB application running on the same machine. The VB app is not invoking the IE app, like using a Webbrowser control. Simply, capturing events if a IE app is running else it does nothing.

I found samples of capturing events using webbrowser control, but here the control is not going to invoke an event. Its the suer who will envoke events on the IE app and the VB app has to capture them.

Any ideas??

Thanks in Advance,

Cheers,
Paras.
 
Old May 10th, 2004, 12:11 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This is the code I use. Mt icons are in a ImageList control
You can find all the API definitions in the APIViewer
    On Error Resume Next
    Dim hColHeader As Long
    Dim hItem As HDITEM
    Dim k As Long
    Dim bAlignRight As Boolean

        hColHeader = SendMessage(lstData.hwnd, LVM_GETHEADER, 0, 0)
        SendMessage hColHeader, HDM_SETIMAGELIST, 0, ByVal imgList.hImageList

    For k = 0 To lstData.ColumnHeaders.Count - 1
        bAlignRight = (lstData.ColumnHeaders.Item(k + 1).Alignment = lvwColumnRight)
        hItem.mask = HDI_FORMAT Or HDI_IMAGE
        If bAlignRight Then
            hItem.fmt = HDF_STRING Or HDF_RIGHT
        Else
            hItem.fmt = HDF_STRING
        End If
        If k = lstData.SortKey Then
            hItem.fmt = hItem.fmt Or HDF_IMAGE
            If bAlignRight Then hItem.fmt = hItem.fmt Or HDF_BITMAP_ON_RIGHT
        End If
        hItem.iImage = _
            imgList.ListImages(IIf(lstData.SortOrder, cAscending, cDescending)).index - 1
        SendMessage hColHeader, HDM_SETITEM, k, hItem
    Next





Similar Threads
Thread Thread Starter Forum Replies Last Post
Centering Popup window & Blur Parent window jkusmanto Javascript How-To 0 May 25th, 2007 03:19 AM
Window refresh and window pop up in Java Script Aleksandra Javascript How-To 2 March 2nd, 2007 06:47 PM
closed parent window when opened child window jaiwin Javascript How-To 0 October 8th, 2006 12:54 PM
update the window controls even if a model window( maheep83 VS.NET 2002/2003 0 August 23rd, 2006 07:28 AM
Close Parent window on opening child window pkdev Javascript How-To 8 April 11th, 2004 12:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.