Click here to Skip to main content
15,908,674 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: how to rectify class not support error in vb6 at win 7 Pin
Richard Deeming8-Jan-18 6:08
mveRichard Deeming8-Jan-18 6:08 
QuestionLoad Report Failed Error show while direct printing crystal report vb.net(Not Every Time) Pin
rttech3121-Dec-17 9:36
rttech3121-Dec-17 9:36 
QuestionVB Searching for data displayed in datagrid/textbox using customer second name Pin
faiqaa20-Dec-17 0:31
faiqaa20-Dec-17 0:31 
AnswerRe: VB Searching for data displayed in datagrid/textbox using customer second name Pin
Richard MacCutchan20-Dec-17 1:25
mveRichard MacCutchan20-Dec-17 1:25 
QuestionBarcode Pin
Member 1358540419-Dec-17 11:08
Member 1358540419-Dec-17 11:08 
AnswerRe: Barcode Pin
Richard MacCutchan19-Dec-17 22:03
mveRichard MacCutchan19-Dec-17 22:03 
AnswerRe: Barcode Pin
David Mujica21-Dec-17 3:22
David Mujica21-Dec-17 3:22 
AnswerProblem with changing property value from attributes panel:Solved Pin
mo149219-Dec-17 4:06
mo149219-Dec-17 4:06 
This is an update. This question is no longer an issue. I found information
about implementing the Verbs() function of the ControlDesigner. Sorry
for the inconvenience. Did not know if I should delete this question or not.

Hello,
The code below adds an action to select 1 of 2 panel configurations:
"SelectPanel2Type" or "SelectPanel3Type".
The controls action list displays the current 'PanelType' selection.
When you click on the current item, the current item text changes to the second panel
text:
Example: If "SelectPanel2Type" is displayed, clicking on it changes to "SelectPanel3Type"
and visa versa.
This functions as expected.

The problem:
The action is also displayed and can be selected from the attributes panel of the Properties window, but when I click on the action in the attributes panel, the text in the attributes
panel does not change to the opposite panel and I cannot select the opposite configuration.
Example:
If "Select Panel2Type" is displayed, when I click on it, the action is performed in
the control, but the text in the attributes panel does not change to "Select Panel3Type".
If I deselect the control and reselect it, the attributes panel will be updated
to "Select Panel3Type".

Is there something that I am not doing to update the attributes panel correctly?
Thank you.

Friend Class SPCActionList
Inherits System.ComponentModel.Design.DesignerActionList

' Host object
Private HostControl As SplitPanelCtrl = Nothing

' Cache a reference to the DesignerActionUIService host.
Private _DesignerActionUIService As DesignerActionUIService

Public Sub New(ByVal component As IComponent)
MyBase.New(component)

' Cache a reference to the control.
HostControl = DirectCast(component, SplitPanelCtrl)

' Cache a reference to update action
_DesignerActionUIService = CType(GetService(GetType(DesignerActionUIService)), DesignerActionUIService)

End Sub

Public Overrides Function GetSortedActionItems() As DesignerActionItemCollection
Dim items As New DesignerActionItemCollection()

items.Add(New DesignerActionHeaderItem("Panel Type Selection"))
items.Add(New DesignerActionMethodItem(Me, _
IIf(Me.HostControl.PanelType = enumPanelType.PanelType2, "SelectPanel3Type", "SelectPanel2Type"), _
IIf(Me.HostControl.PanelType = enumPanelType.PanelType2, "Select Panel3Type", "Select Panel2Type"), _
IIf(Me.HostControl.PanelType = enumPanelType.PanelType2, "Select Panel3Type", "Select Panel2Type"), _
IIf(Me.HostControl.PanelType = enumPanelType.PanelType2, "Select Panel3Type", "Select Panel2Type"), _
True))
Return items
End Function

Private Sub SelectPanel2Type()
TypeDescriptor.GetProperties(HostControl)("PanelType").SetValue(MyBase.Component, enumPanelType.PanelType2)
Me._DesignerActionUIService.Refresh(HostControl)
End Sub

Private Sub SelectPanel3Type()
TypeDescriptor.GetProperties(HostControl)("PanelType").SetValue(MyBase.Component, enumPanelType.PanelType3)
Me._DesignerActionUIService.Refresh(HostControl)
End Sub
End Class

-- modified 19-Dec-17 12:14pm.
QuestionUsing visual basic code with telnet.exe/cmd.exe Pin
Member 1358117317-Dec-17 8:16
Member 1358117317-Dec-17 8:16 
AnswerRe: Using visual basic code with telnet.exe/cmd.exe Pin
Richard MacCutchan17-Dec-17 21:26
mveRichard MacCutchan17-Dec-17 21:26 
GeneralRe: Using visual basic code with telnet.exe/cmd.exe Pin
Member 1358117318-Dec-17 3:26
Member 1358117318-Dec-17 3:26 
GeneralRe: Using visual basic code with telnet.exe/cmd.exe Pin
Richard MacCutchan18-Dec-17 4:36
mveRichard MacCutchan18-Dec-17 4:36 
GeneralRe: Using visual basic code with telnet.exe/cmd.exe Pin
Member 1358117318-Dec-17 5:34
Member 1358117318-Dec-17 5:34 
GeneralRe: Using visual basic code with telnet.exe/cmd.exe Pin
Dave Kreskowiak18-Dec-17 5:50
mveDave Kreskowiak18-Dec-17 5:50 
GeneralRe: Using visual basic code with telnet.exe/cmd.exe Pin
Member 1358117318-Dec-17 7:31
Member 1358117318-Dec-17 7:31 
GeneralRe: Using visual basic code with telnet.exe/cmd.exe Pin
Dave Kreskowiak18-Dec-17 8:07
mveDave Kreskowiak18-Dec-17 8:07 
GeneralRe: Using visual basic code with telnet.exe/cmd.exe Pin
Eddy Vluggen18-Dec-17 15:31
professionalEddy Vluggen18-Dec-17 15:31 
QuestionHow to do syntactic analysis on words Pin
Onuche Abraham DaCatalyst16-Dec-17 18:38
Onuche Abraham DaCatalyst16-Dec-17 18:38 
SuggestionRe: How to do syntactic analysis on words Pin
Richard MacCutchan16-Dec-17 21:02
mveRichard MacCutchan16-Dec-17 21:02 
QuestionHow to refresh design area Pin
mo149211-Dec-17 1:08
mo149211-Dec-17 1:08 
AnswerRe: How to refresh design area Pin
Dave Kreskowiak13-Dec-17 2:17
mveDave Kreskowiak13-Dec-17 2:17 
SuggestionRe: How to refresh design area Pin
Ralf Meier14-Dec-17 0:50
mveRalf Meier14-Dec-17 0:50 
GeneralRe: How to refresh design area Pin
mo149214-Dec-17 3:35
mo149214-Dec-17 3:35 
GeneralRe: How to refresh design area Pin
Ralf Meier14-Dec-17 23:17
mveRalf Meier14-Dec-17 23:17 
GeneralRe: How to refresh design area Pin
mo149215-Dec-17 6:59
mo149215-Dec-17 6:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.