Click here to Skip to main content
15,897,518 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionListView: How to link columnheader into subitem Pin
jtpaa2-Feb-10 23:44
jtpaa2-Feb-10 23:44 
AnswerRe: ListView: How to link columnheader into subitem Pin
DaveAuld3-Feb-10 0:41
professionalDaveAuld3-Feb-10 0:41 
AnswerRe: ListView: How to link columnheader into subitem Pin
DaveAuld3-Feb-10 1:06
professionalDaveAuld3-Feb-10 1:06 
GeneralRe: ListView: How to link columnheader into subitem Pin
jtpaa3-Feb-10 1:29
jtpaa3-Feb-10 1:29 
AnswerRe: ListView: How to link columnheader into subitem Pin
DaveAuld3-Feb-10 2:31
professionalDaveAuld3-Feb-10 2:31 
GeneralRe: ListView: How to link columnheader into subitem Pin
jtpaa3-Feb-10 2:54
jtpaa3-Feb-10 2:54 
GeneralRe: ListView: How to link columnheader into subitem Pin
DaveAuld3-Feb-10 3:00
professionalDaveAuld3-Feb-10 3:00 
GeneralRe: ListView: How to link columnheader into subitem Pin
JR2124-Feb-10 1:00
JR2124-Feb-10 1:00 
Maybe if you block some columns to resize.

This is my code to block them standard all with property to release some

Imports System.Runtime.InteropServices
Namespace Controls
  Public Class ListView_FixColumns
    Inherits ListView
    Private _KolommenVrij(1024) As Boolean

    Public Const WM_NOTIFY As Integer = &H4E
    Public Const HDN_FIRST As Integer = 0 - 300
    Public Const HDN_BEGINTRACKA As Integer = HDN_FIRST - 6
    Public Const HDN_BEGINTRACKW As Integer = HDN_FIRST - 26
    <StructLayout(LayoutKind.Sequential)> Public Structure NMHDR
      Public hwndFrom As IntPtr
      Public idFrom As Integer
      Public code As Integer
    End Structure

    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
      If m.Msg = WM_NOTIFY Then
        Dim hdr As NMHDR = CType(m.GetLParam(GetType(NMHDR)), NMHDR)
        If hdr.code = HDN_BEGINTRACKA OrElse hdr.code = HDN_BEGINTRACKW OrElse hdr.code = HDN_DIVIDERDBLCLICKW Then
          Dim nmHeader As NMHEADER = CType(m.GetLParam(GetType(NMHEADER)), NMHEADER)
          If Not _FreeColumns(nmHeader.iItem) Then
            m.Result = New IntPtr(1)
            Exit Sub
          End If
        End If
      End If
      MyBase.WndProc(m)
    End Sub  
    Public Property AllowColumnResize(ByVal Column As Integer) As Boolean
      Get
        Return _KolommenVrij(Column)
      End Get
      Set(ByVal value As Boolean)
        _KolommenVrij(Column) = value
      End Set
    End Property
  End Class
End Namespace


If you add a property to select witch columns may not be blocked it will do
QuestionVB SendKeys -Done- Pin
εїзεїзεїз2-Feb-10 23:18
εїзεїзεїз2-Feb-10 23:18 
AnswerRe: VB SendKeys Pin
DaveAuld3-Feb-10 0:35
professionalDaveAuld3-Feb-10 0:35 
GeneralRe: VB SendKeys Pin
εїзεїзεїз3-Feb-10 1:07
εїзεїзεїз3-Feb-10 1:07 
GeneralRe: VB SendKeys Pin
DaveAuld3-Feb-10 1:23
professionalDaveAuld3-Feb-10 1:23 
AnswerRe: VB SendKeys Pin
Luc Pattyn3-Feb-10 1:57
sitebuilderLuc Pattyn3-Feb-10 1:57 
AnswerRe: VB SendKeys Pin
Anubhava Dimri3-Feb-10 18:31
Anubhava Dimri3-Feb-10 18:31 
QuestionWindows 7 registry error Pin
Gagan.202-Feb-10 22:16
Gagan.202-Feb-10 22:16 
AnswerRe: Windows 7 registry error Pin
Dave Kreskowiak3-Feb-10 2:06
mveDave Kreskowiak3-Feb-10 2:06 
QuestionAutomation error - issue with word Pin
Bad Programmer2-Feb-10 10:12
Bad Programmer2-Feb-10 10:12 
AnswerRe: Automation error - issue with word Pin
David Mujica2-Feb-10 10:22
David Mujica2-Feb-10 10:22 
AnswerRe: Automation error - issue with word Pin
Dave Kreskowiak2-Feb-10 10:54
mveDave Kreskowiak2-Feb-10 10:54 
AnswerRe: Automation error - issue with word Pin
koolprasad20033-Feb-10 18:18
professionalkoolprasad20033-Feb-10 18:18 
GeneralBluetooth Programming... Pin
Jamal Abdul Nasir2-Feb-10 7:42
Jamal Abdul Nasir2-Feb-10 7:42 
GeneralRe: Bluetooth Programming... Pin
Richard MacCutchan2-Feb-10 8:42
mveRichard MacCutchan2-Feb-10 8:42 
QuestionWindows logon password reminder Pin
John Deeran2-Feb-10 7:37
John Deeran2-Feb-10 7:37 
AnswerRe: Windows logon password reminder Pin
DaveAuld2-Feb-10 7:43
professionalDaveAuld2-Feb-10 7:43 
GeneralRe: Windows logon password reminder Pin
John Deeran2-Feb-10 7:48
John Deeran2-Feb-10 7:48 

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.