Advertisement
| 05.05.2008 at 10:58AM PDT, ID: 23377134 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 05.05.2008 at 11:01AM PDT, ID: 21501738 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: |
The PrevInstance() function is from the helpfile:
Public Class Form3
Inherits System.Windows.Forms.Form
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If PrevInstance() Then
Application.Exit()
End If
End Sub
Private Function PrevInstance() As Boolean
If UBound(Diagnostics.Process.GetProcessesByName(Diagnostics.Process.GetCurrentProcess.ProcessName)) > 0 Then
Return True
Else
Return False
End If
End Function
End Class
|
| 05.05.2008 at 11:52AM PDT, ID: 21502118 |
| 05.05.2008 at 11:55AM PDT, ID: 21502139 |
| 05.06.2008 at 09:16AM PDT, ID: 21508583 |
| 05.06.2008 at 09:28AM PDT, ID: 21508688 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: |
Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
' ''Try
' '' If PrevInstance() Then
' '' 'Application.Exit()
' '' Else
' '' ' Main.Show()
Dim regKey(1) As Microsoft.Win32.RegistryKey
regKey(0) = My.Computer.Registry.CurrentUser.OpenSubKey("Software\Adobe", False)
regKey(1) = My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\Adobe", False)
Dim paths As New List(Of String)
For idx As Integer = 0 To 1
If regKey(idx) IsNot Nothing Then
paths.AddRange(regKey(idx).GetSubKeyNames())
End If
Next
Dim path As String
Dim installed As Boolean = False
For Each path In paths
If path = "Acrobat Reader" Or path = "Acrobat" Or path = "Adobe Acrobat" Then
installed = True
End If
Next
If regKey(0) IsNot Nothing Then
regKey(0).Close()
End If
If regKey(1) IsNot Nothing Then
regKey(1).Close()
End If
'regKey(0).Close()
'regKey(1).Close()
If installed Then
myTimer = New Timer
myTimer.Interval = 2000
myTimer.Enabled = True
AddHandler myTimer.Tick, AddressOf DoTimerWork
Else
If MessageBox.Show("Adobe Acrobat Reader is not installed, would you like to install now?", "Acrobat Reader", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
System.Diagnostics.Process.Start("Documentation\Setup.exe")
End
Else
myTimer = New Timer
myTimer.Interval = 2000
myTimer.Enabled = True
AddHandler myTimer.Tick, AddressOf DoTimerWork
End If
End If
' '' End If
' ''Catch ex As Exception
' ''End Try
End Sub
|
| 05.06.2008 at 10:07AM PDT, ID: 21509067 |
| 05.06.2008 at 10:45AM PDT, ID: 21509381 |
| 05.06.2008 at 10:58AM PDT, ID: 21509471 |
| 05.06.2008 at 11:06AM PDT, ID: 21509534 |
| 05.06.2008 at 11:21AM PDT, ID: 21509633 |
| 05.08.2008 at 01:54PM PDT, ID: 21528383 |
| 05.08.2008 at 02:32PM PDT, ID: 21528655 |
| 05.08.2008 at 02:51PM PDT, ID: 21528774 |
| 05.08.2008 at 02:53PM PDT, ID: 21528795 |
| 05.08.2008 at 03:42PM PDT, ID: 21529073 |
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: |
Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim regKey(1) As Microsoft.Win32.RegistryKey
regKey(0) = My.Computer.Registry.CurrentUser.OpenSubKey("Software\Adobe", False)
regKey(1) = My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\Adobe", False)
Dim paths As New List(Of String)
For idx As Integer = 0 To 1
If regKey(idx) IsNot Nothing Then
paths.AddRange(regKey(idx).GetSubKeyNames())
End If
Next
Dim path As String
Dim installed As Boolean = False
For Each path In paths
If path = "Acrobat Reader" Or path = "Acrobat" Or path = "Adobe Acrobat" Then
installed = True
End If
Next
If regKey(0) IsNot Nothing Then
regKey(0).Close()
End If
If regKey(1) IsNot Nothing Then
regKey(1).Close()
End If
If installed Then
myTimer = New Timer
myTimer.Interval = 2000
myTimer.Enabled = True
AddHandler myTimer.Tick, AddressOf DoTimerWork
Else
If MessageBox.Show("Adobe Acrobat Reader is not installed, would you like to install now?", "Acrobat Reader", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
System.Diagnostics.Process.Start("Documentation\Setup.exe")
End
Else
myTimer = New Timer
myTimer.Interval = 2000
myTimer.Enabled = True
AddHandler myTimer.Tick, AddressOf DoTimerWork
End If
End If
End Sub
Private Sub DoTimerWork(ByVal sender As Object, ByVal e As System.EventArgs)
' Stops the timer
Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=test.mdb")
Dim reader As OleDbDataReader
myTimer.Enabled = False
conn.Open()
Dim query As String = "SELECT * FROM users"
Dim cmd As OleDbCommand = New OleDbCommand(query, conn)
reader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
If reader.HasRows Then
LoginUser.ShowDialog()
Else
Mainform.Show()
End If
Me.Close()
End Sub
|
| 05.08.2008 at 03:48PM PDT, ID: 21529099 |