Results 1 to 10 of 10

Thread: Embedding a window in VB6 - Help

  1. #1
    Low Bitrate
    Join Date
    Apr 2004
    Location
    Hayling Island, UK
    Posts
    100

    Embedding a window in VB6 - Help

    Hello, can someone give me some help on how to embedd a window into vb. im playing with the destinator sdk and im trying to get it to embedd into my project.

    thanks, Tom

  2. #2

  3. #3
    Low Bitrate
    Join Date
    Apr 2004
    Location
    Hayling Island, UK
    Posts
    100
    hmm, seems i dont use the right words to search with

  4. #4
    Constant Bitrate Jeep's Avatar
    Join Date
    May 2004
    Location
    Sweden
    Posts
    153

    Wink Destinator embeded

    Test this in VB6. Need to have Destinator 2 SDK installed!
    Attached Files Attached Files

  5. #5
    Raw Wave Laidback's Avatar
    Join Date
    Oct 2003
    Location
    Madrid
    Posts
    1,984
    Quote Originally Posted by Jeep
    Test this in VB6. Need to have Destinator 2 SDK installed!
    That's not embedded, I can move Destinator around

  6. #6
    Constant Bitrate Jeep's Avatar
    Join Date
    May 2004
    Location
    Sweden
    Posts
    153
    Yes in a way, you can move Destinator inside the picturebox. You have do edit Destinator inf file and set Destinators window to the same size as the picturebox. Inf file is here: C:\PowerLOC\Destinator\Common\Interface\Destinator .Inf Look for "D" ("D,650,412,640") (with,height,osk keyboard with)

  7. #7
    Raw Wave Laidback's Avatar
    Join Date
    Oct 2003
    Location
    Madrid
    Posts
    1,984
    Quote Originally Posted by Jeep
    Yes in a way, you can move Destinator inside the picturebox. You have do edit Destinator inf file and set Destinators window to the same size as the picturebox. Inf file is here: C:\PowerLOC\Destinator\Common\Interface\Destinator .Inf Look for "D" ("D,650,412,640") (with,height,osk keyboard with)
    Yeah, sorry. I meant you can still see the title bar and move it. you could also get the titlebar height in VB and move Destinator to picture1.top - titlebar height, same for borders etc

  8. #8
    Raw Wave Confused's Avatar
    Join Date
    Aug 2003
    Location
    Essex, England
    Posts
    2,224
    This is some code for embedding Destinator into a Visual Basic 6 (VB6) application.

    (Sorry, just trying to put as many key-words into that first sentence as possible for anyone searching later!! )



    Here is code to embed Destinator 2 into VB :

    Make two timers, don't enable either. Give them whatever interval you want.

    Make a Picture Box called pctDest (or change the code below ) on your form and place it where you want.

    Then put this code in your project.

    Code:
    Public Sub Form_Load()
    
    tmrLoadDest.Enabled = True
    
    End Sub
    
    
    Private Sub tmrLoadDest_Timer()
    
    Set Dest2 = New Dest
    Dest2.CreateDestinatorWindow 4
    
    Tmr_LaunchTimeOut.Enabled = False
    Tmr_LaunchTimeOut.Enabled = True
    myhandle = 0
    While myhandle = 0 And Tmr_LaunchTimeOut.Enabled = True
        myhandle = FindWindowByName("*Destinator*")
    DoEvents
    Wend
    Tmr_LaunchTimeOut.Enabled = False
    
    If myhandle = 0 Then Exit Sub
    
    CurrentStyle = GetWindowLong(myhandle, GWL_STYLE)
    CurrentStyle = CurrentStyle And Not WS_DLGFRAME
    CurrentStyle = CurrentStyle And Not WS_SYSMENU
    CurrentStyle = CurrentStyle And Not WS_THICKFRAME
    CurrentStyle = CurrentStyle And Not WS_MINIMIZEBOX
    CurrentStyle = CurrentStyle And Not WS_MAXIMIZEBOX
    
    SetWindowLong myhandle, GWL_STYLE, CurrentStyle
    SetParent myhandle, pctDest.hWnd
    ShowWindow myhandle, SW_MAXIMIZE
    tmrLoadDest.Enabled = False
    
    End Sub
    Little bit of help with that code was from coyote


    Garry
    Co-Developer of A.I.M.E.E
    www.aimee.cc

  9. #9
    Low Bitrate
    Join Date
    Apr 2004
    Location
    Hayling Island, UK
    Posts
    100
    hmm, i cant seem to get the code to work

  10. #10
    Newbie Multiplayer's Avatar
    Join Date
    Sep 2002
    Location
    Denmark
    Posts
    10
    I've tried it aswell. But it gives an error in the line "Set Dest2 = New Dest". Could anyone please explain what this line, is soposed to do.

Similar Threads

  1. Multiple window search string
    By Nellor in forum MediaCar
    Replies: 1
    Last Post: 09-05-2005, 12:22 PM
  2. Embedding apps in vb6
    By Laidback in forum Software & Software Development
    Replies: 9
    Last Post: 05-09-2004, 07:44 PM
  3. LCD in rear window
    By ryanerb in forum LCD/Display
    Replies: 2
    Last Post: 11-21-2003, 08:45 AM
  4. How to remove winamp AVS border. - Sample VB6 code
    By Fusion-One in forum Software & Software Development
    Replies: 1
    Last Post: 10-03-2003, 07:55 PM
  5. Replies: 0
    Last Post: 08-28-2002, 04:23 PM

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
  •