Results 1 to 15 of 15

Thread: changing desktop size like icq

  1. #1

    Thread Starter
    Addicted Member cwm's Avatar
    Join Date
    Mar 2000
    Posts
    133
    if you drag icq to the sides of your screen it will snap to the side and make like the task bar so window borders touch it when the windows are maximized.. how does it do this?

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    You've Chosen a Hard one Here. You need to use the SHAppBarMessage API. There's a lot of stuff to do, I'll make you a class module to get it all working, just give me a few hours.

  3. #3
    Lively Member
    Join Date
    Jul 2000
    Location
    Vaxjo, Sweden
    Posts
    85
    Try this class, called TAppbar. I've used it myself (though just in one app), and it works fine. Only problem I've found is that my app sometimes crash when running Pagemaker, but that might be some other problem.

    http://www.geocities.com/SiliconVall...6/appbar14.zip

    //Anders

  4. #4
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    I'm Doing Mine anyway, and It'll be much better.

  5. #5

    Thread Starter
    Addicted Member cwm's Avatar
    Join Date
    Mar 2000
    Posts
    133

    Talking

    thanks, anders, i'll check it out while sam works on his

  6. #6
    New Member
    Join Date
    Feb 2000
    Location
    Fayetteville, AR 72701
    Posts
    12

    Thumbs up

    i am also very interested in this code. I've used always on top and always on bottom however the look just isn't right... I've been scowering the web for how to resize the desktop similar to icq...
    STEngineer

    visit stengineer.com for all your Star Trek and LCARS Programming needs

  7. #7
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089
    Sorry Guys, It's Taking a bit Longer that Expected, I'll Get it Done Though.

  8. #8
    New Member
    Join Date
    Feb 2000
    Location
    Fayetteville, AR 72701
    Posts
    12

    Cool

    ok, i've found some code which seems to work nicely for resizing the "workarea".....

    'example (you could put this anywhere, i'm using it on form load)
    Call ChangeWorkArea(0, Screen.Height / Screen.TwipsPerPixelY, 0, Screen.Width / Screen.TwipsPerPixelX)


    'the rest here in a module
    Public Const SPI_SetWorkArea = 47
    Public Const SPI_GetWorkArea = 48

    Public Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long

    Public Type tCoord2D
    left As Long
    top As Long
    right As Long
    bottom As Long
    End Type


    Public Function ChangeWorkArea(top As Integer, bottom As Integer, left As Integer, right As Integer)
    Dim Rect As tCoord2D

    Rect.top = top
    Rect.left = left
    Rect.right = right
    Rect.bottom = bottom
    SystemParametersInfo SPI_SetWorkArea, 0, Rect, 0
    End Function
    STEngineer

    visit stengineer.com for all your Star Trek and LCARS Programming needs

  9. #9
    Guest
    I'd really like to see this example as well- sounds very interesting. Anyway, keep it up sam

  10. #10

    Thread Starter
    Addicted Member cwm's Avatar
    Join Date
    Mar 2000
    Posts
    133
    big bump...
    how do i find out the 'work area' when i need it?
    the code up there tells me how to change it but not how to retriev it.. and the zip link is dead
    Generic vb 5

    Private Sub WakeMyAssUp( As Boolean)
    If Then : = False
    End Sub

  11. #11
    Lively Member
    Join Date
    Aug 2000
    Location
    Belgium
    Posts
    87
    To download the zip use your right mouse button and click save file as... I did it that way and it worked!

  12. #12
    Frenzied Member
    Join Date
    Mar 2000
    Posts
    1,089

    Err Sorry Guys

    The Desktop resizing kinda got burried under a huge in pile and then forgotten about, unfortunatley the in pile is still fairly sizable so I don't have time to finish it. If you want to know roughly what I was doing, I was making a control that was basicly a nice easy interface to all the suff you can do with the SHAppBarMessage API here is what microsoft say about that API


    I'll try to get it finished if I have time

  13. #13

    Thread Starter
    Addicted Member cwm's Avatar
    Join Date
    Mar 2000
    Posts
    133
    Originally posted by cwm
    big bump...
    how do i find out the 'work area' when i need it?
    the code up there tells me how to change it but not how to retriev it.. and the zip link is dead


    WakeMyAssUp



    stoopid me

    Generic vb 5

    Private Sub WakeMyAssUp( As Boolean)
    If Then : = False
    End Sub

  14. #14

    Thread Starter
    Addicted Member cwm's Avatar
    Join Date
    Mar 2000
    Posts
    133
    hey sam... can i call you sam? ok, Mr. Finch, can you just shoot up a quick ap that'll show me the current coords of the work area?
    Generic vb 5

    Private Sub WakeMyAssUp( As Boolean)
    If Then : = False
    End Sub

  15. #15

    Thread Starter
    Addicted Member cwm's Avatar
    Join Date
    Mar 2000
    Posts
    133
    please? anyone?

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