.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Only Form visible,Not button.

1 REPLY 1
Reply
Message 1 of 2
gilseorin
191 Views, 1 Reply

Only Form visible,Not button.

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
frm.ShowDialog()
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"
AutoCADObject.ActiveDocument.Layers.Add(lyr1name)
lyr1 = AutoCADObject.ActiveDocument.Layers.Item(lyr1name)
lyr1.color = 73
End Sub
End Class
1 REPLY 1
Message 2 of 2
gilseorin
in reply to: gilseorin

It's solved.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost