Results 1 to 15 of 15

Thread: Minimizing multiple forms

  1. #1

    Thread Starter
    Fanatic Member kinjalgp's Avatar
    Join Date
    Apr 2000
    Location
    India
    Posts
    535

    Unhappy

    I have used three forms in my project which are placed one below the other. I have disabled the border of the forms and used images instead of buttons. But when I press the ImageButtom for minimizing the forms they are minimized under three diferent tabs. I want them to go into one tab in the tray. I know it is possible using MDI parent and child forms but in MDI paren form it is not possible to remove the border of the form.

    Please help me.

    kinjal

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Just make one single form with showintaskbar=true, then if you want to switch between which one is getting the focus on the base which one was minimized you can use setfocus in the form showed in taskbars gotfocus event
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  3. #3

    Thread Starter
    Fanatic Member kinjalgp's Avatar
    Join Date
    Apr 2000
    Location
    India
    Posts
    535

    Red face

    I think you didn't get my question. I want all the three forms to be minimised under single space like Jet Audio MP3 player which uses multiple forms but when minimized, goes into a single tab named JET AUDIO in the system tray.

  4. #4
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    You have your app in system tray? then i'm sure you don't have that kind of problem, or do you mean taskbar`?
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  5. #5

    Thread Starter
    Fanatic Member kinjalgp's Avatar
    Join Date
    Apr 2000
    Location
    India
    Posts
    535

    Lightbulb

    Sorry I meant taskbar and not system tray.

  6. #6
    Lively Member
    Join Date
    Jan 1999
    Location
    Rochester NY, USA
    Posts
    93
    you can't make them all "go into one item" on the task bar. What you're going to have to do is make it look like they do. You're going to have to have only one of the forms show on the task bar.

    I think want you want is when the main form is minimized, all forms are minimized but only one item on the task bar. What you're going to have to do is put some code in the Resize event for the main form. In that code, you're going to want to check to see if the main forms windowstate is VbMinimized.. if so, minimize the others.... if it's VbNormal.. you're going to want to make the others VbNormal. That will make the other forms minimize and maximize with the main form without showing them in the task bar. Hope that helps.

  7. #7
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    rchiav, i think you don't understand this, all forms are shown in taskbars whenever they're visible. Minimizing resoring or maximizing just puts the windows to do it. Just put showintaskbar true on one form and making the restoring&minimizing by code
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  8. #8
    Lively Member
    Join Date
    Jan 1999
    Location
    Rochester NY, USA
    Posts
    93
    What he explaind was that he wants the fuctionality of a MDI form without using a MDI form. He minimizes the main form.. they all minimize..he restores the one item in the system tray.. they all restore. Like VB in a SDI environment.. you have a bunch of windows but when you minimize VB, you minimize all windows and there's only one item in the task bar.

  9. #9

    Thread Starter
    Fanatic Member kinjalgp's Avatar
    Join Date
    Apr 2000
    Location
    India
    Posts
    535

    Talking

    Exactly !!!

    Yes RCHIAV you got it right. I want that functionality in my program. Is there any way to do it.

    Thanks for understanding my question.

    Kinjal

  10. #10
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    All right maybe i missunderstood something here, but this is easy thing then:

    1. Search up the resize event of you mainform
    2. If the mainforms windowstate is not vbnormal then for each all items in forms and put their windowstate properties to mainforms windowstate

    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  11. #11
    Guest
    Just to jump in and say my two cents

    There is a proporty in the forms "ShowInTaskBar" if you set this to "False" for the two forms that you don't want to show in the task bar I think you'll have it liked.

    Best

  12. #12
    Lively Member
    Join Date
    Jan 1999
    Location
    Rochester NY, USA
    Posts
    93
    call me crazy.. but didn't I already say what the last two posters did?

    OK.. here goes again..

    In the main form... for the Resize event (this will get called when you minimize or maximize it).. do something like..

    Dim i as Integer

    If me.WindowState = VbMinimized then
    For i = Forms.Count - 1 to 1 Step -1
    Forms(i).WindowState = VbMinimized
    Next i
    End If


    Then do one for the windowstate = VbNormal. You're going to have to set the other forms to not show on the task bar. The one problem is that what are you going to do when you minimize one of the other forms and want to bring it back again? In the VB development environment, the windows show up as boxes on the desktop but I'm not sure how to do that part. Hope that helps...


  13. #13
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Well, call me crazy too, go look at my first post on this thread
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  14. #14
    Lively Member
    Join Date
    Jan 1999
    Location
    Rochester NY, USA
    Posts
    93
    uhm.. that post talks about setting focus.. where does it mention anything about the resize event and minimizing other forms? Here's your first post..

    "Just make one single form with showintaskbar=true, then if you want to switch between which one is getting the focus on the base which one was minimized you can use setfocus in the form showed in taskbars gotfocus event"

    I'm not trying to be hostile here but it looks like people keep regergitating what has already been said..

  15. #15
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    ok, i misunderstood, i thought kinjalgp understand that part, sorry about that.
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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