Solved

porting dll's

Posted on 2002-06-12
4
161 Views
Last Modified: 2010-05-02
ive got a program that works in winxp and win2k. it used some of the dll's of these OS.
i want to port it to Win98 but it doesent have the required dll's
any ideas
0
Comment
Question by:shaikh1024
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 45

Expert Comment

by:aikimark
ID: 7072726
If the top-most form is visible to the user, then how would they see what/where they want to click on the overlayed form?
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7072732
aikimark, please have some imagination: it could be a game where the user has to try to point it's mouse to a "hidden" place...
0
 

Expert Comment

by:angel71
ID: 7072893
Can't give you a solution, only some hints which might help you:
- catch the mouseevents on the top form and raise an event
- in the even handler (could be a form or a controling class) find out what at what location the cursor is at the top most form and call the thing which is at the form underneath.
Good luck!



0
 
LVL 45

Accepted Solution

by:
aikimark earned 100 total points
ID: 7074628
As far as I can tell, you are going to need the setcursor and mouse_event APIs.  If you capture the X,Y coordinates of the user click, you can position the mouse and click the mouse with code.  If you have four forms, you can tile them to appear as one until the click.  Then 'move' them aside ever so slightly so you can point-and-click the mouse on the underlying form.

I thought about solving this problem setting the overlaying form as TopMost (yet another API), but I don't think it will work.

=======================================
Some of the APIs you might need:

Private Type POINTAPI
    x As Long
    y As Long
End Type
Private Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type

Private Const MOUSEEVENTF_ABSOLUTE = &H8000 ' absolute move
Private Const MOUSEEVENTF_LEFTDOWN = &H2 ' left button down
Private Const MOUSEEVENTF_LEFTUP = &H4 ' left button up
Private Const MOUSEEVENTF_MOVE = &H1 ' mouse move
Private Const MOUSEEVENTF_MIDDLEDOWN = &H20
Private Const MOUSEEVENTF_MIDDLEUP = &H40
Private Const MOUSEEVENTF_RIGHTDOWN = &H8
Private Const MOUSEEVENTF_RIGHTUP = &H10

Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Private Declare Function GetMessageExtraInfo Lib "user32" () As Long
Public Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Const SM_CXSCREEN = 0 'X Size of screen
Const SM_CYSCREEN = 1 'Y Size of Screen

Private Sub Click(p As POINTAPI)
'p.X and p.Y in absolute coordinates
'Put the mouse on the point

   mouse_event MOUSEEVENTF_ABSOLUTE Or MOUSEEVENTF_MOVE, p.x, p.y, 0, GetMessageExtraInfo()
   'Mouse Down
   mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, GetMessageExtraInfo()
   'Mouse Up
   mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, GetMessageExtraInfo()

End Sub
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA: perform index match based on config sheet with two additional parameters. 9 69
Copy a row 12 69
how to know if my Checkbox is True in VB6.0? 9 65
VB6 ListBox Question 4 56
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question