Solved

Window events

Posted on 2002-03-31
8
162 Views
Last Modified: 2010-05-02
I have a window which is created runtime from within a form. That window is not an MDIChild but a child window to the form. The only thing I know about the window is its handle( i know that is all would need ). Having said that, how would I capture mouse events or any event in that window.

A code snippet and a little explanation will be of great help.

Thanks
0
Comment
Question by:maggari
  • 5
  • 2
8 Comments
 
LVL 1

Expert Comment

by:COAtheGREAT
ID: 6909098
Is this window vb Form or some other program ?
0
 

Author Comment

by:maggari
ID: 6909459
Its created runtime from a VB form. Its actually a VB window. I don't know if its a form or not. What if its a form?
0
 
LVL 1

Expert Comment

by:COAtheGREAT
ID: 6909864
You can create custom Events like any other class and fire them when you need. On the form that creates your child form dimension the chield form with events.

Dim WithEvents MyForm as vbForm 'this enables you to catch her events

Private Sub MyForm_SomethingHapened()

end sub

0
 

Author Comment

by:maggari
ID: 6912862
Its not a form. Its a window created by one of the Win32 API functions. So, if anyone can tell me how to catch the events from such a window, that will help.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:maggari
ID: 6913064
Its not a form. Its a window created by one of the Win32 API functions. So, if anyone can tell me how to catch the events from such a window, that will help.
0
 

Author Comment

by:maggari
ID: 6913305
Its not a form. Its a window created by one of the Win32 API functions. So, if anyone can tell me how to catch the events from such a window, that will help.
0
 

Author Comment

by:maggari
ID: 6913415
Its not a form. Its a window created by one of the Win32 API functions. So, if anyone can tell me how to catch the events from such a window, that will help.
0
 
LVL 49

Accepted Solution

by:
DanRollins earned 50 total points
ID: 7638002
maggari, an EE Moderator will delete this for you.
Moderator, my recommended disposition is:

    DELETE this question.

DanRollins -- EE database cleanup volunteer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Use Multiple Forms 4 48
Vb.net 2008 2 56
Prevent checkbox click event occur while editing it in vb6 8 33
Add and format columns in vb6 7 46
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now