Thanks for all of the information but seems this "one" user is still
having problems. And to note his machine is a new rebuild of the OS
Windows XP Pro
User is getting the buttons on a test form so we then tried 2-4.
Right-click bring to front on the two buttons and put code behind one
of the labels to set the visible property to true(also added code to
show a messagebox) and the user changed his theme to Windows Classic.
Once he installed to new client he still doesn't see the buttons but
clicking on the label says that the visible property already "True" but
no buttons. He also ran through the process after uninstalling McAfee
on his machine with the same results. Here's the code for the page
load and button actions. Most of the stuff is for setup of the
datagrid. Also added the button click events if needed. Let me know
if something sticks out...
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim conServer As String
Dim conPort As Integer
Dim strVersion As String
Dim strReleaseDate As String
Dim dgTblStyle As New DataGridTableStyle
Dim dgAck As New DataGridBoolColumn
Dim dgStatus As New FormattableTextBoxColumn
Dim dgPriority As New FormattableTextBoxColumn
Dim dgSubject As New FormattableTextBoxColumn
Dim dgIncidentNum As New FormattableTextBoxColumn
Dim dgTeam As New FormattableTextBoxColumn
Dim dgRecID As New DataGridTextBoxColumn
Dim dgISubject As New DataGridTextBoxColumn
Dim dgISymptom As New DataGridTextBoxColumn
Dim dgDetails As New DataGridTextBoxColumn
Dim dgIRecID As New DataGridTextBoxColumn
Dim ico As System.Drawing.Icon
myTimer = New System.Timers.Timer(300000)
'Setup timed refresh of datagride
AddHandler myTimer.Elapsed, AddressOf TimerFired
myTimer.AutoReset = True
myTimer.Start()
strVersion =
System.Configuration.ConfigurationSettings.AppSettings.Item("Version").ToString
strReleaseDate =
System.Configuration.ConfigurationSettings.AppSettings.Item("ReleaseDate").ToString
userName = Environment.UserDomainName & "\" &
Environment.UserName
Me.Text = "SSA Help Desk Alert"
Me.lblLogin.Text = "Win Authentication: " &
Environment.UserName
Me.StatusBar1.Panels.Item(1).Text = "Version " & strVersion & "
Release " & strReleaseDate
Me.StatusBar1.Show()
ico = New System.Drawing.Icon("SSAHelpDeskAlert.ico")
Me.Icon = ico
Me.priorityTextBrush = New SolidBrush(Color.Red)
'Setup of the datagrid columns
dgRecID.MappingName = "RecID"
dgRecID.Width = 0
dgRecID.ReadOnly = True
dgISubject.MappingName = "ISubject"
dgISubject.Width = 0
dgISubject.ReadOnly = True
dgISymptom.MappingName = "Symptom"
dgISymptom.Width = 0
dgISymptom.ReadOnly = True
dgDetails.MappingName = "Details"
dgDetails.Width = 0
dgDetails.ReadOnly = True
dgIRecID.MappingName = "IRecID"
dgIRecID.Width = 0
dgIRecID.ReadOnly = True
dgAck.MappingName = "Ack."
dgAck.HeaderText = "Ack."
dgAck.Width = 25
dgAck.AllowNull = False
dgStatus.MappingName = "Status"
dgStatus.HeaderText = "Status"
dgStatus.Width = 75
dgStatus.ReadOnly = True
AddHandler dgStatus.SetCellFormat, AddressOf FormatGridRow
dgSubject.MappingName = "Subject"
dgSubject.HeaderText = "Subject"
dgSubject.Width = 275
dgSubject.ReadOnly = True
dgSubject.TextBox.Multiline = True
dgSubject.TextBox.WordWrap = True
AddHandler dgSubject.SetCellFormat, AddressOf FormatGridRow
dgTeam.MappingName = "Team"
dgTeam.HeaderText = "Team"
dgTeam.Width = 110
dgTeam.ReadOnly = True
AddHandler dgTeam.SetCellFormat, AddressOf FormatGridRow
dgIncidentNum.MappingName = "Incident#"
dgIncidentNum.HeaderText = "Incident#"
dgIncidentNum.Alignment = HorizontalAlignment.Right
dgIncidentNum.ReadOnly = True
AddHandler dgIncidentNum.SetCellFormat, AddressOf FormatGridRow
dgPriority.MappingName = "Priority"
dgPriority.HeaderText = "Priority"
dgPriority.Alignment = HorizontalAlignment.Right
dgPriority.Width = 50
dgPriority.ReadOnly = True
AddHandler dgPriority.SetCellFormat, AddressOf FormatGridRow
dgTblStyle.MappingName = "Data"
dgTblStyle.GridColumnStyles.Add(dgAck)
dgTblStyle.GridColumnStyles.Add(dgStatus)
dgTblStyle.GridColumnStyles.Add(dgPriority)
dgTblStyle.GridColumnStyles.Add(dgSubject)
dgTblStyle.GridColumnStyles.Add(dgIncidentNum)
dgTblStyle.GridColumnStyles.Add(dgTeam)
dgTblStyle.GridColumnStyles.Add(dgRecID)
dgTblStyle.GridColumnStyles.Add(dgISubject)
dgTblStyle.GridColumnStyles.Add(dgISymptom)
dgTblStyle.GridColumnStyles.Add(dgDetails)
dgTblStyle.GridColumnStyles.Add(dgIRecID)
'Setup dataset
ds.Tables.Add("Data")
ds.Tables("Data").Columns.Add("RecID")
ds.Tables("Data").Columns(0).ColumnMapping = MappingType.Hidden
ds.Tables("Data").Columns.Add("Ack.",
System.Type.GetType("System.Boolean"))
ds.Tables("Data").Columns.Add("Created")
ds.Tables("Data").Columns.Add("Status")
ds.Tables("Data").Columns.Add("Priority")
ds.Tables("Data").Columns.Add("Subject")
ds.Tables("Data").Columns.Add("Incident#")
ds.Tables("Data").Columns.Add("Team")
ds.Tables("Data").Columns.Add("ISubject")
ds.Tables("Data").Columns.Add("Symptom")
ds.Tables("Data").Columns.Add("Details")
ds.Tables("Data").Columns.Add("IRecID")
ds.Tables.Add("Journals")
ds.Tables("Journals").Columns.Add("RecID")
ds.Tables("Journals").Columns.Add("Subject")
ds.Tables("Journals").Columns.Add("NotesBody")
dv = New DataView(ds.Tables("Data"))
dv.AllowNew = False
dv.AllowDelete = False
'DataGrid1.DataSource = dv
'DataGrid1.SetDataBinding(ds, "Data")
DataGrid1.SetDataBinding(dv, "")
DataGrid1.TableStyles.Add(dgTblStyle)
DataGrid1.CaptionText = "ITSM Open Incidents"
conServer =
System.Configuration.ConfigurationSettings.AppSettings.Item("localServer").ToString
conPort =
System.Configuration.ConfigurationSettings.AppSettings.Item("localPort").ToString
'mobjClient = New TcpClient("whqwts02", 5000)
'mobjClient = New TcpClient("localhost", 5000)
mobjClient = New TcpClient(conServer, conPort)
DisplayText("Connected to host" & vbCrLf)
mobjClient.GetStream.BeginRead(marData, 0, 1024, AddressOf
DoRead, Nothing)
'Initial Population of the Teams
requestTeams()
End Sub
Private Sub lblLogin_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles lblLogin.Click
'MessageBox.Show(bntSave.Visible.ToString, "Test",
MessageBoxButtons.OK)
bntSave.Visible = True
btnRefresh.Visible = True
End Sub
Private Sub btnRefresh_Click_1(ByVal sender As System.Object, ByVal
e As System.EventArgs)
requestData()
End Sub
Private Sub bntSave_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim i As Integer
Dim builder As New StringBuilder
Dim found As Boolean
If ds.Tables("Data").Rows.Count > 0 Then
For i = 0 To ds.Tables("Data").Rows.Count - 1
If ds.Tables("Data").Rows(i).Item("Ack.") = True Then
builder.Append("<?xml version=""1.0""
encoding=""UTF-8""?>")
builder.Append("<Message type=""SQLString"">")
builder.Append("<stringData>UPDATE task SET
status='Acknowledge', AcknowledgedBy='" & userName & "',
AcknowledgedDateTime=getDate() WHERE recid = '" &
ds.Tables("Data").Rows(i).Item("recid") & "' AND status =
'Waiting'</stringData>")
builder.Append("</Message>")
Send(builder.ToString)
DisplayText("Update Incident Number " &
ds.Tables("Data").Rows(i).Item("Incident#") & vbCrLf)
End If
Next
End If
requestData()
End Sub