Click here to Skip to main content
15,916,527 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralPop up menu Pin
Anonymous23-Feb-05 1:34
Anonymous23-Feb-05 1:34 
GeneralRe: Pop up menu Pin
Dave Kreskowiak23-Feb-05 3:56
mveDave Kreskowiak23-Feb-05 3:56 
GeneralApp.config Pin
nitin_ion23-Feb-05 1:14
nitin_ion23-Feb-05 1:14 
GeneralRe: App.config Pin
Dave Kreskowiak23-Feb-05 3:30
mveDave Kreskowiak23-Feb-05 3:30 
QuestionHow can I access a class written in C++ in a VB project?? Pin
Logan from Singapore22-Feb-05 22:59
Logan from Singapore22-Feb-05 22:59 
AnswerRe: How can I access a class written in C++ in a VB project?? Pin
Dave Kreskowiak23-Feb-05 0:41
mveDave Kreskowiak23-Feb-05 0:41 
Generalproblems impleminting ListView.ListViewItemCollection.Contains Pin
ASDEF000122-Feb-05 19:36
ASDEF000122-Feb-05 19:36 
Generalwell in order to solve the problem i used IEnumorator Pin
ASDEF000122-Feb-05 21:29
ASDEF000122-Feb-05 21:29 
Unfortunately it is a bit ineficent and lacks the update capabilities, however it does properly check to see if an item with the same name exists and also checks to see if an item with the same subitem exists (assuming there are more then one item with the same name). IF you have any improvements or other ideas pleas feel free to post them.

Private Sub ListViewMakeRow(ByVal lvw As ListView, ByVal ProcessName As String, ByVal ParamArray subitem_titles() As String)
'Creates a temporary listViewItem
Dim CurrentListItem As ListViewItem

'check to see if our TempListItem is found in lvw
If (lvw.Items.Count = 0) Then
'there are no entries in the list (list is empty)
Dim new_item As ListViewItem = lvw.Items.Add(ProcessName)
For i As Integer = subitem_titles.GetLowerBound(0) To _
subitem_titles.GetUpperBound(0)
new_item.SubItems.Add(subitem_titles(i))
Next i

Else
'Well apparently the list is not empty
Dim dataListEnumerator As IEnumerator = lvw.Items.GetEnumerator()
Dim containsItem As Boolean = False
Dim PID As String

'check all entries in the list
While (dataListEnumerator.MoveNext())

CurrentListItem = CType(dataListEnumerator.Current, ListViewItem)
' Display the current DataListItem onto the label.
If (ProcessName = CurrentListItem.Text) Then
containsItem = True
'Stores the PID for later checking if needed
PID = PID & " " & CurrentListItem.SubItems.Item(1).Text


End If
End While
If (containsItem = False) Then
'this process is not found in the list
Dim new_item As ListViewItem = lvw.Items.Add(ProcessName)
For i As Integer = subitem_titles.GetLowerBound(0) To _
subitem_titles.GetUpperBound(0)
new_item.SubItems.Add(subitem_titles(i))
Next i
Label2.Text = "sweet unnion rings"
ElseIf (PID.IndexOf(subitem_titles(0)) = -1) Then
'this specific process with this specific PID is not found
'Assumes that contansItem is true

Dim new_item As ListViewItem = lvw.Items.Add(ProcessName)
For i As Integer = subitem_titles.GetLowerBound(0) To _
subitem_titles.GetUpperBound(0)
new_item.SubItems.Add(subitem_titles(i))
Next i
End If
End If
End Sub

Donald Carlson, Jr.

QuestionHow to convert a htm page to asp page Pin
GoldenStar22-Feb-05 14:34
GoldenStar22-Feb-05 14:34 
AnswerRe: How to convert a htm page to asp page Pin
Christian Graus22-Feb-05 14:49
protectorChristian Graus22-Feb-05 14:49 
GeneralRe: How to convert a htm page to asp page Pin
GoldenStar22-Feb-05 15:40
GoldenStar22-Feb-05 15:40 
GeneralContext menu in different listviews Pin
22-Feb-05 11:00
suss22-Feb-05 11:00 
GeneralDifference between CreateObject and New method Pin
Mahesh167922-Feb-05 8:26
Mahesh167922-Feb-05 8:26 
GeneralRe: Difference between CreateObject and New method Pin
Christian Graus22-Feb-05 8:47
protectorChristian Graus22-Feb-05 8:47 
GeneralCombo Hack Pin
buildero22-Feb-05 4:19
buildero22-Feb-05 4:19 
GeneralRe: Combo Hack Pin
Colin Angus Mackay22-Feb-05 4:34
Colin Angus Mackay22-Feb-05 4:34 
Generalopening a form from a string name Pin
Shawn200022-Feb-05 3:18
Shawn200022-Feb-05 3:18 
GeneralRe: opening a form from a string name Pin
Dave Kreskowiak22-Feb-05 3:58
mveDave Kreskowiak22-Feb-05 3:58 
GeneralRe: opening a form from a string name Pin
Shawn200022-Feb-05 4:36
Shawn200022-Feb-05 4:36 
GeneralRe: opening a form from a string name Pin
Dave Kreskowiak22-Feb-05 6:09
mveDave Kreskowiak22-Feb-05 6:09 
GeneralPrinting + Encoding Magstripe Pin
YorkTech22-Feb-05 0:02
YorkTech22-Feb-05 0:02 
GeneralRe: Printing + Encoding Magstripe Pin
Dave Kreskowiak22-Feb-05 0:48
mveDave Kreskowiak22-Feb-05 0:48 
GeneralRe: Printing + Encoding Magstripe Pin
YorkTech22-Feb-05 7:11
YorkTech22-Feb-05 7:11 
GeneralRe: Printing + Encoding Magstripe Pin
Dave Kreskowiak22-Feb-05 7:32
mveDave Kreskowiak22-Feb-05 7:32 
GeneralRe: Printing + Encoding Magstripe Pin
YorkTech23-Feb-05 5:22
YorkTech23-Feb-05 5:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.