Atalasoft
Welcome to Atalasoft Community Sign in | Join | Help
in

form property in VB

Last post 16 Dec 2003, 10:54 AM by DevDude. 5 replies.
Sort Posts: Previous Next
  •  20 Sep 2003, 1:12 PM 4576

    form property in VB

    Does form have any property to make it visible above the system tray/task bar all the time, even if the task bar is scrolled up.

    ie form should have a property like ms-paint/notepad has
  •  20 Sep 2003, 4:43 PM 4577 in reply to 4576

    RE: form property in VB

    Are you wanting to create a form that will stay on top of other windows, or do you want the form to act like the taskbar (AppBar is what I believe it's called)?

    Either way, a VB form doesn't have a property for that. You will have to use Windows API calls.

    Glenn Chittenden Jr.

    Atalasoft Developer


    Glenn Chittenden Jr.
    Atalasoft Development Team
  •  20 Sep 2003, 5:03 PM 4578 in reply to 4576

    RE: form property in VB

    No, what i want is as follows
     
    open the note pad, maximize it. u scroll up task bar. so what happens is, though the task bar becomes bigger, the lower portion of the notepad winodow is now also just alligned with the task bar.
     
    do we have any properties for the form to behave like that.
    if i should use API, anyone could give me the source coude if u have
     
    sony
     
  •  21 Sep 2003, 1:12 AM 4579 in reply to 4576

    RE: form property in VB

    If the form is maximized, the window will act like that automatically. You can make the window maximized in code by setting the WindowState property to vbMaximized.

    Glenn Chittenden Jr.

    Atalasoft Developer


    Glenn Chittenden Jr.
    Atalasoft Development Team
  •  12 Dec 2003, 3:14 PM 4580 in reply to 4576

    RE: form property in VB

    i too have the same problem if i maximize the form it occupies the full screen adn does not show the task bar.
    It is not a MDI form it is a simple form only....
    how to rectify..? by keeping it in maximized state only?
  •  16 Dec 2003, 10:54 AM 4581 in reply to 4576

    RE: form property in VB

    Sony, Veda, the wording of your questions is very confusing. I'm really not sure what it is you're looking for.
     
    It sounds like you want your program forms to resize themselves, whenever the taskbar is resized (so that the taskbar will never be hidden at all). Is that correct?
     
    As Glenn said, if your form is Maximised, then it will resize automatically if the taskbar changes (set form.WindowState to vbMaximised).
     
    However, if you want the same thing to happen when your forms are NOT maximised, then there is an easy solution:
     
    1. Add a SysInfo control to your form
    2. Put code in the appropriate SysInfo event (SettingChanged event, I think)
    3. If the Item that changed was the Taskbar (Item=47?), then use the WorkAreaTop, WorkAreaHeight etc properties of the SysInfo control to resize/move your form.
     
    When moving or resizing, be sure to use the WorkAreaTop and WorkAreaLeft properties, not just the WorkAreaHeight and WorkAreaWidth - they might not be zero!
     
    In other words, DON'T assume that the Taskbar is always at the bottom of the screen. It could be at the top, left or right of the screen. I always put my taskbar at the top of the screen, because I find it vastly more ergonomic than at the bottom - and it really annoys me when programmers don't consider this, or handle it correctly.
     
View as RSS news feed in XML