Article | 70000973 |
Type | Bug |
Product | Engine |
Version | 7009 |
Date Added | 12/30/2016 |
Fixed | 7.7010.0.6 (12/30/2016) |
Submitted by | Steve Smith |
Summary
vdraw ocx inside tabcontrol flashes black background
Solution
Fixed in version 7010.0.6
In order to use a specific BackGround color for all documents the background must set in the AfterOpenDocument and AfterNewDocument evets follow by a redraw as follow:
Option Explicit Public WithEvents vdStackDoc As VectorDraw_Professional.vdDocument Public WithEvents vdStack3DDoc As VectorDraw_Professional.vdDocument Public WithEvents vdFloorDoc As VectorDraw_Professional.vdDocument Const white = 15 Private Sub setcolor(vd As VDrawLib5.VDraw) vd.Palette.RGBToVdColorIndex 255, 127, 32, 0 vd.Redraw End Sub Private Sub Form_Load() Dim retval As Boolean Dim path As String Set vdStackDoc = VDStack.ActiveDocument.WrapperObject Set vdStack3DDoc = VDStack3D.ActiveDocument.WrapperObject Set vdFloorDoc = VDFloor.ActiveDocument.WrapperObject setcolor VDStack setcolor VDStack3D setcolor VDFloor VDStack.Left = 0 VDStack3D.Left = 0 VDFloor.Left = 0 VDStack.Top = 500 VDStack3D.Top = 500 VDFloor.Top = 500 path = App.path + "\\10-41.dwg" retval = VDStack.ActiveDocument.Open(path) retval = VDStack3D.ActiveDocument.Open(path) retval = VDFloor.ActiveDocument.Open(path) End Sub Private Sub Form_Resize() 'Rezise VectorDraw SSTab.Width = Me.Width SSTab.Height = Me.Height - 1000 VDStack.Width = Me.Width VDStack.Height = Me.Height - 1000 VDStack3D.Width = Me.Width VDStack3D.Height = Me.Height - 1000 VDFloor.Width = Me.Width VDFloor.Height = Me.Height - 1000 End Sub Private Sub SSTab_Click(PreviousTab As Integer) If (SSTab.Tab = 0) Then VDStack.Redraw If (SSTab.Tab = 1) Then VDStack3D.Redraw If (SSTab.Tab = 2) Then VDFloor.Redraw End Sub Private Sub vdStackDoc_OnAfterNewDocument(ByVal sender As Object) ' When a new document is created setcolor VDStack End Sub Private Sub vdStackDoc_OnAfterOpenDocument(ByVal sender As Object) ' When a new file is opened setcolor VDStack End Sub Private Sub vdStack3DDoc_OnAfterNewDocument(ByVal sender As Object) ' When a new document is created setcolor VDStack3D End Sub Private Sub vdStack3DDoc_OnAfterOpenDocument(ByVal sender As Object) ' When a new file is opened setcolor VDStack3D End Sub Private Sub vdFloorDoc_OnAfterNewDocument(ByVal sender As Object) ' When a new document is created setcolor VDFloor End Sub Private Sub vdFloorDoc_OnAfterOpenDocument(ByVal sender As Object) ' When a new file is opened setcolor VDFloor End Sub