Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: How do i accomplish this?

  1. #1
    Maximum Bitrate Danceheaven's Avatar
    Join Date
    May 2002
    Location
    Essex, UK'er
    Posts
    664

    How do i accomplish this?

    Hi all im embedding winamps Video / Visulisation window into a vb app does anybody know how to remove the frames around these windows, when it embeds it still has the frame despite what size it is scaled too. ive tried making my own skin with tranparency skin files, it dont work!
    Co Develper of A.I.M.E.E Automotive Intelligent Multimedia Entertainment Engine
    www.aimee.cc

  2. #2
    I'm sorry, and you are....? frodobaggins's Avatar
    Join Date
    Jan 2003
    Location
    Ruston, LA
    Posts
    8,846
    Code:
    Private Sub Command1_Click()
        Dim lStyle As Long
        
        lStyle = GetWindowLong(dhwnd, GWL_STYLE)
        lStyle = lStyle And (Not MY_WS_DOCK)
        SetWindowLong dhwnd, GWL_STYLE, lStyle
        
        SetParent dhwnd, Picture1.hwnd
        MoveWindow dhwnd, 0, 0, Picture1.ScaleWidth / Screen.TwipsPerPixelX, Picture1.ScaleHeight / Screen.TwipsPerPixelY, True
    
    End Sub
    
    Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
    Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
    Public Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
    Public Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long
    
    Public Declare Function MoveWindow Lib "user32" (ByVal hwnd As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long
    
    Public Const WS_CAPTION = &HC00000 'Window with a title bar and border
    Public Const WS_THICKFRAME = &H40000 'Create a window with a sizing border.
    Public Const WS_SYSMENU = &H80000 'Create a window with a system menu on its
    'Title bar. Must be combined with WS_CAPTION
    Public Const MY_WS_DOCK = WS_CAPTION Or WS_THICKFRAME Or WS_SYSMENU
    Public Const GWL_STYLE = (-16)

    That will remove the window border for destinator, should be same principle.
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

  3. #3
    Maximum Bitrate Danceheaven's Avatar
    Join Date
    May 2002
    Location
    Essex, UK'er
    Posts
    664
    Aha Thanks Frodo, is this based on garrys (confused) code?
    Co Develper of A.I.M.E.E Automotive Intelligent Multimedia Entertainment Engine
    www.aimee.cc

  4. #4
    I'm sorry, and you are....? frodobaggins's Avatar
    Join Date
    Jan 2003
    Location
    Ruston, LA
    Posts
    8,846
    Quote Originally Posted by Danceheaven
    Aha Thanks Frodo, is this based on garrys (confused) code?
    yes
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

  5. #5
    Maximum Bitrate Danceheaven's Avatar
    Join Date
    May 2002
    Location
    Essex, UK'er
    Posts
    664
    Quote Originally Posted by frodobaggins
    yes
    Thought so...
    Co Develper of A.I.M.E.E Automotive Intelligent Multimedia Entertainment Engine
    www.aimee.cc

  6. #6
    Maximum Bitrate Danceheaven's Avatar
    Join Date
    May 2002
    Location
    Essex, UK'er
    Posts
    664
    Hi frodo i tried that code, it didnt work
    it basically did the same thing as the code i was already using just displayed the vid or visuals in my pic box but with the frames still attached around the window, i managed to loose the frames by simple offsetting the image by - 10 to the left and - 20 above then strching the image past the pciture box as the box by + 20 and + 40 respectivly i know this is not the best way but it works do you know of any other ways?
    Co Develper of A.I.M.E.E Automotive Intelligent Multimedia Entertainment Engine
    www.aimee.cc

  7. #7
    I'm sorry, and you are....? frodobaggins's Avatar
    Join Date
    Jan 2003
    Location
    Ruston, LA
    Posts
    8,846
    Quote Originally Posted by Danceheaven
    Hi frodo i tried that code, it didnt work
    it basically did the same thing as the code i was already using just displayed the vid or visuals in my pic box but with the frames still attached around the window, i managed to loose the frames by simple offsetting the image by - 10 to the left and - 20 above then strching the image past the pciture box as the box by + 20 and + 40 respectivly i know this is not the best way but it works do you know of any other ways?

    Well I was assuming the frame was a window border. I haven't actually seen what you are referring to.
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

  8. #8
    Maximum Bitrate Danceheaven's Avatar
    Join Date
    May 2002
    Location
    Essex, UK'er
    Posts
    664
    Aha this is very true frodo,
    ok rather than me explaing it if you have a copy of winamp installed change the skin to winamp classic so that original looking skin that winamp came supplied with and then run either the video window or the visualisation windows and thats the borders / frames i want to loose around those windows.
    Co Develper of A.I.M.E.E Automotive Intelligent Multimedia Entertainment Engine
    www.aimee.cc

  9. #9
    I'm sorry, and you are....? frodobaggins's Avatar
    Join Date
    Jan 2003
    Location
    Ruston, LA
    Posts
    8,846
    I would stick to the way you are doing it.
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

  10. #10
    Maximum Bitrate Danceheaven's Avatar
    Join Date
    May 2002
    Location
    Essex, UK'er
    Posts
    664
    Well it does work that way but.. its cheating a bit, dont you think.
    i was speaking to confused last night and he said the coyote did it with out this shifting around trick im using plus he used an overlay or someway of exiting full screen visuals by tapping top right section of the viduals to exit
    Co Develper of A.I.M.E.E Automotive Intelligent Multimedia Entertainment Engine
    www.aimee.cc

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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