-
Apr 6th, 2007, 02:54 PM
#1
Thread Starter
Lively Member
how to make a button click using API's?
hi everybody, i am just trying to play with API's. however i dont have any knowledge about them. but i want to learn. so what i want to do is i want to make a OK button click of a another application from my program. i have downloaded pator jks api spy 51 that let me see the name of the window and the button. but i dont know how to make them click or do anything on the window.
Forgive me if I make mistakes because you know I wear really thick glass and I cannot see things well.
-
Apr 6th, 2007, 04:10 PM
#2
Re: how to make a button click using API's?
You need to use FindWindow to get the main forms window handle. Then use FindWindowEx to drill down the window heirarchy structure to the desired control. Once you have its handle then you can use SendMessage or PostMessage passing the BM_CLICK window message.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
-
Apr 6th, 2007, 04:46 PM
#3
Thread Starter
Lively Member
Re: how to make a button click using API's?
thanks, let me try and if i get any problem, then i will post here back.
Forgive me if I make mistakes because you know I wear really thick glass and I cannot see things well.
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
|