Salve, ho questo problema non riesco ad incolonnare dalla 3° colonna in su mi vengono i valori scalati dove sbaglio ? per inserirli utilizzo un DataTable questa è la rutine di inserimento:
Sub DGVBoot() Dim DT As New DataTable DT.Rows.Clear() DT.Columns.Clear() Dim R As DataRow With DGV .DataSource = Nothing .Location = New Point(12, 50) .Size = New Size(Width - 100, Height - 100) .Visible = True '.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders '.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize '.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells '.AllowUserToAddRows = False '.AllowUserToDeleteRows = False .DataSource = DT End With With DT .Columns.Add("Lista Programmi Installati", GetType(String)) .Columns.Add("Lista Data Installazione", GetType(String)) .Columns.Add("Lista Collegamento Uninstaller", GetType(String)) .Columns.Add("Lista Run HKey_Local_Machine", GetType(String)) .Columns.Add("Lista Run HKey_Local_Machine Collegamento", GetType(String)) .Columns.Add("Lista Run HKey_Current_User", GetType(String)) .Columns.Add("Lista Run HKey_Current_User Collegamento", GetType(String)) .Columns.Add("Lista Eseguzione Automatica", GetType(String)) .Columns.Add("Lista Processi Attivi", GetType(String)) For Each P As programma In ProgrammiInstallati() If P.DisplayName <> "N.D." Then R = .NewRow R(0) = P.DisplayName.Trim R(1) = P.InstallDate R(2) = P.UninstallString R(3) = "" R(4) = "" R(5) = "" R(6) = "" R(7) = "" .Rows.Add(R) End If Next End With Dim u As Integer = 0 For Each S As String In ProgrammiAutorun() If S <> "" Then DT.Rows(u)(3) = S.Substring(0, S.LastIndexOf(">") - 3) DT.Rows(u)(4) = S.Substring(S.IndexOf(">") + 1) u += 1 End If Next Dim Y As Integer = 0 For Each S As String In ProgrammiAutorun2() If S <> "" Then DT.Rows(Y)(5) = S.Substring(0, S.LastIndexOf(">") - 3) DT.Rows(Y)(6) = S.Substring(S.IndexOf(">") + 1) Y += 1 End If Next If IO.Directory.Exists("C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup") Then Dim dInfo As New IO.DirectoryInfo(IO.Path.Combine("C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup")) Dim files5 = dInfo.GetFiles.OrderBy(Function(file) file.CreationTime) ''("Posizione Esecuzione Automatica") Dim x As Integer For Each file In files5 ' "Lista Eseguzione Automatica" If file.Name.Length > 0 Then DT.Rows(x)(7) = file.Name.ToString x += 1 End If Next End If Dim W As Integer = 0 Dim procList() As Process procList = Process.GetProcesses() For Each proc As Process In procList If W < procList.Length - 1 Then DT.Rows(W)(8) = proc.ProcessName W += 1 End If Next proc DGV.Sort(DGV.Columns(0), ComponentModel.ListSortDirection.Ascending) End Sub
e questa immagine mostra come si presenta:

come si può notare i valori dalla 3° colonna alla 7° colonna vengono scalati in basso ed io vorrei che fossero tutti radunati come nelle colonne precedenti, come indicato dalle frecce come dovrei fare?