now my icons are hazed like disabled...

 

after a week of work...

i can see a result... my addin in vb.net has a toolbar with 2 button

but i cant push it

 

please help

 

Posted by: max cul
Post date: 11/18/2008 3:40:21 AM

3 REPLIES

RE: now my icons are hazed like disabled...

hey max-cul,

 

I have an vb.net addin, too. (VS 2008)

but i didn't get any buttons in my group.

maybe you can help me.

 

This is a sample of my way to add buttons:

 

Public Sub OnConnectToEnvironment(ByVal EnvCatID As String, ByVal pEnvironmentDispatch As Object, ByVal bFirstTime As Boolean) Implements SolidEdgeFramework.ISolidEdgeAddIn.OnConnectToEnvironment

 

Dim commandNames As Array = Array.CreateInstance(GetType(String), 1)

Dim commandIDs As Array = Array.CreateInstance(GetType(Integer), 1)

 

Select Case EnvCatID.ToLower

'Part

Case "{26618396-09D6-11d1-BA07-080036230602}".ToLower

'die arrays mit der entsprechenden länge vorbelegen

 

commandNames.SetValue("testbutton", 0)

commandIDs.SetValue(1, 0)

 

m_addin.SetAddInInfo(Marshal.GetHINSTANCE(Me.GetType().Module).ToInt32(), EnvCatID, "MyAddIn", 1, 1, 0, 0, 1, commandNames, commandIDs)

 

 

Dim commandbarButton As SolidEdgeFramework.CommandBarButton = m_addin.AddCommandBarButton(EnvCatID, "MyAddIn", 1)

commandbarButton.Caption = "TEST"

commandbarButton.Enabled = commandbarButton.Visible = True

commandbarButton.Style = SolidEdgeFramework.SeButtonStyle.seButtonCaption

 

'Synchronous Part

Case "{D9B0BB85-3A6C-4086-A0BB-88A1AAD57A58}".ToLower

CreatePartControls(EnvCatID)

'Assembly

Case "{26618395-09D6-11D1-BA07-080036230602}".ToLower

'Synchronous Assembly

Case "{2C3C2A72-3A4A-471D-98B5-E3A8CFA4A2BF}".ToLower

 

End Select

 

 

Try

'Definition der buttons

 

Catch ex As Exception

 

End Try

 

End Sub

 

 

Posted by: marcus heimsoth
Post date: 11/19/2008 3:34:40 AM

RE: now my icons are hazed like disabled...

 

i can give you my  "experiments"

if you want...

 

 

Posted by: max cul
Post date: 11/19/2008 8:29:00 AM

RE: now my icons are hazed like disabled...

i think your problem is that you don't have any "UpdateUI()" EventHandler for you commandbarbuttons.

i have the same problem now!

 

so every commandbarbutton needs an "UpdateUI()" EventHandler.

the problem is that i can't get the "commandbarbuttonevents" from my commandbarbutton in vb.net.

in vb6 it is NO problem, it works fine!!!

 

 

this is the line of code:

 

m_ButtonEvents = m_Button.CommandBarButtonEvents

 

Why does it work in vb6 and not in vb.net?

 

regards

 

Posted by: marcus heimsoth
Post date: 11/26/2008 12:05:22 AM