Click here to Skip to main content
15,884,473 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Difference between VB.NET 2008 and 2005 and 2002(3) ? Pin
Kevin McFarlane22-Feb-09 6:57
Kevin McFarlane22-Feb-09 6:57 
QuestionWhere is the bug? Pin
Amer Rehman22-Feb-09 5:30
Amer Rehman22-Feb-09 5:30 
AnswerRe: Where is the bug? Pin
Alan N22-Feb-09 11:46
Alan N22-Feb-09 11:46 
GeneralRe: Where is the bug? Pin
Amer Rehman22-Feb-09 20:36
Amer Rehman22-Feb-09 20:36 
GeneralRe: Where is the bug? Pin
Alan N22-Feb-09 21:09
Alan N22-Feb-09 21:09 
GeneralRe: Where is the bug? Pin
Alan N23-Feb-09 1:24
Alan N23-Feb-09 1:24 
GeneralRe: Where is the bug? Pin
Amer Rehman24-Feb-09 5:14
Amer Rehman24-Feb-09 5:14 
AnswerRe: Where is the bug? Pin
JMummery22-Feb-09 12:23
professionalJMummery22-Feb-09 12:23 
Not sure but this would be better:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
      Dim strNames() As String = {"Yahoo", "Gmail", "Hotmail"}
      Dim bln As Boolean

      if FindWindow(strNames) then
         ' true - found
         MsgBox(bln.ToString)
      else
         ' False - Could not find
      end if

End Sub

Private Function FindWindow(ByVal Names() As String) As Boolean
      Dim lbReturn as Boolean = False
      Dim pr As Process() = Process.GetProcessesByName("iexplore")

      If pr.Length > 0 Then
            For i As Integer = 0 To UBound(pr)
                  For j As Integer = 0 To UBound(Names)
                        If pr(i).MainWindowTitle.IndexOf(Names(j)) <> -1 Then
                              ' You do not need to return here or even exit function as
                              ' functions should fall through to the end and then return
                              ' its just better programming
                              lbReturn = True
                        End If
                  Next j
            Next i
      End If
   Return lbReturn
End Function


Regards
Julian Mummery



Please Visit my FREE Bug / Fault Logging Website at FaultLogger.com


QuestionBuiliding A Spreadsheet Application (new project) Pin
Forjat22-Feb-09 5:01
Forjat22-Feb-09 5:01 
AnswerRe: Builiding A Spreadsheet Application (new project) Pin
Mycroft Holmes22-Feb-09 16:27
professionalMycroft Holmes22-Feb-09 16:27 
AnswerRe: Builiding A Spreadsheet Application (new project) Pin
Andy_L_J22-Feb-09 22:40
Andy_L_J22-Feb-09 22:40 
QuestionForms on top of eachother Pin
DCAUB21-Feb-09 23:39
DCAUB21-Feb-09 23:39 
AnswerRe: Forms on top of eachother Pin
ABitSmart22-Feb-09 0:04
ABitSmart22-Feb-09 0:04 
GeneralRe: Forms on top of eachother Pin
DCAUB22-Feb-09 1:31
DCAUB22-Feb-09 1:31 
GeneralRe: Forms on top of eachother Pin
Luc Pattyn22-Feb-09 2:39
sitebuilderLuc Pattyn22-Feb-09 2:39 
GeneralRe: Forms on top of eachother Pin
Dave Kreskowiak22-Feb-09 3:54
mveDave Kreskowiak22-Feb-09 3:54 
QuestionHow to make a visualizer for a media player Pin
TheMrProgrammer21-Feb-09 23:33
TheMrProgrammer21-Feb-09 23:33 
AnswerRe: How to make a visualizer for a media player Pin
Dave Kreskowiak22-Feb-09 4:03
mveDave Kreskowiak22-Feb-09 4:03 
GeneralRe: How to make a visualizer for a media player Pin
TheMrProgrammer23-Feb-09 21:12
TheMrProgrammer23-Feb-09 21:12 
GeneralRe: How to make a visualizer for a media player Pin
Dave Kreskowiak24-Feb-09 1:48
mveDave Kreskowiak24-Feb-09 1:48 
GeneralRe: How to make a visualizer for a media player Pin
TheMrProgrammer25-Feb-09 1:01
TheMrProgrammer25-Feb-09 1:01 
GeneralRe: How to make a visualizer for a media player Pin
Dave Kreskowiak25-Feb-09 2:05
mveDave Kreskowiak25-Feb-09 2:05 
QuestionAttach extra dll when publishing a project Pin
DCAUB21-Feb-09 23:33
DCAUB21-Feb-09 23:33 
AnswerRe: Attach extra dll when publishing a project Pin
Dave Kreskowiak22-Feb-09 3:51
mveDave Kreskowiak22-Feb-09 3:51 
GeneralRe: Attach extra dll when publishing a project Pin
DCAUB22-Feb-09 4:10
DCAUB22-Feb-09 4:10 

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.