|
-
Apr 6th, 2009, 01:59 AM
#1
Thread Starter
Frenzied Member
Problem calling another button function inside timer
Hi all i am using the following timer to close a massage box whenever it pops up in external application. But i want to call another button command after closing that massage box. I placed the call inside the if statment but it never calls command button. could you guys tell me what might be wrong? Thanks
2 Code:
Private Sub Timer1_Timer()
Dim X As Long, editx As Long
Dim button As Long
X = FindWindow("#32770", "Successful")
If X Then
SendMessage X, WM_CLOSE, 0&, 0&
Command2_Click
End If
End Sub
Private Sub Command2_Click()
......
......
msgbox " i have been called ";
.....
.....
End sub
-
Apr 6th, 2009, 02:19 AM
#2
Re: Problem calling another button function inside timer
I placed the call inside the if statment but it never calls command button. could you guys tell me what might be wrong?
I tried it an it works just fine...
1) Does it close the window?
2) Try this
vb Code:
If X Then MsgBox "Closing Window" SendMessage X, WM_CLOSE, 0&, 0& Command2_Click End If
Do you get to see the message box "Closing Window"??? If not you know where the error is
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
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
|