AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

vb.net - change button backgroundcolor or dis/enabled StaticPicture

1 REPLY 1
SOLVED
Reply
Message 1 of 2
jan_tappenbeck
550 Views, 1 Reply

vb.net - change button backgroundcolor or dis/enabled StaticPicture

jan_tappenbeck
Collaborator
Collaborator

hi !

 

is it possible to Change the button background-Color or dis/enabled a staticpicture by runtime via vb.net?

 

for background i did not found properties!

 

for staticpicture! i try

 

 

Private WithEvents _Img_ProjCurrent As Autodesk.Map.IM.Forms.PictureBox
Private _ImageProjCurrent As String = "$PICAKTUELL"


 Private Sub Dialog_load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
....
 If Me.Dialog.Controls.Contains(_ImageProjCurrent) Then
                _Img_ProjCurrent = CType(Me.Dialog.Controls.ApiItem(_ImageProjCurrent), Autodesk.Map.IM.Forms.PictureBox)
            End If

....
end Sub

here i get the message that the staticimage could not to be convert!

 

 

cound someone help?

 

regards Jan

0 Likes

vb.net - change button backgroundcolor or dis/enabled StaticPicture

hi !

 

is it possible to Change the button background-Color or dis/enabled a staticpicture by runtime via vb.net?

 

for background i did not found properties!

 

for staticpicture! i try

 

 

Private WithEvents _Img_ProjCurrent As Autodesk.Map.IM.Forms.PictureBox
Private _ImageProjCurrent As String = "$PICAKTUELL"


 Private Sub Dialog_load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
....
 If Me.Dialog.Controls.Contains(_ImageProjCurrent) Then
                _Img_ProjCurrent = CType(Me.Dialog.Controls.ApiItem(_ImageProjCurrent), Autodesk.Map.IM.Forms.PictureBox)
            End If

....
end Sub

here i get the message that the staticimage could not to be convert!

 

 

cound someone help?

 

regards Jan

1 REPLY 1
Message 2 of 2

jan_tappenbeck
Collaborator
Collaborator
Accepted solution

here the right way ....

 

Private WithEvents _BT_ProjCurrent As Autodesk.Map.IM.Forms.Button
...

' special color
_BT_ProjCurrent.Desktop.BackColor = Drawing.Color.LightGreen
...

'default Color
_BT_ProjCurrent.Desktop.BackColor = System.Drawing.SystemColors.Control

...
0 Likes

here the right way ....

 

Private WithEvents _BT_ProjCurrent As Autodesk.Map.IM.Forms.Button
...

' special color
_BT_ProjCurrent.Desktop.BackColor = Drawing.Color.LightGreen
...

'default Color
_BT_ProjCurrent.Desktop.BackColor = System.Drawing.SystemColors.Control

...

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

Post to forums  

Autodesk Design & Make Report