Hey guys I have this code which i used to use in vb6 to flash a window i need to convert it for vb9. Tnx for your help
Code:Private Const FLASHW_STOP = 0 Private Const FLASHW_CAPTION = &H1 Private Const FLASHW_TRAY = &H2 Private Const FLASHW_ALL = (FLASHW_CAPTION Or FLASHW_TRAY) Private Const FLASHW_TIMER = &H4 Private Const FLASHW_TIMERNOFG = &HC Private Type FLASHWINFO cbSize As Long hwnd As Long dwFlags As Long uCount As Long dwTimeout As Long End Type Private Declare Function FindWindowEx Lib "user32.dll" Alias "FindWindowExA" (ByVal hWnd1 As Integer, ByVal hWnd2 As Integer, ByVal lpsz1 As String, ByVal lpsz2 As String) As Integer Private Declare Function FlashWindowEx Lib "user32" (pfwi As FLASHWINFO) As Boolean Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer Dim FlashInfo As FLASHWINFO Dim iHwnd As Integer 'Dim iHwndChild As Integer Private Sub Command1_Click() iHwnd = FindWindow("notepad", vbNullString) 'iHwndChild = FindWindowEx(iHwnd, 0, "Edit", vbNullString) With FlashInfo .cbSize = Len(FlashInfo) .dwFlags = FLASHW_ALL Or FLASHW_TIMER .dwTimeout = 0 .hwnd = iHwnd .uCount = 0 End With FlashWindowEx FlashInfo End Sub





Reply With Quote