Accessing Child Object from Pane.Handle |
Post Reply |
Author | |
ianp
Moderator Group Joined: 19 December 2003 Location: United Kingdom Status: Offline Points: 119 |
Post Options
Thanks(0)
Posted: 30 January 2004 at 3:14am |
Hi, I'm using the ActiveX docking pane control. Once I have created a Pane and set the Pane.Handle to the form to be used as the Child Window, I am trying to get access to the controls on the form of the Child Window. Can anyone suggest how I can do this from the Pane.Handle? Ideally what I am looking for is something like:
frm.command1.caption = "My New Value" So the question really is, how do you turn a window handle (hwnd) into a vb form object? Thanks Ian
Using both Edited by ianp |
|
robs
Groupie Joined: 09 November 2003 Status: Offline Points: 84 |
Post Options
Thanks(0)
|
Ian, Will something like this work for you?: Dim f As Form If Not f Is Nothing Then |
|
ianp
Moderator Group Joined: 19 December 2003 Location: United Kingdom Status: Offline Points: 119 |
Post Options
Thanks(0)
|
Thanks for your message. I had two appraoches to this: maintain a global/form variable with an array of pointers to the forms; or get the form object back from a loop (as you suggested). Dunno if it's just me but both seem kinda excessive so thought there maybe an API or function that I hadn't heard of. Oh well, sticking with the "for f in forms" approach for now as it appears faster and easier.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |