Results 1 to 2 of 2

Thread: object property - urgent!

  1. #1

    Thread Starter
    Fanatic Member wildcat_2000's Avatar
    Join Date
    Nov 2000
    Location
    Italy
    Posts
    727

    Lightbulb

    Hi all,

    could you please someone help me out here, this IS simple, just an object definition that I cannot find.

    I've got an MDI form, in which a button creates new forms with this code:


    Code:
    Dim frmA As Main
    Set FrmA As New Main
    FrmA.Show
    Main is the name of a template form that I use to create all the forms within the MDI.

    Now, how can I retrieve the Height property of one of these child forms? I need the object name, i.e. if I need the height of Main I use Main.Height, but in this case what can I use? FrmA.Height within a code doesn't work. I believe something as Parent.Height should exist, if someone knows the right expression

    Thank you very much in advance,

    W.
    When your car breaks down,
    close all windows and retry

    => please rate all users posts! <=

  2. #2
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    617

    ....

    Hey Just got in... and saw this.. could be wrong but i'll try..

    1. when u create the child form, find a way to uniquely identify it something like setting its caption or something
    else like frma.caption actually use frma.tag = "may be name of the form here"

    2. then to get the object

    dim objfrm as form

    for each objform in forms
    if objform.tag = "whattever u had there" then
    exit for
    end if

    'at this point u would have the object and u can do

    objfrm.height



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width