Situation :
FormX is mdi child form containing 2 ListViews
ListView1 contains a list of table names and 4 sub items with data about
each table.
ListView2 contains a list of the columns on each table and 11 sub items with
data about each column.
When a Row in ListView1 is selected the Data in ListVies2 is loaded to show
the correct data. Initially the first row in ListView1 is selected in FormX
load
..
However when using ListView2.Items.Clear() before loading a new set of data
or blank data awaiting entries the previous data is not cleared and the new
data is not loaded. I know the change is taking place because the row back
colour changes are taking place correctly.(No data means matching row
colours, data present means alternating row back colours)
Any thoughts anyone????
Bob 21 5161
Hi,
post some code
Ken
----------------
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Situation :
FormX is mdi child form containing 2 ListViews
ListView1 contains a list of table names and 4 sub items with data about
each table.
ListView2 contains a list of the columns on each table and 11 sub items with
data about each column.
When a Row in ListView1 is selected the Data in ListVies2 is loaded to show
the correct data. Initially the first row in ListView1 is selected in FormX
load
..
However when using ListView2.Items.Clear() before loading a new set of data
or blank data awaiting entries the previous data is not cleared and the new
data is not loaded. I know the change is taking place because the row back
colour changes are taking place correctly.(No data means matching row
colours, data present means alternating row back colours)
Any thoughts anyone????
Bob
REFERENCE Request for code by Ken :
The following is a slightly reduced copy of the code in use, There are more SubItems and in number more tables and columns.
However assuming I have reconstructed the example without typos this is the key code and method in use.
There is an assumption that an Array(layer, Row, Column) exists where layer 0 column 1 contains the table names and layer 0 columns 1 to 10 contain the column names. The table data is in layers 1 > n under column 0 while the column data is under the column name in layers 1 to n.
Private Sub ItemT0 As New ListViewItem("1", 0)
~
PrivateSub ItemT49 As New ListViewItem("50", 49)
Private Sub ItemC0 As New ListViewItem("1", 0)
~
Private Sub ItemC9 As New ListViewItem("10", 9)
WINDOWS FORM DESIGNER GENERATED CODE
Private Sub Form1_Load (etc)
LoadListViewItemsArray()
ListViewTables.Items.Clear()
ShowTablesInListView()
ListViewTables.Items(tblPosn).Selected = True
ListViewColumns.Items.Clear()
ShowColumnsInListView()
End Sub
Private Sub LoadListViewItemsArray()
ItemsT(0) = ItemsT0
~
ItemsT(49) = ItemsT49
ItemsC(0) = ItemsC0
~
ItemsC(9) = ItemsC9
End Sub
Private Sub ShowTablesInListView()
Dim h, i, As Integer
Dim str, str1, str2, str3 As String
ListViewTables.BeginUpdate()
For h = 0 to 49
str = Array(0, h, 0)
If str <> "No Entry" Then
str1 = Array(1, h, 0)
str2 = Array(2, h, 0)
str3 = Array(3, h, 0)
If str1 = "No Entry" Then str1 = ""
If str2 = "No Entry" Then str2 = ""
If str3 = "No Entry" Then str2 = ""
ItemsT(h).SubItems.Add(str1)
ItemsT(h).SubItems.Add(str2)
ItemsT(h).SubItems.Add(str3)
ListViewTables.Items.Add(ItemsT(h))
If h Mod 2 = 0 Then
ItemsT(h).BackColor = Color.FloralWhite
Else
ItemsT(h).BackColor = Color.Moccasin
End If
ElseIf str = "No Entry" Then
ItemsT(h).SubItems.Add("")
ItemsT(h).SubItems.Add("")
ItemsT(h).SubItems.Add("")
ListViewTables.Items.Add(ItemsT(h))
ItemsT(h).BackColor = Color.Moccasin
End If
Next
ListViewTables.EndUpdate()
End Sub
Private Sub ListViewTables_KeyDown(etc)
If e.KeyCode = KeysDown Then
If tblPosn < 49 Then
ListViewTables.Items(tblPosn).Selected = False
tblPosn = tblPosn + 1
ListViewTables.Items(tblPosn).Selected = True
ListViewColumns.Items.Clear()
ShowColumnsInListView()
End If
ElseIf e.KeyCode = Keys.Up Then
If tblPosn > 0 Then
ListViewTables.Items(tblPosn).Selected = False
tblPosn = tblPosn - 1
ListViewTables.Items(tblPosn).Selected = True
ListViewColumns.Items.Clear()
ShowColumnsInListView()
End If
End If
End Sub
Private Sub ShowColumnsInListView()
Dim h, i, As Integer
Dim str, str1, str2, str3 As String
ListViewColumns.BeginUpdate()
For i = 1 to 10
str = Array(0, tblPosn, i)
If str <> "No Entry" Then
str1 = Array(1, tblPosn, i)
str2 = Array(2, tblPosn, i)
str3 = Array(3, tblPosn, 1)
If str1 = "No Entry" Then str1 = ""
If str2 = "No Entry" Then str2 = ""
If str3 = "No Entry" Then str2 = ""
ItemsC(i).SubItems.Add(str1)
ItemsC(i).SubItems.Add(str2)
ItemsC(i).SubItems.Add(str3)
ListViewColumns.Items.Add(ItemsC(i))
If i Mod 2 = 0 Then
ItemsC(i).BackColor = Color.FloralWhite
Else
ItemsC(i).BackColor = Color.Moccasin
End If
ElseIf str = "No Entry" Then
ItemsC(i).SubItems.Add("")
ItemsC(i).SubItems.Add("")
ItemsC(i).SubItems.Add("")
ListViewColumns.Items.Add(ItemsC(i))
ItemsC(i).BackColor = Color.Moccasin
End If
Next
ListViewColumns.EndUpdate()
End Sub
E & O.E
Bob
Bob, I found your code very difficult to setup and test, but I think I got the gist of it.
Looks like you just want to change ListViewColumns when you select something different in ListViewTables. With the added twist that you want ListViewTables first item preselected so that that ListViewColumns starts with some data showing.
Here is a VERY stripped down version. Create a new form and paste this in there and see if it gives you any ideas.
HTH,
Greg
Option Strict On
Public Class Form1
Inherits System.Windows.Forms.Form
Private loading As Boolean
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents ListViewColumns As System.Windows.Forms.ListView
Friend WithEvents ListViewTables As System.Windows.Forms.ListView
Friend WithEvents ColumnHeader12 As System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.ListViewColumns = New System.Windows.Forms.ListView
Me.ColumnHeader12 = New System.Windows.Forms.ColumnHeader
Me.ListViewTables = New System.Windows.Forms.ListView
Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
Me.SuspendLayout()
'
'ListViewColumns
'
Me.ListViewColumns.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader12})
Me.ListViewColumns.Location = New System.Drawing.Point(16, 120)
Me.ListViewColumns.MultiSelect = False
Me.ListViewColumns.Name = "ListViewColumns"
Me.ListViewColumns.Size = New System.Drawing.Size(256, 97)
Me.ListViewColumns.TabIndex = 0
Me.ListViewColumns.View = System.Windows.Forms.View.Details
'
'ColumnHeader12
'
Me.ColumnHeader12.Text = "ColumnName"
Me.ColumnHeader12.Width = 120
'
'ListViewTables
'
Me.ListViewTables.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1})
Me.ListViewTables.Location = New System.Drawing.Point(16, 8)
Me.ListViewTables.MultiSelect = False
Me.ListViewTables.Name = "ListViewTables"
Me.ListViewTables.Size = New System.Drawing.Size(256, 97)
Me.ListViewTables.TabIndex = 1
Me.ListViewTables.View = System.Windows.Forms.View.Details
'
'ColumnHeader1
'
Me.ColumnHeader1.Text = "TableName"
Me.ColumnHeader1.Width = 120
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 266)
Me.Controls.Add(Me.ListViewTables)
Me.Controls.Add(Me.ListViewColumns)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
loading = True
ShowTablesInListView()
ListViewTables.Items(0).Selected = True
ListViewTables.Select() ' this seems to be important
ShowColumnsInListView()
loading = False
End Sub
Private Sub ShowTablesInListView()
Dim h, i As Integer
Dim str, str1, str2, str3 As String
ListViewTables.BeginUpdate()
For h = 0 To 49
Dim lvi As New ListViewItem
lvi.Text = "Table" & h.ToString
If h Mod 2 = 0 Then
lvi.BackColor = Color.FloralWhite
Else
lvi.BackColor = Color.Moccasin
End If
ListViewTables.Items.Add(lvi)
Next
ListViewTables.EndUpdate()
End Sub
Private Sub ShowColumnsInListView()
If ListViewTables.SelectedIndices.Count = 0 Then Return
Dim h, i As Integer
Dim str, str1, str2, str3 As String
Dim tblPosn As Integer = ListViewTables.SelectedItems(0).Index
ListViewColumns.BeginUpdate()
ListViewColumns.Items.Clear()
For i = 1 To 10
Dim lvi As New ListViewItem
lvi.Text = "Table" & tblPosn & "-Column" & i.ToString
If i Mod 2 = 0 Then
lvi.BackColor = Color.FloralWhite
Else
lvi.BackColor = Color.Moccasin
End If
ListViewColumns.Items.Add(lvi)
Next
ListViewColumns.EndUpdate()
End Sub
Private Sub ListViewTables_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListViewTables.SelectedIndexChanged
If loading = True Then Return
ShowColumnsInListView()
End Sub
End Class
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:uM**************@TK2MSFTNGP12.phx.gbl...
REFERENCE Request for code by Ken :
The following is a slightly reduced copy of the code in use, There are more SubItems and in number more tables and columns.
However assuming I have reconstructed the example without typos this is the key code and method in use.
There is an assumption that an Array(layer, Row, Column) exists where layer 0 column 1 contains the table names and layer 0 columns 1 to 10 contain the column names. The table data is in layers 1 > n under column 0 while the column data is under the column name in layers 1 to n.
Private Sub ItemT0 As New ListViewItem("1", 0)
~
PrivateSub ItemT49 As New ListViewItem("50", 49)
Private Sub ItemC0 As New ListViewItem("1", 0)
~
Private Sub ItemC9 As New ListViewItem("10", 9)
WINDOWS FORM DESIGNER GENERATED CODE
Private Sub Form1_Load (etc)
LoadListViewItemsArray()
ListViewTables.Items.Clear()
ShowTablesInListView()
ListViewTables.Items(tblPosn).Selected = True
ListViewColumns.Items.Clear()
ShowColumnsInListView()
End Sub
Private Sub LoadListViewItemsArray()
ItemsT(0) = ItemsT0
~
ItemsT(49) = ItemsT49
ItemsC(0) = ItemsC0
~
ItemsC(9) = ItemsC9
End Sub
Private Sub ShowTablesInListView()
Dim h, i, As Integer
Dim str, str1, str2, str3 As String
ListViewTables.BeginUpdate()
For h = 0 to 49
str = Array(0, h, 0)
If str <> "No Entry" Then
str1 = Array(1, h, 0)
str2 = Array(2, h, 0)
str3 = Array(3, h, 0)
If str1 = "No Entry" Then str1 = ""
If str2 = "No Entry" Then str2 = ""
If str3 = "No Entry" Then str2 = ""
ItemsT(h).SubItems.Add(str1)
ItemsT(h).SubItems.Add(str2)
ItemsT(h).SubItems.Add(str3)
ListViewTables.Items.Add(ItemsT(h))
If h Mod 2 = 0 Then
ItemsT(h).BackColor = Color.FloralWhite
Else
ItemsT(h).BackColor = Color.Moccasin
End If
ElseIf str = "No Entry" Then
ItemsT(h).SubItems.Add("")
ItemsT(h).SubItems.Add("")
ItemsT(h).SubItems.Add("")
ListViewTables.Items.Add(ItemsT(h))
ItemsT(h).BackColor = Color.Moccasin
End If
Next
ListViewTables.EndUpdate()
End Sub
Private Sub ListViewTables_KeyDown(etc)
If e.KeyCode = KeysDown Then
If tblPosn < 49 Then
ListViewTables.Items(tblPosn).Selected = False
tblPosn = tblPosn + 1
ListViewTables.Items(tblPosn).Selected = True
ListViewColumns.Items.Clear()
ShowColumnsInListView()
End If
ElseIf e.KeyCode = Keys.Up Then
If tblPosn > 0 Then
ListViewTables.Items(tblPosn).Selected = False
tblPosn = tblPosn - 1
ListViewTables.Items(tblPosn).Selected = True
ListViewColumns.Items.Clear()
ShowColumnsInListView()
End If
End If
End Sub
Private Sub ShowColumnsInListView()
Dim h, i, As Integer
Dim str, str1, str2, str3 As String
ListViewColumns.BeginUpdate()
For i = 1 to 10
str = Array(0, tblPosn, i)
If str <> "No Entry" Then
str1 = Array(1, tblPosn, i)
str2 = Array(2, tblPosn, i)
str3 = Array(3, tblPosn, 1)
If str1 = "No Entry" Then str1 = ""
If str2 = "No Entry" Then str2 = ""
If str3 = "No Entry" Then str2 = ""
ItemsC(i).SubItems.Add(str1)
ItemsC(i).SubItems.Add(str2)
ItemsC(i).SubItems.Add(str3)
ListViewColumns.Items.Add(ItemsC(i))
If i Mod 2 = 0 Then
ItemsC(i).BackColor = Color.FloralWhite
Else
ItemsC(i).BackColor = Color.Moccasin
End If
ElseIf str = "No Entry" Then
ItemsC(i).SubItems.Add("")
ItemsC(i).SubItems.Add("")
ItemsC(i).SubItems.Add("")
ListViewColumns.Items.Add(ItemsC(i))
ItemsC(i).BackColor = Color.Moccasin
End If
Next
ListViewColumns.EndUpdate()
End Sub
E & O.E
Bob
Thanks Greg, give me a while to examine the concepts shown here, rebuild the main program and see what happens.
Bob
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:eo**************@TK2MSFTNGP11.phx.gbl...
Bob, I found your code very difficult to setup and test, but I think I got the gist of it.
Looks like you just want to change ListViewColumns when you select something different in ListViewTables. With the added twist that you want ListViewTables first item preselected so that that ListViewColumns starts with some data showing.
Here is a VERY stripped down version. Create a new form and paste this in there and see if it gives you any ideas.
HTH,
Greg
Option Strict On
Public Class Form1
Inherits System.Windows.Forms.Form
Private loading As Boolean
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents ListViewColumns As System.Windows.Forms.ListView
Friend WithEvents ListViewTables As System.Windows.Forms.ListView
Friend WithEvents ColumnHeader12 As System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.ListViewColumns = New System.Windows.Forms.ListView
Me.ColumnHeader12 = New System.Windows.Forms.ColumnHeader
Me.ListViewTables = New System.Windows.Forms.ListView
Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
Me.SuspendLayout()
'
'ListViewColumns
'
Me.ListViewColumns.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader12})
Me.ListViewColumns.Location = New System.Drawing.Point(16, 120)
Me.ListViewColumns.MultiSelect = False
Me.ListViewColumns.Name = "ListViewColumns"
Me.ListViewColumns.Size = New System.Drawing.Size(256, 97)
Me.ListViewColumns.TabIndex = 0
Me.ListViewColumns.View = System.Windows.Forms.View.Details
'
'ColumnHeader12
'
Me.ColumnHeader12.Text = "ColumnName"
Me.ColumnHeader12.Width = 120
'
'ListViewTables
'
Me.ListViewTables.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1})
Me.ListViewTables.Location = New System.Drawing.Point(16, 8)
Me.ListViewTables.MultiSelect = False
Me.ListViewTables.Name = "ListViewTables"
Me.ListViewTables.Size = New System.Drawing.Size(256, 97)
Me.ListViewTables.TabIndex = 1
Me.ListViewTables.View = System.Windows.Forms.View.Details
'
'ColumnHeader1
'
Me.ColumnHeader1.Text = "TableName"
Me.ColumnHeader1.Width = 120
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 266)
Me.Controls.Add(Me.ListViewTables)
Me.Controls.Add(Me.ListViewColumns)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
loading = True
ShowTablesInListView()
ListViewTables.Items(0).Selected = True
ListViewTables.Select() ' this seems to be important
ShowColumnsInListView()
loading = False
End Sub
Private Sub ShowTablesInListView()
Dim h, i As Integer
Dim str, str1, str2, str3 As String
ListViewTables.BeginUpdate()
For h = 0 To 49
Dim lvi As New ListViewItem
lvi.Text = "Table" & h.ToString
If h Mod 2 = 0 Then
lvi.BackColor = Color.FloralWhite
Else
lvi.BackColor = Color.Moccasin
End If
ListViewTables.Items.Add(lvi)
Next
ListViewTables.EndUpdate()
End Sub
Private Sub ShowColumnsInListView()
If ListViewTables.SelectedIndices.Count = 0 Then Return
Dim h, i As Integer
Dim str, str1, str2, str3 As String
Dim tblPosn As Integer = ListViewTables.SelectedItems(0).Index
ListViewColumns.BeginUpdate()
ListViewColumns.Items.Clear()
For i = 1 To 10
Dim lvi As New ListViewItem
lvi.Text = "Table" & tblPosn & "-Column" & i.ToString
If i Mod 2 = 0 Then
lvi.BackColor = Color.FloralWhite
Else
lvi.BackColor = Color.Moccasin
End If
ListViewColumns.Items.Add(lvi)
Next
ListViewColumns.EndUpdate()
End Sub
Private Sub ListViewTables_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListViewTables.SelectedIndexChanged
If loading = True Then Return
ShowColumnsInListView()
End Sub
End Class
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:uM**************@TK2MSFTNGP12.phx.gbl...
REFERENCE Request for code by Ken :
The following is a slightly reduced copy of the code in use, There are more SubItems and in number more tables and columns.
However assuming I have reconstructed the example without typos this is the key code and method in use.
There is an assumption that an Array(layer, Row, Column) exists where layer 0 column 1 contains the table names and layer 0 columns 1 to 10 contain the column names. The table data is in layers 1 > n under column 0 while the column data is under the column name in layers 1 to n.
Private Sub ItemT0 As New ListViewItem("1", 0)
~
PrivateSub ItemT49 As New ListViewItem("50", 49)
Private Sub ItemC0 As New ListViewItem("1", 0)
~
Private Sub ItemC9 As New ListViewItem("10", 9)
WINDOWS FORM DESIGNER GENERATED CODE
Private Sub Form1_Load (etc)
LoadListViewItemsArray()
ListViewTables.Items.Clear()
ShowTablesInListView()
ListViewTables.Items(tblPosn).Selected = True
ListViewColumns.Items.Clear()
ShowColumnsInListView()
End Sub
Private Sub LoadListViewItemsArray()
ItemsT(0) = ItemsT0
~
ItemsT(49) = ItemsT49
ItemsC(0) = ItemsC0
~
ItemsC(9) = ItemsC9
End Sub
Private Sub ShowTablesInListView()
Dim h, i, As Integer
Dim str, str1, str2, str3 As String
ListViewTables.BeginUpdate()
For h = 0 to 49
str = Array(0, h, 0)
If str <> "No Entry" Then
str1 = Array(1, h, 0)
str2 = Array(2, h, 0)
str3 = Array(3, h, 0)
If str1 = "No Entry" Then str1 = ""
If str2 = "No Entry" Then str2 = ""
If str3 = "No Entry" Then str2 = ""
ItemsT(h).SubItems.Add(str1)
ItemsT(h).SubItems.Add(str2)
ItemsT(h).SubItems.Add(str3)
ListViewTables.Items.Add(ItemsT(h))
If h Mod 2 = 0 Then
ItemsT(h).BackColor = Color.FloralWhite
Else
ItemsT(h).BackColor = Color.Moccasin
End If
ElseIf str = "No Entry" Then
ItemsT(h).SubItems.Add("")
ItemsT(h).SubItems.Add("")
ItemsT(h).SubItems.Add("")
ListViewTables.Items.Add(ItemsT(h))
ItemsT(h).BackColor = Color.Moccasin
End If
Next
ListViewTables.EndUpdate()
End Sub
Private Sub ListViewTables_KeyDown(etc)
If e.KeyCode = KeysDown Then
If tblPosn < 49 Then
ListViewTables.Items(tblPosn).Selected = False
tblPosn = tblPosn + 1
ListViewTables.Items(tblPosn).Selected = True
ListViewColumns.Items.Clear()
ShowColumnsInListView()
End If
ElseIf e.KeyCode = Keys.Up Then
If tblPosn > 0 Then
ListViewTables.Items(tblPosn).Selected = False
tblPosn = tblPosn - 1
ListViewTables.Items(tblPosn).Selected = True
ListViewColumns.Items.Clear()
ShowColumnsInListView()
End If
End If
End Sub
Private Sub ShowColumnsInListView()
Dim h, i, As Integer
Dim str, str1, str2, str3 As String
ListViewColumns.BeginUpdate()
For i = 1 to 10
str = Array(0, tblPosn, i)
If str <> "No Entry" Then
str1 = Array(1, tblPosn, i)
str2 = Array(2, tblPosn, i)
str3 = Array(3, tblPosn, 1)
If str1 = "No Entry" Then str1 = ""
If str2 = "No Entry" Then str2 = ""
If str3 = "No Entry" Then str2 = ""
ItemsC(i).SubItems.Add(str1)
ItemsC(i).SubItems.Add(str2)
ItemsC(i).SubItems.Add(str3)
ListViewColumns.Items.Add(ItemsC(i))
If i Mod 2 = 0 Then
ItemsC(i).BackColor = Color.FloralWhite
Else
ItemsC(i).BackColor = Color.Moccasin
End If
ElseIf str = "No Entry" Then
ItemsC(i).SubItems.Add("")
ItemsC(i).SubItems.Add("")
ItemsC(i).SubItems.Add("")
ListViewColumns.Items.Add(ItemsC(i))
ItemsC(i).BackColor = Color.Moccasin
End If
Next
ListViewColumns.EndUpdate()
End Sub
E & O.E
Bob
Greg, I've copied and pasted your code and it does not work either. Is it possible I've got a computer problem or missed an update?
If you put the columns ListView to the right of the tables ListView and stretch them both down so that you can see to about table 30 and click on the tables mostly nothing happens. At random tables numbered above No 9 seem to change the columns ListView, mostly nothing happens and the highlighted table ceases to be highlighted.
Bob
Option Strict On
Public Class Form1
Inherits System.Windows.Forms.Form
Private loading As Boolean
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents ListViewColumns As System.Windows.Forms.ListView
Friend WithEvents ListViewTables As System.Windows.Forms.ListView
Friend WithEvents ColumnHeader12 As System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.ListViewColumns = New System.Windows.Forms.ListView
Me.ColumnHeader12 = New System.Windows.Forms.ColumnHeader
Me.ListViewTables = New System.Windows.Forms.ListView
Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
Me.SuspendLayout()
'
'ListViewColumns
'
Me.ListViewColumns.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader12})
Me.ListViewColumns.Location = New System.Drawing.Point(16, 120)
Me.ListViewColumns.MultiSelect = False
Me.ListViewColumns.Name = "ListViewColumns"
Me.ListViewColumns.Size = New System.Drawing.Size(256, 97)
Me.ListViewColumns.TabIndex = 0
Me.ListViewColumns.View = System.Windows.Forms.View.Details
'
'ColumnHeader12
'
Me.ColumnHeader12.Text = "ColumnName"
Me.ColumnHeader12.Width = 120
'
'ListViewTables
'
Me.ListViewTables.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1})
Me.ListViewTables.Location = New System.Drawing.Point(16, 8)
Me.ListViewTables.MultiSelect = False
Me.ListViewTables.Name = "ListViewTables"
Me.ListViewTables.Size = New System.Drawing.Size(256, 97)
Me.ListViewTables.TabIndex = 1
Me.ListViewTables.View = System.Windows.Forms.View.Details
'
'ColumnHeader1
'
Me.ColumnHeader1.Text = "TableName"
Me.ColumnHeader1.Width = 120
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 266)
Me.Controls.Add(Me.ListViewTables)
Me.Controls.Add(Me.ListViewColumns)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
loading = True
ShowTablesInListView()
ListViewTables.Items(0).Selected = True
ListViewTables.Select() ' this seems to be important
ShowColumnsInListView()
loading = False
End Sub
Private Sub ShowTablesInListView()
Dim h, i As Integer
Dim str, str1, str2, str3 As String
ListViewTables.BeginUpdate()
For h = 0 To 49
Dim lvi As New ListViewItem
lvi.Text = "Table" & h.ToString
If h Mod 2 = 0 Then
lvi.BackColor = Color.FloralWhite
Else
lvi.BackColor = Color.Moccasin
End If
ListViewTables.Items.Add(lvi)
Next
ListViewTables.EndUpdate()
End Sub
Private Sub ShowColumnsInListView()
If ListViewTables.SelectedIndices.Count = 0 Then Return
Dim h, i As Integer
Dim str, str1, str2, str3 As String
Dim tblPosn As Integer = ListViewTables.SelectedItems(0).Index
ListViewColumns.BeginUpdate()
ListViewColumns.Items.Clear()
For i = 1 To 10
Dim lvi As New ListViewItem
lvi.Text = "Table" & tblPosn & "-Column" & i.ToString
If i Mod 2 = 0 Then
lvi.BackColor = Color.FloralWhite
Else
lvi.BackColor = Color.Moccasin
End If
ListViewColumns.Items.Add(lvi)
Next
ListViewColumns.EndUpdate()
End Sub
Private Sub ListViewTables_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListViewTables.SelectedIndexChanged
If loading = True Then Return
ShowColumnsInListView()
End Sub
End Class
Greg, I do not understand exactly why but after trying to incorporate your ideas with mine the following code seems to work.
It does include a small array sample. I hope that this code will be more understandable. Appologies for that.
Bob
PS I love your colour co-ordinated page here. If you ever get a spare month you can tell this dim wit how you do that !
Option Strict On
Public Class Form1
Inherits System.Windows.Forms.Form
Private loading As Boolean
Private Array(2, 19, 10) As String
Private tblPosn As Integer = 0
Private colPosn As Integer = 1
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents ListViewColumns As System.Windows.Forms.ListView
Friend WithEvents ListViewTables As System.Windows.Forms.ListView
Friend WithEvents ColumnNo As System.Windows.Forms.ColumnHeader
Friend WithEvents TableNo As System.Windows.Forms.ColumnHeader
Friend WithEvents TableName As System.Windows.Forms.ColumnHeader
Friend WithEvents TableType As System.Windows.Forms.ColumnHeader
Friend WithEvents TableCharNo As System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnType As System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnName As System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnCharNo As System.Windows.Forms.ColumnHeader
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.ListViewColumns = New System.Windows.Forms.ListView
Me.ColumnNo = New System.Windows.Forms.ColumnHeader
Me.ListViewTables = New System.Windows.Forms.ListView
Me.TableNo = New System.Windows.Forms.ColumnHeader
Me.TableName = New System.Windows.Forms.ColumnHeader
Me.TableType = New System.Windows.Forms.ColumnHeader
Me.TableCharNo = New System.Windows.Forms.ColumnHeader
Me.ColumnType = New System.Windows.Forms.ColumnHeader
Me.ColumnName = New System.Windows.Forms.ColumnHeader
Me.ColumnCharNo = New System.Windows.Forms.ColumnHeader
Me.SuspendLayout()
'
'ListViewColumns
'
Me.ListViewColumns.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnNo, Me.ColumnName, Me.ColumnType, Me.ColumnCharNo})
Me.ListViewColumns.FullRowSelect = True
Me.ListViewColumns.GridLines = True
Me.ListViewColumns.Location = New System.Drawing.Point(444, 8)
Me.ListViewColumns.MultiSelect = False
Me.ListViewColumns.Name = "ListViewColumns"
Me.ListViewColumns.Size = New System.Drawing.Size(396, 304)
Me.ListViewColumns.TabIndex = 0
Me.ListViewColumns.View = System.Windows.Forms.View.Details
'
'ColumnNo
'
Me.ColumnNo.Text = "No"
Me.ColumnNo.Width = 30
'
'ListViewTables
'
Me.ListViewTables.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.TableNo, Me.TableName, Me.TableType, Me.TableCharNo})
Me.ListViewTables.FullRowSelect = True
Me.ListViewTables.GridLines = True
Me.ListViewTables.Location = New System.Drawing.Point(16, 8)
Me.ListViewTables.MultiSelect = False
Me.ListViewTables.Name = "ListViewTables"
Me.ListViewTables.Size = New System.Drawing.Size(394, 304)
Me.ListViewTables.TabIndex = 1
Me.ListViewTables.View = System.Windows.Forms.View.Details
'
'TableNo
'
Me.TableNo.Text = "No"
Me.TableNo.Width = 30
'
'TableName
'
Me.TableName.Text = "Table"
Me.TableName.Width = 120
'
'TableType
'
Me.TableType.Text = "Type"
Me.TableType.Width = 120
'
'TableCharNo
'
Me.TableCharNo.Text = "Character No."
Me.TableCharNo.Width = 120
'
'ColumnType
'
Me.ColumnType.Text = "Type"
Me.ColumnType.Width = 120
'
'ColumnName
'
Me.ColumnName.Text = "Column"
Me.ColumnName.Width = 120
'
'ColumnCharNo
'
Me.ColumnCharNo.Text = "Character No"
Me.ColumnCharNo.Width = 120
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(856, 325)
Me.Controls.Add(Me.ListViewTables)
Me.Controls.Add(Me.ListViewColumns)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim g, h, i As Integer
OtherInitialize()
For g = 0 To 2
For h = 0 To 19
For i = 0 To 10
Array(g, h, i) = "No Entry"
Next
Next
Next
Array(0, 0, 0) = "TableA"
Array(0, 1, 0) = "TableB"
Array(0, 2, 0) = "TableC"
Array(0, 3, 0) = "TableD"
Array(0, 4, 0) = "TableE"
Array(0, 5, 0) = "TableF"
Array(0, 6, 0) = "TableG"
Array(0, 7, 0) = "TableH"
Array(0, 8, 0) = "TableI"
Array(0, 9, 0) = "TableJ"
Array(0, 0, 1) = "TableA, Column1"
Array(0, 0, 2) = "TableA, Column2"
Array(0, 0, 3) = "TableA, Column3"
Array(0, 0, 4) = "TableA, Column4"
Array(0, 1, 1) = "TableB, Column1"
Array(0, 1, 2) = "TableB, Column2"
Array(0, 1, 3) = "TableB, Column3"
Array(0, 1, 4) = "TableB, Column4"
Array(0, 1, 5) = "TableB, Column5"
Array(0, 1, 6) = "TableB, Column6"
Array(0, 3, 1) = "TableD, Column1"
Array(0, 3, 2) = "TableD, Column2"
Array(0, 3, 3) = "TableD, Column3"
Array(1, 0, 0) = "TableType = W"
Array(1, 1, 0) = "TableType = W"
Array(1, 2, 0) = "TableType = W"
Array(1, 3, 0) = "TableType = X"
Array(1, 4, 0) = "TableType = X"
Array(1, 5, 0) = "TableType = Y"
Array(1, 6, 0) = "TableType = Y"
Array(1, 7, 0) = "TableType = Y"
Array(1, 8, 0) = "TableType = Z"
Array(1, 9, 0) = "TableType = Z"
Array(1, 0, 1) = "ColumnType = AA"
Array(1, 0, 2) = "ColumnType = AA"
Array(1, 0, 3) = "ColumnType = BB"
Array(1, 0, 4) = "ColumnType = BB"
Array(1, 1, 1) = "ColumnType = AA"
Array(1, 1, 2) = "ColumnType = AA"
Array(1, 1, 3) = "ColumnType = BB"
Array(1, 1, 4) = "ColumnType = BB"
Array(1, 1, 5) = "ColumnType = CC"
Array(1, 1, 6) = "ColumnType = CC"
Array(1, 3, 1) = "ColumnType = AA"
Array(1, 3, 2) = "ColumnType = BB"
Array(1, 3, 3) = "ColumnType = CC"
Array(2, 0, 0) = "TDataLength = 25"
Array(2, 1, 0) = "TDataLength = 25"
Array(2, 2, 0) = "TDataLength = 30"
Array(2, 3, 0) = "TDataLength = 30"
Array(2, 4, 0) = "TDataLength = 256"
Array(2, 5, 0) = "TDataLength = 256"
Array(2, 6, 0) = "TDataLength = 512"
Array(2, 7, 0) = "TDataLength = 512"
Array(2, 8, 0) = "TDataLength = 1024"
Array(2, 9, 0) = "TDataLength = 1024"
Array(2, 0, 1) = "CDataLength = 25"
Array(2, 0, 2) = "CDataLength = 25"
Array(2, 0, 3) = "CDataLength = 30"
Array(2, 0, 4) = "CDataLength = 30"
Array(2, 1, 1) = "CDataLength = 25"
Array(2, 1, 2) = "CDataLength = 25"
Array(2, 1, 3) = "CDataLength = 30"
Array(2, 1, 4) = "CDataLength = 30"
Array(2, 1, 5) = "CDataLength = 256"
Array(2, 1, 6) = "CDataLength = 256"
Array(2, 3, 1) = "CDataLength = 25"
Array(2, 3, 2) = "CDataLength = 30"
Array(2, 3, 3) = "CDataLength = 256"
End Sub
Private Sub StartForm1()
loading = True
ShowTablesInListView()
ListViewTables.Items(0).Selected = True
ListViewTables.Select() ' this seems to be important
ShowColumnsInListView()
loading = False
End Sub
Private Sub ShowTablesInListView()
Dim h, i As Integer
Dim str1, str2, str3 As String
ListViewTables.BeginUpdate()
ListViewTables.Items.Clear()
For h = 0 To 19
Dim lvi As New ListViewItem
lvi.Text = h.ToString
str1 = Array(0, h, 0)
If str1 = "No Entry" Then str1 = ""
str2 = Array(1, h, 0)
If str2 = "No Entry" Then str2 = ""
str3 = Array(2, h, 0)
If str3 = "No Entry" Then str3 = ""
lvi.SubItems.Add(str1)
lvi.SubItems.Add(str2)
lvi.SubItems.Add(str3)
ListViewTables.Items.Add(lvi)
If str1 <> "" Then
If h Mod 2 = 0 Then
lvi.BackColor = Color.FloralWhite
Else
lvi.BackColor = Color.Moccasin
End If
ElseIf str1 = "" Then
lvi.BackColor = System.Drawing.SystemColors.Window
End If
Next
ListViewTables.EndUpdate()
End Sub
Private Sub ShowColumnsInListView()
Dim h, i As Integer
Dim str1, str2, str3 As String
If ListViewTables.SelectedIndices.Count = 0 Then Return
Dim tblPosn As Integer = ListViewTables.SelectedItems(0).Index
ListViewColumns.BeginUpdate()
ListViewColumns.Items.Clear()
For i = 1 To 10
Dim lvi As New ListViewItem
lvi.Text = i.ToString
str1 = Array(0, tblPosn, i)
If str1 = "No Entry" Then str1 = ""
str2 = Array(1, tblPosn, i)
If str2 = "No Entry" Then str2 = ""
str3 = Array(2, tblPosn, i)
If str3 = "No Entry" Then str3 = ""
lvi.SubItems.Add(str1)
lvi.SubItems.Add(str2)
lvi.SubItems.Add(str3)
If str1 <> "" Then
If i Mod 2 = 0 Then
lvi.BackColor = Color.FloralWhite
Else
lvi.BackColor = Color.Moccasin
End If
ElseIf str1 = "" Then
lvi.BackColor = System.Drawing.SystemColors.Window
End If
ListViewColumns.Items.Add(lvi)
Next
ListViewColumns.EndUpdate()
End Sub
Private Sub ListViewTables_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListViewTables.SelectedIndexChanged
If loading = True Then Return
ShowColumnsInListView()
End Sub
Private Sub ListViewTables_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ListViewTables.KeyDown
If e.KeyCode = Keys.Down Then
If tblPosn < 19 Then
ListViewTables.Items(tblPosn).Selected = False
tblPosn = tblPosn + 1
ListViewTables.Items(tblPosn).Selected = True
ShowColumnsInListView()
End If
ElseIf e.KeyCode = Keys.Up Then
If tblPosn > 0 Then
ListViewTables.Items(tblPosn).Selected = False
tblPosn = tblPosn - 1
ListViewTables.Items(tblPosn).Selected = True
ShowColumnsInListView()
End If
End If
End Sub
#Region " ON CLOSE FORM OR PROGRAM "
Private Sub OtherInitialize()
AddHandler Me.Closing, AddressOf Me.Form1_Cancel
End Sub
Protected Sub Form1_Cancel(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
e.Cancel = False
End Sub
Protected Overrides Sub OnVisibleChanged(ByVal e As System.EventArgs)
If Me.Visible = True Then
StartForm1()
End If
End Sub
#End Region
End Class
Strange. I directly pasted this code into a brand new form, then arranged the listviews side by side and enlarged. I am not seeing anything strange on my machine. I assume you are using VS.NET 2003?
Greg
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:ur**************@TK2MSFTNGP12.phx.gbl...
Greg, I've copied and pasted your code and it does not work either. Is it possible I've got a computer problem or missed an update?
If you put the columns ListView to the right of the tables ListView and stretch them both down so that you can see to about table 30 and click on the tables mostly nothing happens. At random tables numbered above No 9 seem to change the columns ListView, mostly nothing happens and the highlighted table ceases to be highlighted.
Bob
Option Strict On
Public Class Form1
Inherits System.Windows.Forms.Form
Private loading As Boolean
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents ListViewColumns As System.Windows.Forms.ListView
Friend WithEvents ListViewTables As System.Windows.Forms.ListView
Friend WithEvents ColumnHeader12 As System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.ListViewColumns = New System.Windows.Forms.ListView
Me.ColumnHeader12 = New System.Windows.Forms.ColumnHeader
Me.ListViewTables = New System.Windows.Forms.ListView
Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
Me.SuspendLayout()
'
'ListViewColumns
'
Me.ListViewColumns.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader12})
Me.ListViewColumns.Location = New System.Drawing.Point(16, 120)
Me.ListViewColumns.MultiSelect = False
Me.ListViewColumns.Name = "ListViewColumns"
Me.ListViewColumns.Size = New System.Drawing.Size(256, 97)
Me.ListViewColumns.TabIndex = 0
Me.ListViewColumns.View = System.Windows.Forms.View.Details
'
'ColumnHeader12
'
Me.ColumnHeader12.Text = "ColumnName"
Me.ColumnHeader12.Width = 120
'
'ListViewTables
'
Me.ListViewTables.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1})
Me.ListViewTables.Location = New System.Drawing.Point(16, 8)
Me.ListViewTables.MultiSelect = False
Me.ListViewTables.Name = "ListViewTables"
Me.ListViewTables.Size = New System.Drawing.Size(256, 97)
Me.ListViewTables.TabIndex = 1
Me.ListViewTables.View = System.Windows.Forms.View.Details
'
'ColumnHeader1
'
Me.ColumnHeader1.Text = "TableName"
Me.ColumnHeader1.Width = 120
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 266)
Me.Controls.Add(Me.ListViewTables)
Me.Controls.Add(Me.ListViewColumns)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
loading = True
ShowTablesInListView()
ListViewTables.Items(0).Selected = True
ListViewTables.Select() ' this seems to be important
ShowColumnsInListView()
loading = False
End Sub
Private Sub ShowTablesInListView()
Dim h, i As Integer
Dim str, str1, str2, str3 As String
ListViewTables.BeginUpdate()
For h = 0 To 49
Dim lvi As New ListViewItem
lvi.Text = "Table" & h.ToString
If h Mod 2 = 0 Then
lvi.BackColor = Color.FloralWhite
Else
lvi.BackColor = Color.Moccasin
End If
ListViewTables.Items.Add(lvi)
Next
ListViewTables.EndUpdate()
End Sub
Private Sub ShowColumnsInListView()
If ListViewTables.SelectedIndices.Count = 0 Then Return
Dim h, i As Integer
Dim str, str1, str2, str3 As String
Dim tblPosn As Integer = ListViewTables.SelectedItems(0).Index
ListViewColumns.BeginUpdate()
ListViewColumns.Items.Clear()
For i = 1 To 10
Dim lvi As New ListViewItem
lvi.Text = "Table" & tblPosn & "-Column" & i.ToString
If i Mod 2 = 0 Then
lvi.BackColor = Color.FloralWhite
Else
lvi.BackColor = Color.Moccasin
End If
ListViewColumns.Items.Add(lvi)
Next
ListViewColumns.EndUpdate()
End Sub
Private Sub ListViewTables_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListViewTables.SelectedIndexChanged
If loading = True Then Return
ShowColumnsInListView()
End Sub
End Class
Why would no items be selected?
ShowColumnsInListView is called in your SelectedIndexChanged event. That only gets called after something gets selected (or unselected).
Also we preselect an item before the first manual call to ShowColumnsInListView:
ListViewTables.Items(0).Selected = True
ListViewTables.Select()
ShowColumnsInListView()
In fact the statement:
If ListViewTables.SelectedIndices.Count = 0 Then Return
directly before:
Dim tblPosn As Integer = ListViewTables.SelectedItems(0).Index
is our safetly net to prevent an exception if we somehow unselected an item (you would have to change MultiSelect=True to have this happen).
Greg
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:uz**************@TK2MSFTNGP09.phx.gbl...
Correct, I'm tracking tblPosn, I copied "Dim tblPosn As Integer = ListViewTables.SelectedItems(0).Index" as another 'this seems to be important. It certainly made no sense to me. Surely "SelectedItems(0).Index" means a reset of tblPosn to = 0 or = Nothing since no items are selected?
Bob
Post some code. :^)
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:OD**************@TK2MSFTNGP11.phx.gbl...
Strange is a good term. Like you I directly pasted it into a new form. Yes, I'm using VS Enterprise Architect 2003.
Some weeks ago I posted another question to which I have never received any answers whatever. It regarded mouse events and form.Show form Hide. Is it possible that I have some bug in my VS that stopped something happening on my machine and is the reason nobody replied to my queery, they could not reproduce the problem?
Very Simply in an mdi project I had buttons with changing Images that changed on mouse enter and mouse leave events like Web Buttons. However when the button was used to hide a form the button used to create the hide code and random other buttons locked in the hover image when the form was re-shown. I tried event handling etc but never solved the problm so ended up re-designing the whole project, some 30 forms, to appear as usual blocky windows buttons.
Any thoughts, Bob ?
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:ej*************@TK2MSFTNGP12.phx.gbl...
Strange. I directly pasted this code into a brand new form, then arranged the listviews side by side and enlarged. I am not seeing anything strange on my machine. I assume you are using VS.NET 2003?
Greg
I'm confused !
Surely no items would be selected because of the (0).
As I read the line "Dim tblPosn As Integer = ListViewTables.SelectedItems(0).Index"
We set the variable tblPosn to the ListViewTables's SelectedItems(0) ie. there are either zero items selected Or we are looking at the item at index position zero, i.e the first item ?
I understand everything else you mentioned and concurr, normally in for example a listbox I would use something like :-
Private Sub ListBoxTables_SelectedIndexChanged(. . . . . etc . . . . .)
If Loading = True Then Exit Sub
tblPosn = ListBoxTables.SelectedIndex
ShowColumnsInListBox()
End Sub
It's specifically the (0).Index I'm not understanding.
Bob
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:en**************@tk2msftngp13.phx.gbl...
Why would no items be selected?
ShowColumnsInListView is called in your SelectedIndexChanged event. That only gets called after something gets selected (or unselected).
Also we preselect an item before the first manual call to ShowColumnsInListView:
ListViewTables.Items(0).Selected = True
ListViewTables.Select()
ShowColumnsInListView()
In fact the statement:
If ListViewTables.SelectedIndices.Count = 0 Then Return
directly before:
Dim tblPosn As Integer = ListViewTables.SelectedItems(0).Index
is our safetly net to prevent an exception if we somehow unselected an item (you would have to change MultiSelect=True to have this happen).
Greg
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:uz**************@TK2MSFTNGP09.phx.gbl...
Correct, I'm tracking tblPosn, I copied "Dim tblPosn As Integer = ListViewTables.SelectedItems(0).Index" as another 'this seems to be important. It certainly made no sense to me. Surely "SelectedItems(0).Index" means a reset of tblPosn to = 0 or = Nothing since no items are selected?
Bob
"ListView.SelectedListViewItemCollection"
Represents the collection of selected items in a list view control.
It is a collection of the selected items ONLY. 0 being the index of the first selected item (and only possible item if MultiSelect=false). This all makes more sense if MultiSelect=true. When only one item can be selected it does seems rather strange syntax.
If no items are selected the collection is empty. Hence why I check first before trying to access the first item (0-based).
If ListViewTables.SelectedIndices.Count = 0 Then Return
Greg
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
I'm confused !
Surely no items would be selected because of the (0).
As I read the line "Dim tblPosn As Integer = ListViewTables.SelectedItems(0).Index"
We set the variable tblPosn to the ListViewTables's SelectedItems(0) ie. there are either zero items selected Or we are looking at the item at index position zero, i.e the first item ?
I understand everything else you mentioned and concurr, normally in for example a listbox I would use something like :-
Private Sub ListBoxTables_SelectedIndexChanged(. . . . . etc . . . . ..)
If Loading = True Then Exit Sub
tblPosn = ListBoxTables.SelectedIndex
ShowColumnsInListBox()
End Sub
It's specifically the (0).Index I'm not understanding.
Bob
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:en**************@tk2msftngp13.phx.gbl...
Why would no items be selected?
ShowColumnsInListView is called in your SelectedIndexChanged event. That only gets called after something gets selected (or unselected).
Also we preselect an item before the first manual call to ShowColumnsInListView:
ListViewTables.Items(0).Selected = True
ListViewTables.Select()
ShowColumnsInListView()
In fact the statement:
If ListViewTables.SelectedIndices.Count = 0 Then Return
directly before:
Dim tblPosn As Integer = ListViewTables.SelectedItems(0).Index
is our safetly net to prevent an exception if we somehow unselected an item (you would have to change MultiSelect=True to have this happen).
Greg
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:uz**************@TK2MSFTNGP09.phx.gbl...
Correct, I'm tracking tblPosn, I copied "Dim tblPosn As Integer = ListViewTables.SelectedItems(0).Index" as another 'this seems to be important. It certainly made no sense to me. Surely "SelectedItems(0).Index" means a reset of tblPosn to = 0 or = Nothing since no items are selected?
Bob
OK Here's the basic code, followed by one attempt to handle the event, I cannot remember how many attempts I made but the problem was on three newsgroups for at least two weeks. I got not one answe rof any type!
The Images are simply a Red Square 48 x 48 and Green Square 48 x 48
The Module :-
Module Module1
Public FormBtn1 As New Form2
Public FormBtn2 As New Form3
End Module
The Parent Form :-
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.MainMenu1 = New System.Windows.Forms.MainMenu
Me.MenuItem1 = New System.Windows.Forms.MenuItem
Me.MenuItem2 = New System.Windows.Forms.MenuItem
Me.MenuItem3 = New System.Windows.Forms.MenuItem
'
'MainMenu1
'
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem2, Me.MenuItem3})
'
'MenuItem1
'
Me.MenuItem1.Index = 0
Me.MenuItem1.Text = "&File"
'
'MenuItem2
'
Me.MenuItem2.Index = 1
Me.MenuItem2.MdiList = True
Me.MenuItem2.Text = "&Window"
'
'MenuItem3
'
Me.MenuItem3.Index = 2
Me.MenuItem3.Text = "&Help"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.IsMdiContainer = True
Me.Menu = Me.MainMenu1
Me.Name = "Form1"
Me.Text = "Form1"
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
FormBtn1.MdiParent = Me
FormBtn2.MdiParent = Me
FormBtn1.Show()
End Sub
End Class
The First Child Form :-
Public Class Form2
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents ImageListButton1 As System.Windows.Forms.ImageList
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form2))
Me.Button1 = New System.Windows.Forms.Button
Me.ImageListButton1 = New System.Windows.Forms.ImageList(Me.components)
Me.SuspendLayout()
'
'Button1
'
Me.Button1.ImageIndex = 0
Me.Button1.ImageList = Me.ImageListButton1
Me.Button1.Location = New System.Drawing.Point(8, 8)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(48, 48)
Me.Button1.TabIndex = 0
'
'ImageListButton1
'
Me.ImageListButton1.ImageSize = New System.Drawing.Size(48, 48)
Me.ImageListButton1.ImageStream = CType(resources.GetObject("ImageListButton1.ImageS tream"), System.Windows.Forms.ImageListStreamer)
Me.ImageListButton1.TransparentColor = System.Drawing.Color.Black
'
'Form2
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.Button1)
Me.Name = "Form2"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParen t
Me.Text = "Form2"
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FormBtn1.Hide()
FormBtn2.Show()
End Sub
Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter
Button1.ImageIndex = 1
End Sub
Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave
Button1.ImageIndex = 0
End Sub
End Class
The Second Child Form :-
Public Class Form3
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents ImageListButton1 As System.Windows.Forms.ImageList
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form3))
Me.Button1 = New System.Windows.Forms.Button
Me.ImageListButton1 = New System.Windows.Forms.ImageList(Me.components)
Me.SuspendLayout()
'
'Button1
'
Me.Button1.ImageIndex = 0
Me.Button1.ImageList = Me.ImageListButton1
Me.Button1.Location = New System.Drawing.Point(236, 220)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(48, 48)
Me.Button1.TabIndex = 0
'
'ImageListButton1
'
Me.ImageListButton1.ImageSize = New System.Drawing.Size(48, 48)
Me.ImageListButton1.ImageStream = CType(resources.GetObject("ImageListButton1.ImageS tream"), System.Windows.Forms.ImageListStreamer)
Me.ImageListButton1.TransparentColor = System.Drawing.Color.Black
'
'Form3
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.Button1)
Me.Name = "Form3"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParen t
Me.Text = "Form3"
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FormBtn2.Hide()
FormBtn1.Show()
End Sub
Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter
Button1.ImageIndex = 1
End Sub
Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave
Button1.ImageIndex = 0
End Sub
End Class
As I recall one of my handling attempts was :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
AddHandler Me.Button1.MouseLeave, AddressOf Me.Button1_MouseLeave
FormBtn2.Hide()
FormBtn1.Show()
End Sub
It was seveal weeks ago and I've since deleted all the input and redesigned the project. A shame it looked a lot cooler that the clunky standard buttons. Give me a clue and I'll go back.
Bob
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:O2**************@TK2MSFTNGP11.phx.gbl...
Post some code. :^)
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:OD**************@TK2MSFTNGP11.phx.gbl...
Strange is a good term. Like you I directly pasted it into a new form. Yes, I'm using VS Enterprise Architect 2003.
Some weeks ago I posted another question to which I have never received any answers whatever. It regarded mouse events and form.Show form Hide. Is it possible that I have some bug in my VS that stopped something happening on my machine and is the reason nobody replied to my queery, they could not reproduce the problem?
Very Simply in an mdi project I had buttons with changing Images that changed on mouse enter and mouse leave events like Web Buttons. However when the button was used to hide a form the button used to create the hide code and random other buttons locked in the hover image when the form was re-shown. I tried event handling etc but never solved the problm so ended up re-designing the whole project, some 30 forms, to appear as usual blocky windows buttons.
Any thoughts, Bob ?
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:ej*************@TK2MSFTNGP12.phx.gbl...
Strange. I directly pasted this code into a brand new form, then arranged the listviews side by side and enlarged. I am not seeing anything strange on my machine. I assume you are using VS.NET 2003?
Greg
I see the issue. I just got it to lock the image and stop changing the button picture. I'll see what I can figure out a little later on...
(Not to sound aloof, but posting in html is usually fround upon. There is an option in OE to send all news items in Plain Text...)
Greg
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:Or**************@tk2msftngp13.phx.gbl...
OK Here's the basic code, followed by one attempt to handle the event, I cannot remember how many attempts I made but the problem was on three newsgroups for at least two weeks. I got not one answe rof any type!
The Images are simply a Red Square 48 x 48 and Green Square 48 x 48
The Module :-
Module Module1
Public FormBtn1 As New Form2
Public FormBtn2 As New Form3
End Module
The Parent Form :-
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.MainMenu1 = New System.Windows.Forms.MainMenu
Me.MenuItem1 = New System.Windows.Forms.MenuItem
Me.MenuItem2 = New System.Windows.Forms.MenuItem
Me.MenuItem3 = New System.Windows.Forms.MenuItem
'
'MainMenu1
'
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem2, Me.MenuItem3})
'
'MenuItem1
'
Me.MenuItem1.Index = 0
Me.MenuItem1.Text = "&File"
'
'MenuItem2
'
Me.MenuItem2.Index = 1
Me.MenuItem2.MdiList = True
Me.MenuItem2.Text = "&Window"
'
'MenuItem3
'
Me.MenuItem3.Index = 2
Me.MenuItem3.Text = "&Help"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.IsMdiContainer = True
Me.Menu = Me.MainMenu1
Me.Name = "Form1"
Me.Text = "Form1"
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
FormBtn1.MdiParent = Me
FormBtn2.MdiParent = Me
FormBtn1.Show()
End Sub
End Class
The First Child Form :-
Public Class Form2
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents ImageListButton1 As System.Windows.Forms.ImageList
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form2))
Me.Button1 = New System.Windows.Forms.Button
Me.ImageListButton1 = New System.Windows.Forms.ImageList(Me.components)
Me.SuspendLayout()
'
'Button1
'
Me.Button1.ImageIndex = 0
Me.Button1.ImageList = Me.ImageListButton1
Me.Button1.Location = New System.Drawing.Point(8, 8)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(48, 48)
Me.Button1.TabIndex = 0
'
'ImageListButton1
'
Me.ImageListButton1.ImageSize = New System.Drawing.Size(48, 48)
Me.ImageListButton1.ImageStream = CType(resources.GetObject("ImageListButton1.ImageS tream"), System.Windows.Forms.ImageListStreamer)
Me.ImageListButton1.TransparentColor = System.Drawing.Color.Black
'
'Form2
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.Button1)
Me.Name = "Form2"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParen t
Me.Text = "Form2"
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FormBtn1.Hide()
FormBtn2.Show()
End Sub
Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter
Button1.ImageIndex = 1
End Sub
Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave
Button1.ImageIndex = 0
End Sub
End Class
The Second Child Form :-
Public Class Form3
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents ImageListButton1 As System.Windows.Forms.ImageList
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form3))
Me.Button1 = New System.Windows.Forms.Button
Me.ImageListButton1 = New System.Windows.Forms.ImageList(Me.components)
Me.SuspendLayout()
'
'Button1
'
Me.Button1.ImageIndex = 0
Me.Button1.ImageList = Me.ImageListButton1
Me.Button1.Location = New System.Drawing.Point(236, 220)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(48, 48)
Me.Button1.TabIndex = 0
'
'ImageListButton1
'
Me.ImageListButton1.ImageSize = New System.Drawing.Size(48, 48)
Me.ImageListButton1.ImageStream = CType(resources.GetObject("ImageListButton1.ImageS tream"), System.Windows.Forms.ImageListStreamer)
Me.ImageListButton1.TransparentColor = System.Drawing.Color.Black
'
'Form3
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.Button1)
Me.Name = "Form3"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParen t
Me.Text = "Form3"
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FormBtn2.Hide()
FormBtn1.Show()
End Sub
Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter
Button1.ImageIndex = 1
End Sub
Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave
Button1.ImageIndex = 0
End Sub
End Class
As I recall one of my handling attempts was :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
AddHandler Me.Button1.MouseLeave, AddressOf Me.Button1_MouseLeave
FormBtn2.Hide()
FormBtn1.Show()
End Sub
It was seveal weeks ago and I've since deleted all the input and redesigned the project. A shame it looked a lot cooler that the clunky standard buttons. Give me a clue and I'll go back.
Bob
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:O2**************@TK2MSFTNGP11.phx.gbl...
Post some code. :^)
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:OD**************@TK2MSFTNGP11.phx.gbl...
Strange is a good term. Like you I directly pasted it into a new form. Yes, I'm using VS Enterprise Architect 2003.
Some weeks ago I posted another question to which I have never received any answers whatever. It regarded mouse events and form.Show form Hide. Is it possible that I have some bug in my VS that stopped something happening on my machine and is the reason nobody replied to my queery, they could not reproduce the problem?
Very Simply in an mdi project I had buttons with changing Images that changed on mouse enter and mouse leave events like Web Buttons. However when the button was used to hide a form the button used to create the hide code and random other buttons locked in the hover image when the form was re-shown. I tried event handling etc but never solved the problm so ended up re-designing the whole project, some 30 forms, to appear as usual blocky windows buttons.
Any thoughts, Bob ?
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:ej*************@TK2MSFTNGP12.phx.gbl...
Strange. I directly pasted this code into a brand new form, then arranged the listviews side by side and enlarged. I am not seeing anything strange on my machine. I assume you are using VS.NET 2003?
Greg
Thanks for the explanation now it starts to make sense.
Sorry about html I'v just been replying on your awsome coloured form after
clearing some endless repetitions. It's probably time we stopped meeting
like this anyway. People will start to talk!!!
Bob
The problem: http://tinyurl.com/3pyzl
The verdict: http://tinyurl.com/4y5fb
Looks like you have to what for VS 2005 and hope. Maybe I will fire it up and see what happens.
Greg
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:%2******************@TK2MSFTNGP15.phx.gbl...
I see the issue. I just got it to lock the image and stop changing the button picture. I'll see what I can figure out a little later on...
(Not to sound aloof, but posting in html is usually fround upon. There is an option in OE to send all news items in Plain Text...)
Greg
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:Or**************@tk2msftngp13.phx.gbl...
OK Here's the basic code, followed by one attempt to handle the event, I cannot remember how many attempts I made but the problem was on three newsgroups for at least two weeks. I got not one answe rof any type!
The Images are simply a Red Square 48 x 48 and Green Square 48 x 48
The Module :-
Module Module1
Public FormBtn1 As New Form2
Public FormBtn2 As New Form3
End Module
The Parent Form :-
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.MainMenu1 = New System.Windows.Forms.MainMenu
Me.MenuItem1 = New System.Windows.Forms.MenuItem
Me.MenuItem2 = New System.Windows.Forms.MenuItem
Me.MenuItem3 = New System.Windows.Forms.MenuItem
'
'MainMenu1
'
Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem2, Me.MenuItem3})
'
'MenuItem1
'
Me.MenuItem1.Index = 0
Me.MenuItem1.Text = "&File"
'
'MenuItem2
'
Me.MenuItem2.Index = 1
Me.MenuItem2.MdiList = True
Me.MenuItem2.Text = "&Window"
'
'MenuItem3
'
Me.MenuItem3.Index = 2
Me.MenuItem3.Text = "&Help"
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.IsMdiContainer = True
Me.Menu = Me.MainMenu1
Me.Name = "Form1"
Me.Text = "Form1"
End Sub
#End Region
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
FormBtn1.MdiParent = Me
FormBtn2.MdiParent = Me
FormBtn1.Show()
End Sub
End Class
The First Child Form :-
Public Class Form2
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents ImageListButton1 As System.Windows.Forms.ImageList
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form2))
Me.Button1 = New System.Windows.Forms.Button
Me.ImageListButton1 = New System.Windows.Forms.ImageList(Me.components)
Me.SuspendLayout()
'
'Button1
'
Me.Button1.ImageIndex = 0
Me.Button1.ImageList = Me.ImageListButton1
Me.Button1.Location = New System.Drawing.Point(8, 8)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(48, 48)
Me.Button1.TabIndex = 0
'
'ImageListButton1
'
Me.ImageListButton1.ImageSize = New System.Drawing.Size(48, 48)
Me.ImageListButton1.ImageStream = CType(resources.GetObject("ImageListButton1.ImageS tream"), System.Windows.Forms.ImageListStreamer)
Me.ImageListButton1.TransparentColor = System.Drawing.Color.Black
'
'Form2
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.Button1)
Me.Name = "Form2"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParen t
Me.Text = "Form2"
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FormBtn1.Hide()
FormBtn2.Show()
End Sub
Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter
Button1.ImageIndex = 1
End Sub
Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave
Button1.ImageIndex = 0
End Sub
End Class
The Second Child Form :-
Public Class Form3
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents ImageListButton1 As System.Windows.Forms.ImageList
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form3))
Me.Button1 = New System.Windows.Forms.Button
Me.ImageListButton1 = New System.Windows.Forms.ImageList(Me.components)
Me.SuspendLayout()
'
'Button1
'
Me.Button1.ImageIndex = 0
Me.Button1.ImageList = Me.ImageListButton1
Me.Button1.Location = New System.Drawing.Point(236, 220)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(48, 48)
Me.Button1.TabIndex = 0
'
'ImageListButton1
'
Me.ImageListButton1.ImageSize = New System.Drawing.Size(48, 48)
Me.ImageListButton1.ImageStream = CType(resources.GetObject("ImageListButton1.ImageS tream"), System.Windows.Forms.ImageListStreamer)
Me.ImageListButton1.TransparentColor = System.Drawing.Color.Black
'
'Form3
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.Button1)
Me.Name = "Form3"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParen t
Me.Text = "Form3"
Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
FormBtn2.Hide()
FormBtn1.Show()
End Sub
Private Sub Button1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseEnter
Button1.ImageIndex = 1
End Sub
Private Sub Button1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.MouseLeave
Button1.ImageIndex = 0
End Sub
End Class
As I recall one of my handling attempts was :
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
AddHandler Me.Button1.MouseLeave, AddressOf Me.Button1_MouseLeave
FormBtn2.Hide()
FormBtn1.Show()
End Sub
It was seveal weeks ago and I've since deleted all the input and redesigned the project. A shame it looked a lot cooler that the clunky standard buttons. Give me a clue and I'll go back.
Bob
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:O2**************@TK2MSFTNGP11.phx.gbl...
Post some code. :^)
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:OD**************@TK2MSFTNGP11.phx.gbl...
Strange is a good term. Like you I directly pasted it into a new form. Yes, I'm using VS Enterprise Architect 2003.
Some weeks ago I posted another question to which I have never received any answers whatever. It regarded mouse events and form.Show form Hide. Is it possible that I have some bug in my VS that stopped something happening on my machine and is the reason nobody replied to my queery, they could not reproduce the problem?
Very Simply in an mdi project I had buttons with changing Images that changed on mouse enter and mouse leave events like Web Buttons. However when the button was used to hide a form the button used to create the hide code and random other buttons locked in the hover image when the form was re-shown. I tried event handling etc but never solved the problm so ended up re-designing the whole project, some 30 forms, to appear as usual blocky windows buttons.
Any thoughts, Bob ?
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:ej*************@TK2MSFTNGP12.phx.gbl...
Strange. I directly pasted this code into a brand new form, then arranged the listviews side by side and enlarged. I am not seeing anything strange on my machine. I assume you are using VS.NET 2003?
Greg
Thank you so much for at least showing me I'm not a complete incompetent and
having the guts to answer my queery. Considering I pay £1,500+ per annum for
VS.Net and it's 'supposed' to give access to over 230 managed newsgroups
with
guaranteed response to technical queeries within 2 business days all I can
say is well done!!!
You've certainly beaten the three other newsgroups to which I posted my
query and received no response whatever, not even Post some code!!!
As for VS 2005 I cannot be bothered to download it, don't trust beta's much
so will wait in anticipation each month for my DVD's.
Thanks Bob
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:uL*************@TK2MSFTNGP11.phx.gbl...
The problem: http://tinyurl.com/3pyzl
The verdict: http://tinyurl.com/4y5fb
Looks like you have to what for VS 2005 and hope. Maybe I will fire it up
and see what happens.
Greg
Honestly Bob, I found this stuff in less than 5 minutes using
google.groups.com. I guess you just need to know what to look for...
Bookmark this link, I always start here: http://groups.google.com/groups?hl=e...tnet.languages
Also, have you registered your email alaises for when you post to these
managed newsgroups. I know when I had my MSDN subscription, MS was very
good about replying within those 2-days. Since MS obvioulsy doesn't reply
to hardly anything posted here, they must be looking for those specific
posters only... http://support.microsoft.com/default...am.asp&SD=msdn
Greg
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message
news:Oh**************@TK2MSFTNGP14.phx.gbl... Thank you so much for at least showing me I'm not a complete incompetent
and having the guts to answer my queery. Considering I pay £1,500+ per annum
for VS.Net and it's 'supposed' to give access to over 230 managed newsgroups with guaranteed response to technical queeries within 2 business days all I can say is well done!!!
You've certainly beaten the three other newsgroups to which I posted my query and received no response whatever, not even Post some code!!!
As for VS 2005 I cannot be bothered to download it, don't trust beta's
much so will wait in anticipation each month for my DVD's.
Thanks Bob
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:uL*************@TK2MSFTNGP11.phx.gbl...
The problem: http://tinyurl.com/3pyzl
The verdict: http://tinyurl.com/4y5fb
Looks like you have to what for VS 2005 and hope. Maybe I will fire it up and see what happens.
Greg
Interesting point. If you look at the vb group and search "Mouse Events" you
will find my query the second on the list, Mouse Events in an mdi project",
complete with my email etc. and no replies. You will note that there are 604
articles (06:40zulu 6th Sept, 2004). I was unaware that the meaning of
guaranteed RESPONSE means reading through 604 - 138,000 articles, foolish of
me.
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:%2***************@tk2msftngp13.phx.gbl... Honestly Bob, I found this stuff in less than 5 minutes using google.groups.com. I guess you just need to know what to look for...
Bookmark this link, I always start here: http://groups.google.com/groups?hl=e...tnet.languages
Also, have you registered your email alaises for when you post to these managed newsgroups. I know when I had my MSDN subscription, MS was very good about replying within those 2-days. Since MS obvioulsy doesn't reply to hardly anything posted here, they must be looking for those specific posters only...
http://support.microsoft.com/default...am.asp&SD=msdn
Greg
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:Oh**************@TK2MSFTNGP14.phx.gbl... Thank you so much for at least showing me I'm not a complete incompetent and having the guts to answer my queery. Considering I pay £1,500+ per annum for VS.Net and it's 'supposed' to give access to over 230 managed newsgroups with guaranteed response to technical queeries within 2 business days all I can say is well done!!!
You've certainly beaten the three other newsgroups to which I posted my query and received no response whatever, not even Post some code!!!
As for VS 2005 I cannot be bothered to download it, don't trust beta's much so will wait in anticipation each month for my DVD's.
Thanks Bob
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:uL*************@TK2MSFTNGP11.phx.gbl...
The problem: http://tinyurl.com/3pyzl
The verdict: http://tinyurl.com/4y5fb
Looks like you have to what for VS 2005 and hope. Maybe I will fire it up and see what happens.
Greg
My point was:
I find it much quicker to help oneself. Waiting 2 days for somebody from MS
to tell you they will look into it is FRUSTRATING.
Second, HAVE YOU REGISTERED your email alais for MSDN managed newsgroups? If
not, how is MS suppose to know you are a paid subscriber, eligible for the 2
day turn around?
Knowing what to search is always the key, I think I searched for "mdi mouse
events". From a quick test, I knew this didn't occur when mdi wasn't
involed. This only returned 53 hits, the first page of results led to the
answer.
Greg
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Interesting point. If you look at the vb group and search "Mouse Events" you will find my query the second on the list, Mouse Events in an mdi project", complete with my email etc. and no replies. You will note that there are 604 articles (06:40zulu 6th Sept, 2004). I was unaware that the meaning of guaranteed RESPONSE means reading through 604 - 138,000 articles, foolish of me. "Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:%2***************@tk2msftngp13.phx.gbl... Honestly Bob, I found this stuff in less than 5 minutes using google.groups.com. I guess you just need to know what to look for...
Bookmark this link, I always start here: http://groups.google.com/groups?hl=e...tnet.languages
Also, have you registered your email alaises for when you post to these managed newsgroups. I know when I had my MSDN subscription, MS was very good about replying within those 2-days. Since MS obvioulsy doesn't reply to hardly anything posted here, they must be looking for those specific posters only...
http://support.microsoft.com/default...am.asp&SD=msdn
Greg
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:Oh**************@TK2MSFTNGP14.phx.gbl... Thank you so much for at least showing me I'm not a complete incompetent and having the guts to answer my queery. Considering I pay £1,500+ per annum for VS.Net and it's 'supposed' to give access to over 230 managed newsgroups with guaranteed response to technical queeries within 2 business days all I can say is well done!!!
You've certainly beaten the three other newsgroups to which I posted my query and received no response whatever, not even Post some code!!!
As for VS 2005 I cannot be bothered to download it, don't trust beta's much so will wait in anticipation each month for my DVD's.
Thanks Bob
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:uL*************@TK2MSFTNGP11.phx.gbl...
The problem: http://tinyurl.com/3pyzl
The verdict: http://tinyurl.com/4y5fb
Looks like you have to what for VS 2005 and hope. Maybe I will fire it up and see what happens.
Greg
I totally agree, the library here has almost all the books on VB.Net
published and I always print out the help pages as used, index and save
them, so they now fill a whole shelf.
Your comment about registering may prove beneficial but let me quote the
very latest msdn Subscriptions, Getting Started Guide, received last week
(My sub gets renewed in August).
"MSDN now includes managed newsgroup support for all Universal, Enterprise,
Professional and Operating System Subscribers. MSDN Subscribers can post
unlimited .NET product and tchnology questions to over 230 Microsoft public
newsgroups and receive a guaranteed response from Microsoft Support
Professionals within two business days. http://msdn.microsoft.com/newsgroups/managed
Also, see your local MSDN website for details of other newsgroups in your
locality and language."
Where does it say you have to register anywhere for anything?
My Point is this. COMMUNICATIONS would be helpful, MS is a big business and
yet as you pointed out there are some 600 queries regarding mouse events and
god alone knows how much soul searching went on before they were ever
promulgated.Why cannot MS simply post an addendum in the mouse events part
of the Help Library which is updated regularly. Dont use this event in mdi
forms.!!!
How much msdn time is wasted answering repeat requests for information
concerning problems which are not going to be fixed until the next release,
if then?
Back in 1981 I bought Multiplan for the Apple llE, It was an early Microsoft
product and had the best manual I've ever seen for any product ever. For
twenty plus years I kept that manual and the 5.5" disks as an example of how
to write a manual and teach people to use a product. What happened??
Bob
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message
news:eB**************@TK2MSFTNGP12.phx.gbl... My point was:
I find it much quicker to help oneself. Waiting 2 days for somebody from MS to tell you they will look into it is FRUSTRATING.
Second, HAVE YOU REGISTERED your email alais for MSDN managed newsgroups? If not, how is MS suppose to know you are a paid subscriber, eligible for the 2 day turn around?
Knowing what to search is always the key, I think I searched for "mdi mouse events". From a quick test, I knew this didn't occur when mdi wasn't involed. This only returned 53 hits, the first page of results led to the answer.
Greg
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:%2****************@TK2MSFTNGP09.phx.gbl... Interesting point. If you look at the vb group and search "Mouse Events" you will find my query the second on the list, Mouse Events in an mdi project", complete with my email etc. and no replies. You will note that there are 604 articles (06:40zulu 6th Sept, 2004). I was unaware that the meaning of guaranteed RESPONSE means reading through 604 - 138,000 articles, foolish of me. "Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:%2***************@tk2msftngp13.phx.gbl... Honestly Bob, I found this stuff in less than 5 minutes using google.groups.com. I guess you just need to know what to look for...
Bookmark this link, I always start here: http://groups.google.com/groups?hl=e...tnet.languages
Also, have you registered your email alaises for when you post to these managed newsgroups. I know when I had my MSDN subscription, MS was very good about replying within those 2-days. Since MS obvioulsy doesn't reply to hardly anything posted here, they must be looking for those specific posters only...
http://support.microsoft.com/default...am.asp&SD=msdn
Greg
"StriderBob" <rw**@mdbatisisps.freeserve.co.uk> wrote in message news:Oh**************@TK2MSFTNGP14.phx.gbl... Thank you so much for at least showing me I'm not a complete incompetent and having the guts to answer my queery. Considering I pay £1,500+ per annum for VS.Net and it's 'supposed' to give access to over 230 managed newsgroups with guaranteed response to technical queeries within 2 business days all I can say is well done!!!
You've certainly beaten the three other newsgroups to which I posted my query and received no response whatever, not even Post some code!!!
As for VS 2005 I cannot be bothered to download it, don't trust beta's much so will wait in anticipation each month for my DVD's.
Thanks Bob
"Greg Burns" <greg_burns@DONT_SPAM_ME_hotmail.com> wrote in message news:uL*************@TK2MSFTNGP11.phx.gbl...
The problem: http://tinyurl.com/3pyzl
The verdict: http://tinyurl.com/4y5fb
Looks like you have to what for VS 2005 and hope. Maybe I will fire it up and see what happens.
Greg
I agree that knowing you need to register is a very well kept secret. (God
knows I wasn't aware of it for a LONG time). Of course, I am just
speculating how this works. Wonder what is to prevent a user from posting
using somebody else's registered alais. Probably nothing.
Although your unanswered post negates this theory, keep this in mind: It
also says you are guaranteed a response from "the newsgroup community or a
Microsoft support professional within 2 business days."
Which means, if I simply respond with a "post some code", I possibly just
killed your chance at getting a response from MS! :^)
There are some other nasty bugs out there that I have been aware of for a
long time that rear their ugly head once in awhile (the one with databinding
a checkedlistbox on a tabpage comes to mind; http://tinyurl.com/492j2), that
I still don't see in any KB articles or fixed in SP 1 http://support.microsoft.com/?kbid=867460
Communication would be great. Shame their isn't a FAQ for this group. And
if there is, I dunno about it either. :^)
Greg
"StriderBob" <st********@newsgroup.nospam> wrote in message
news:OP**************@TK2MSFTNGP11.phx.gbl... I totally agree, the library here has almost all the books on VB.Net published and I always print out the help pages as used, index and save them, so they now fill a whole shelf. Your comment about registering may prove beneficial but let me quote the very latest msdn Subscriptions, Getting Started Guide, received last week (My sub gets renewed in August).
"MSDN now includes managed newsgroup support for all Universal, Enterprise, Professional and Operating System Subscribers. MSDN Subscribers can post unlimited .NET product and tchnology questions to over 230 Microsoft public newsgroups and receive a guaranteed response from Microsoft Support Professionals within two business days.
http://msdn.microsoft.com/newsgroups/managed
Also, see your local MSDN website for details of other newsgroups in your locality and language."
Where does it say you have to register anywhere for anything?
My Point is this. COMMUNICATIONS would be helpful, MS is a big business and yet as you pointed out there are some 600 queries regarding mouse events and god alone knows how much soul searching went on before they were ever promulgated.Why cannot MS simply post an addendum in the mouse events part of the Help Library which is updated regularly. Dont use this event in mdi forms.!!!
How much msdn time is wasted answering repeat requests for information concerning problems which are not going to be fixed until the next release, if then?
Back in 1981 I bought Multiplan for the Apple llE, It was an early Microsoft product and had the best manual I've ever seen for any product ever. For twenty plus years I kept that manual and the 5.5" disks as an example of how to write a manual and teach people to use a product. What happened??
Bob This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: newbie001 |
last post by:
I have the following code in a listview control's
initList function (called from form_load event). i can't
understand why the listview box still appears blank with
no columns or listview items.
...
|
by: VM |
last post by:
How can I fill up a listview with text file contents?
My listview has two columns and the first column fills up with a while loop:
while (myString != null)
{
myString = sr.Readline();...
|
by: C# Learner |
last post by:
Has anyone else noticed ListView's unbearable flickering?
I have a project containing a list-view with the following:
- View: Details
- Columns: 5
The following code causes the list-view...
|
by: Zac Maclean |
last post by:
I have a working version of this in VB, tryign to translate everything over
to C#.
In the C# version this is filling the listview, the first couple columns are
ok, but the last few are going...
|
by: twick10 |
last post by:
Hi All,
Is anybody aware or significant bugs in the Windows Forms ListView control??
I am having serious problems trying to switch from Large and small icon
views to detail views. What looks...
|
by: Mamatha |
last post by:
Hi
I have an application with listview.When i click on one
button the data will be displayed like this in the
listview:
colA colB colC
----- ----- ------...
|
by: Alan T |
last post by:
How do I define 3 coloumns display as:
Name, Address, Phone ?
|
by: John Devlon |
last post by:
Hi,
Does anyone know how to get a value of a second column of a selected item
in Listview.
I've create a listview and added this code
Listview.Items.Clear()
Listview.Columns.Clear()...
|
by: Mustaf Kazi |
last post by:
Hi
Can anyone tell me how to clear items from listview in vb.net 2003.
I tried the code as
Listview1.items.clear()
but it doesn't work.
is that any other method.
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |