Distinguished Contributor
Posts: 177
Registered: ‎09-05-2006
Message 1 of 2 (50 Views)

Only Form visible,Not button.

50 Views, 1 Replies
12-26-2006 10:34 AM
Hi, all.
How could I show my button?
Some help? Thanks in advance.

'Contents of Class1.vb'
Imports Autodesk.AutoCAD.Runtime
Imports System.Windows.Forms

Public Class GILSclass1
Friend WithEvents Button1 As System.Windows.Forms.Button
Public Sub actylyr()
Dim frm As New Form
End Sub
End Class

'Contents of GLA.vb'
Imports Autodesk.AutoCAD.Interop
Imports Autodesk.AutoCAD.Interop.Common
Public Class GLA
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Visible = True
Dim AutoCADObject As AcadApplication = GetObject(, "AutoCAD.Application")
Dim lyr1 As AcadLayer
Dim lyr1name As String = "MyLayer"
lyr1 = AutoCADObject.ActiveDocument.Layers.Item(lyr1name)
lyr1.color = 73
End Sub
End Class
Distinguished Contributor
Posts: 177
Registered: ‎09-05-2006
Message 2 of 2 (50 Views)

Re: Only Form visible,Not button.

12-29-2006 12:54 PM in reply to: gilseorin
It's solved.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.