Article | 41023635 |
Type | HowTo |
Product | Engine |
Version | 5.0.0.1033 |
Date Added | 7/13/2004 |
Submitted by | Wayne Romer |
Keywords |
Model space ,Layout and Viewport BkColorEx usage
You should use a code like this :
Private Sub cmdLoad_Click() Dim vLay As vdLayout Set vLay = VDPro.ActiveDocument.LayOuts.Add("TEMP") vLay.BkColorEx.RGB = 16777215 Set VDPro.ActiveDocument.ActiveLayOut = vLay VDPro.Redraw End Sub Private Sub Command1_Click() Set VDPro.ActiveDocument.ActiveLayOut = Nothing VDPro.ActiveDocument.Entities.AddText "Model space is now white and there is nothing you can do!!!", Array(0, 0, 0), 1 VDPro.CommandAction.Zoom "E", 0, 0 End Sub Private Sub Form_Load() VDPro.ActiveDocument.New VDPro.ActiveDocument.Model.BkColorEx.RGB = 0 'to black End SubNote: It is better (ONLY FOR BACKGROUND COLOR) to use RGB values and not the ColorIndex.