-
Dec 31st, 2007, 02:05 AM
#1
Thread Starter
Frenzied Member
[2.0] Drawing on another application
My question is similar to this thread:
http://vbforums.com/showthread.php?t=498183
Actually, my question for this thread was asked as the last post of that thread, but no one really answered it and it's best to not hijack a thread, I guess.
As of right now, I wrote an application that will automatically redraw the image given pixel by pixel, but is way too slow and takes large images many, many images which is unacceptable. You can see the code I have written here:
http://rafb.net/p/zwj94m91.html
Anyways, I was hoping to think of a more "hacking" solution into doing this. Could I simply just not draw onto the canvas? Well, of course I can, but it is not actually drawn on. It is just visually there and right when I click away or move the window, it disappears.
My question for this thread: Is there a way to possibly "hook" into the WM_PAINT message handler and actually have the program draw the image as if it was drawn onto the screen using the mouse.
Would such a thing be possible? I got stimulating mouse clicks to redraw the image working properly but it is just too slow. I need a way of just pasting the image onto the canvas and having the program think it was actually drawn on there using a mouse or something of the sort and have it stick.
Any ideas? Thanks
Last edited by Fromethius; Jan 1st, 2008 at 06:30 PM.
-
Jan 1st, 2008, 06:27 PM
#2
Re: [2.0] Drawing on another application
404 error on your link.
Is this for your app or are you automating some other app?
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
-
Jan 1st, 2008, 06:29 PM
#3
Thread Starter
Frenzied Member
Re: [2.0] Drawing on another application
Yea rafb takes down pastes after a couple days of inactivity I guess. I'll just re upload.
http://rafb.net/p/zwj94m91.html
And I'm trying to automate some other app.
-
Jan 1st, 2008, 06:31 PM
#4
Re: [2.0] Drawing on another application
Well if you are trying to automate some other app then to interect its messages you will need to use of Moeurs C++ dll to do it. Search Code Bank.NET for it. That will get you farther and probably better performance.
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
-
Jan 1st, 2008, 06:31 PM
#5
Thread Starter
Frenzied Member
Re: [2.0] Drawing on another application
Can I use a C++ DLL with a C# application?
-
Jan 1st, 2008, 06:33 PM
#6
Re: [2.0] Drawing on another application
Yes, as you just need to add the reference I believe. The instructions are all in Moeurs thread.
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
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
|