Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
MS-Outlook Alert Killer sub program
Author:
Krishna
E-mail:
Click to e-mail author
Submitted:
8/2/2006
Version:
VB6
Compatibility:
VB6
Category:
Security
Views:
10083
This program is to disable the Outlook alert "A program is accessing ur e-mail addresses stored in Outlook"...Will be killed within 2 mins without interruption of user using sendkeys.... U can reduce time from 2 mins---Xmins/Secs by modifying code
Declarations:
Private Declare Function ShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" (ByVal hWnd As Long, _ ByVal lpOperation As String, ByVal lpFile As String, _ ByVal lpParameters As String, ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Dim End_Time As Integer
Code:
Private Sub Form_Load() End_Time = 0 On Error Resume Next Dim i As Integer Dim LRETVAL Dim oShell As Object Dim oRecord Dim strFileToLaunch Set oShell = CreateObject("WScript.Shell") a: oShell.AppActivate ("xxx") Do While (oShell.AppActivate("Microsoft Outlook") = False) ' If window not found sleep for 100 secs---(i.e)1 min 40 Secs.... i = 0 While (i <= 12) Sleep 10000 i = i + 1 Wend Loop oShell.AppActivate "Microsoft Outlook" oShell.SendKeys "{TAB}" oShell.SendKeys "{TAB}" oShell.SendKeys "{TAB}" oShell.SendKeys " ", True oShell.SendKeys "{TAB}" oShell.SendKeys "{DOWN}" oShell.SendKeys "{DOWN}" oShell.SendKeys "{DOWN}" oShell.SendKeys "{TAB}" oShell.SendKeys "{TAB}" oShell.SendKeys "{ENTER}" GoTo a: End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement