|
-
Apr 30th, 2009, 01:54 PM
#1
Thread Starter
Hyperactive Member
Change "Type" from vb6 to vb9
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
-
Apr 30th, 2009, 01:56 PM
#2
Re: Change "Type" from vb6 to vb9
-
Apr 30th, 2009, 01:56 PM
#3
Re: Change "Type" from vb6 to vb9
So whats the problem exactly, or do you mean you have this code you want someone else to convert for you
-
Apr 30th, 2009, 02:14 PM
#4
Thread Starter
Hyperactive Member
Re: Change "Type" from vb6 to vb9
I need somone to convert cause im kinda convused... u have to use structure? or just declare the stuff?
Tnx
-
Apr 30th, 2009, 02:15 PM
#5
Re: Change "Type" from vb6 to vb9
Type should be Class, in this case.
My usual boring signature: Nothing
 
-
Apr 30th, 2009, 02:15 PM
#6
Thread Starter
Hyperactive Member
Re: Change "Type" from vb6 to vb9
Tnx half btw
-
Apr 30th, 2009, 02:16 PM
#7
Re: Change "Type" from vb6 to vb9
Ah, we crossed up. Since you want to be passing a pointer to an object of the correct type, I think a class would make most sense, as it is a reference type. The Longs should be changed to Integer, since the Long was 32 bits in VB6, while the Integer is 32 bits in .NET.
My usual boring signature: Nothing
 
-
Apr 30th, 2009, 02:18 PM
#8
Thread Starter
Hyperactive Member
Re: Change "Type" from vb6 to vb9
Got it Tnx Shaggy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|