Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

porting dll's

Posted on 2002-06-12
4
Medium Priority
?
166 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 46

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 46

Accepted Solution

by:
aikimark earned 300 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

636 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