Results 1 to 13 of 13

Thread: Forms *Resolved*

  1. #1

    Thread Starter
    Addicted Member Mage's Avatar
    Join Date
    Jan 2003
    Location
    London- Org SA
    Posts
    134

    Forms *Resolved*

    I am stuck I have 2 forms Form1 and Form2. Form1 is an mdichild
    what is happening is depending on what item is selected from a combobox on Form1 will open Form2 so that info can be entered. the problem is form2 keeps going behind Form1 and the forms freak out a bit.

    I have tried

    Code:
    Form2.show
    Code:
    Form2.show , Form1
    Code:
    Form2.show
    Form2.setfocus
    and i keep gting errors. Should form2 be and Mdichild or what.
    oh on form2 i am enabled =false some frames depending on the item in the combobox

    can anyone help.
    Last edited by Mage; Aug 7th, 2003 at 09:31 AM.

  2. #2

    Thread Starter
    Addicted Member Mage's Avatar
    Join Date
    Jan 2003
    Location
    London- Org SA
    Posts
    134
    um i fixed it i found a in the lostfocus of the combox i had it combobox.setfocus feel pretty stupid now.
    but i still ahve a question. I am getting an error on the form2.show , form1 why??

  3. #3
    Member
    Join Date
    Aug 2003
    Posts
    51
    why don't you use a normal form.

  4. #4

    Thread Starter
    Addicted Member Mage's Avatar
    Join Date
    Jan 2003
    Location
    London- Org SA
    Posts
    134
    I have a whole lot forms and they are all contained in an MDIForm

  5. #5
    Frenzied Member dynamic_sysop's Avatar
    Join Date
    Jun 2003
    Location
    Ashby, Leicestershire.
    Posts
    1,142
    if you aint using Form2 as an mdi child , you can do this...
    VB Code:
    1. Form2.Show vbModal
    but the window will stay on top of the parent untill you close it.
    ~
    if a post is resolved, please mark it as [Resolved]
    protected string get_Signature(){return Censored;}
    [vbcode][php] please use code tags when posting any code [/php][/vbcode]

  6. #6
    Member
    Join Date
    Aug 2003
    Posts
    51
    MSDN
    An MDIForm object can't bemodal.

  7. #7

  8. #8
    Fanatic Member laserman's Avatar
    Join Date
    Jan 2002
    Location
    Wales U.K
    Posts
    775
    What error?

  9. #9

    Thread Starter
    Addicted Member Mage's Avatar
    Join Date
    Jan 2003
    Location
    London- Org SA
    Posts
    134
    Form2 went be hind form1 cos i had the combobox seting focus to itself in the lostdfocus (dont ask me i i did that) so that problem has been solved changing form2 from Mdichild = true to False and VBmodal go that problem sorted.

    thanks for the help guys... to hot here today not concerntrating wnat to be out in the sun...

  10. #10

    Thread Starter
    Addicted Member Mage's Avatar
    Join Date
    Jan 2003
    Location
    London- Org SA
    Posts
    134
    Ok I have it working now but i need to send some of the info in the text boxes in Form2 back to the Form1 but now that Form2 is no longer a mdichild i cant reference Form1. I am i going to have to use Global variables to pass the information back??

  11. #11
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    Originally posted by Mage
    Ok I have it working now but i need to send some of the info in the text boxes in Form2 back to the Form1 but now that Form2 is no longer a mdichild i cant reference Form1. I am i going to have to use Global variables to pass the information back??
    You should still be able to reference anything that is Public on Form1 by doing Form1.MyVar or Form1.MyControl.

  12. #12

    Thread Starter
    Addicted Member Mage's Avatar
    Join Date
    Jan 2003
    Location
    London- Org SA
    Posts
    134
    Thanks I will have a look

  13. #13

    Thread Starter
    Addicted Member Mage's Avatar
    Join Date
    Jan 2003
    Location
    London- Org SA
    Posts
    134
    most odd went back to it and everything is there

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