Listbox duplicates
Listbox duplicates
Listbox duplicates
Listbox duplicates
Listbox duplicates
Listbox duplicates Listbox duplicates Listbox duplicates Listbox duplicates Listbox duplicates Listbox duplicates Listbox duplicates Listbox duplicates
Listbox duplicates Listbox duplicates
Listbox duplicates
Go Back  Xtreme Visual Basic Talk > > > Listbox duplicates


Reply
 
Thread Tools Display Modes
  #21  
Old 06-02-2004, 08:25 PM
sonicdemonic sonicdemonic is offline
Junior Contributor
 
Join Date: Feb 2004
Location: Indiana
Posts: 261
Smile


No problem, It was a learning process for me too.

I use to be real bad at saving everything I was doing ( scanning through the registry, listing files ) to a txt file and then comparing to it. Though, you think it helps you while trying to figure out the once done the program ends up work 10 times hard then it needs to and you have 10 times the amount of code to write. Try to stay away from doing that unless your true purpose is to save something to a file.
Reply With Quote
  #22  
Old 06-02-2004, 08:30 PM
sonicdemonic sonicdemonic is offline
Junior Contributor
 
Join Date: Feb 2004
Location: Indiana
Posts: 261
Default

One more thinig, i almost forgot. I added a few more things that list some information about the hotfixes. here is the code..

Code:
Function CheckHotFixes() Dim subKeyName As String Dim reg As String = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Hotfix" Dim hotfix = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(reg) Dim HotfixArray(2, 100) As String Dim FoundMatch As Boolean = False Dim Counter As Integer = 0 Dim InstalledCounter As Integer = 0 Dim NotInstalledCounter As Integer = 0 Dim LineofText As String FileOpen(1, "C:\CurHotFix.dat", OpenMode.Input) Do Until EOF(1) LineofText = LineInput(1) FoundMatch = False For Each subKeyName In hotfix.GetSubkeyNames Select Case LineofText Case Is = subKeyName FoundMatch = True End Select Next Select Case FoundMatch Case False HotfixArray(0, NotInstalledCounter) = LineofText ' Saves the subname in array ListBox1.Items.Add(HotfixArray(0, NotInstalledCounter)) ' List not install items NotInstalledCounter = NotInstalledCounter + 1 ' Count not found Entries ' if you want to store NON-installed entries in a txt file put that code here. Case True HotfixArray(1, InstalledCounter) = subKeyName ' Saves the subname in array 'ListBox1.Items.Add(HotfixArray(0, fixnotfound)) ' Use this only if you want to list installed item InstalledCounter = InstalledCounter + 1 ' Count not found Entries End Select Counter = Counter + 1 Loop ListBox1.Items.Add("") ListBox1.Items.Add(InstalledCounter & " HotFixes have been installed.") ListBox1.Items.Add(NotInstalledCounter & " HotFixes still need to be installed.") ListBox1.Items.Add(Counter & " Total HotFixes available.") FileClose(1) End Function
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Listbox duplicates
Listbox duplicates
Listbox duplicates Listbox duplicates
Listbox duplicates
Listbox duplicates
Listbox duplicates Listbox duplicates Listbox duplicates Listbox duplicates Listbox duplicates Listbox duplicates Listbox duplicates
Listbox duplicates
Listbox duplicates
 
Listbox duplicates
Listbox duplicates
 
-->