Problem with OCX control fixed by a messagebox.

Started by Elias Montoya, January 11, 2012, 04:38:39 PM

Previous topic - Next topic

Elias Montoya


Im trying to fix BasictoPHP's DHTMLEdit support, because it doesn't work on windows 7. Easy stuff. However i am getting stuck with something that should be easy... and adding a simple message box fixes everything...

   Local Dh   As IDHTMLEdit
   Local sPar  As String
   Local wPar  As wString
   Local vPar  As Variant
   
   Dh = OC_GetDispatch(HWND_STEP10_OCXCONTROL1)


This doesn't work...   
   If IsObject(Dh) Then
      sPar = "C:\Users\Diamante\Documents\test.html"
      vPar = sPar           
      Dh.NewDocument
      Dh.LoadDocument vPar
      wPar = Only_Path(sPar)     
      Dh.BaseURL = wPar           
      dh.refresh
      Dh = Nothing     
   End If


But this works just fine after closing the message box...
   If IsObject(Dh) Then
      sPar = "C:\Users\Diamante\Documents\test.html"
      vPar = sPar           
      Dh.NewDocument
      MsgBox "ocus pocus"
      Dh.LoadDocument vPar
      wPar = Only_Path(sPar)     
      Dh.BaseURL = wPar           
      dh.refresh
      Dh = Nothing     
   End If


I must be doing something wrong. Any ideas what is it?  :o
Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.

Elias Montoya


Im sorry, im not sure this post goes here... it's not a firefly issue, but a question about my own code.
Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.