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

Only Form visible,Not button.

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

Re: Only Form visible,Not button.

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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community