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

Only Form visible,Not button.

51 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 (51 Views)

Re: Only Form visible,Not button.

12-29-2006 12:54 PM in reply to: gilseorin
It's solved.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!