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

Visual Basic

 
GeneralRe: Need help with date to date calculation of a total of different rows Pin
A_Griffin9-Jan-18 5:42
A_Griffin9-Jan-18 5:42 
GeneralRe: Need help with date to date calculation of a total of different rows Pin
Maciej Los9-Jan-18 6:47
mveMaciej Los9-Jan-18 6:47 
GeneralRe: Need help with date to date calculation of a total of different rows Pin
A_Griffin8-Jan-18 23:28
A_Griffin8-Jan-18 23:28 
QuestionBy Excel VBA how we can act on web page components (eg. buttons) of new FireFox releases (48+)? Pin
Member 136092555-Jan-18 16:32
Member 136092555-Jan-18 16:32 
AnswerRe: By Excel VBA how we can act on web page components (eg. buttons) of new FireFox releases (48+)? Pin
Maciej Los8-Jan-18 7:10
mveMaciej Los8-Jan-18 7:10 
Questionlistview groupstate Pin
JR2124-Jan-18 3:05
JR2124-Jan-18 3:05 
AnswerRe: listview groupstate Pin
JR2128-Jan-18 2:55
JR2128-Jan-18 2:55 
AnswerRe: listview groupstate Pin
phil.o8-Jan-18 11:24
professionalphil.o8-Jan-18 11:24 
SendMessage(IntPtr hWnd, int msg, int wParam, int lParam), when msg = LVM_GETGROUPSTATE wil return a bit flag value expressing the group state of the group whose id = wParam. lParam contains a bit flag value expressing which group states are allowed.
So, first is to get something useful for these bit flag values. This enum can help:
VB
<Flags()> _
Public Enum GroupState

   ''' <summary>
   ''' The group is in normal state.
   ''' </summary>
   LVGS_NORMAL = 0

   ''' <summary>
   ''' The group is collapsed.
   ''' </summary>
   LVGS_COLLAPSED = 1

   ''' <summary>
   ''' The group is hidden.
   ''' </summary>
   LVGS_HIDDEN = 2

   ''' <summary>
   ''' The group has no header.
   ''' </summary>
   LVGS_NOHEADER = 4

   ''' <summary>
   ''' The group can be collapsed.
   ''' </summary>
   LVGS_COLLAPSIBLE = 8

   ''' <summary>
   ''' The group has focus.
   ''' </summary>
   LVGS_FOCUSED = 16

   ''' <summary>
   ''' The group is selected.
   ''' </summary>
   LVGS_SELECTED = 32
   ''' <summary>
   ''' The group is subsetted.
   ''' </summary>
   LVGS_SUBSETED = 64

   ''' <summary>
   ''' The subset link has focus.
   ''' </summary>
   LVGS_SUBSETLINKFOCUSED = 128

   ''' <summary>
   ''' All states.
   ''' </summary>
   LVGS_ALL = 65535

End Enum

(source: ObjectListView[^])
So, here are the points you could try:
- use GrpId.Value. This makes a big difference. If GetGroupId returns null, there is no point calling SendMessage.
- make stateMask a GroupState value, not a simple integer value, and give it a meaningful masking value (GroupState.LVGS_ALL for example).
- interpret the return value of SendMessage as a GroupState value.
In short:
VB
Dim stateMask As GroupState = GroupState.LVGS_ALL
Dim GrpId As System.Nullable(Of Integer) = GetGroupID(Me.Groups(groep)
Dim result As GroupState
If (GrpId.HasValue)
   result = (GroupState)SendMessage(Handle, LVM_GETGROUPSTATE, GrpId.Value, (int)stateMask)
End If

"I'm neither for nor against, on the contrary." John Middle

GeneralRe: listview groupstate Pin
JR2128-Jan-18 21:27
JR2128-Jan-18 21:27 
GeneralRe: listview groupstate Pin
phil.o9-Jan-18 3:09
professionalphil.o9-Jan-18 3:09 
QuestionOrganization Chart in vb 6 Pin
Ayat Setiawan26-Dec-17 21:45
Ayat Setiawan26-Dec-17 21:45 
AnswerRe: Organization Chart in vb 6 Pin
Richard MacCutchan26-Dec-17 22:38
mveRichard MacCutchan26-Dec-17 22:38 
AnswerRe: Organization Chart in vb 6 Pin
Dave Kreskowiak27-Dec-17 4:43
mveDave Kreskowiak27-Dec-17 4:43 
QuestionOrganization Chart in vb 6 Pin
Ayat Setiawan26-Dec-17 21:45
Ayat Setiawan26-Dec-17 21:45 
Questionconnection string Pin
Member 1359500326-Dec-17 11:10
Member 1359500326-Dec-17 11:10 
AnswerRe: connection string Pin
Dave Kreskowiak26-Dec-17 18:24
mveDave Kreskowiak26-Dec-17 18:24 
AnswerRe: connection string Pin
Eddy Vluggen26-Dec-17 21:30
professionalEddy Vluggen26-Dec-17 21:30 
Questionhow to rectify class not support error in vb6 at win 7 Pin
Afarook Abdul Majeed22-Dec-17 17:32
Afarook Abdul Majeed22-Dec-17 17:32 
AnswerRe: how to rectify class not support error in vb6 at win 7 Pin
Peter_in_278022-Dec-17 19:06
professionalPeter_in_278022-Dec-17 19:06 
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 

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.