Announcement

Collapse
No announcement yet.

Embedding a window in VB6 - Help

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #3
    hmm, seems i dont use the right words to search with

    Comment


    • #4
      Destinator embeded

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

      Comment


      • #5
        Originally posted by Jeep
        Test this in VB6. Need to have Destinator 2 SDK installed!
        That's not embedded, I can move Destinator around
        Laidback


        The ultimate CarPC - Wow!

        Comment


        • #6
          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)

          Comment


          • #7
            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
            Laidback


            The ultimate CarPC - Wow!

            Comment


            • #8
              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

              Comment


              • #9
                hmm, i cant seem to get the code to work

                Comment


                • #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.
                  There's somthing rotten in the state of Denmark.

                  Finished IIIIIIIIIIIIIIIIIIIII 99,5%
                  M10000, 256mb, 20gb 2,5" drive, 7" vga touchscreen.

                  Comment

                  Working...
                  X