Sign in to follow this  
Followers 0
Hybrid

The-Big-B project - Need your help!

3 posts in this topic

Hello guys and gals

I need your help for my project called The-Big-B

This project...will be a tool,which will help blind peeps

I have a friend, which needs to use magnifier at x600 sometimes x800

I want to help him,cuz he is young and he enjoy pcs

First, I need an idea, on how to do this project

magnifing the whole screen? Give me some ideas and after that, we start building it

Regards,

Hybrid

Share this post


Link to post
Share on other sites



Hybrid,

That sounds like an interesting project. Here is a small magnifying script I wrote a while ago that might give you some ideas: :)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <WinAPI.au3>
#include <Misc.au3>

Opt("GUICloseOnESC", 0)

HotKeySet("{ESC}", "On_Exit")

Global $hMag_GUI, $hMagDC, $hDeskDC, $hPen, $oObj, $aMouse_Pos[2], $iLast_Mouse_X = 0, $iLast_Mouse_Y = 0

; Create GUI
$hMag_Win = GUICreate("MAG", 100, 100, 0, 0, $WS_POPUP)
GUISetState(@SW_SHOW, $hMag_Win)
$hMag_GUI = WinGetHandle("MAG")
; Get device context for Mag GUI
$hMagDC = _WinAPI_GetDC($hMag_GUI)
If @error Then Exit
; Get device context for desktop
$hDeskDC = _WinAPI_GetDC(0)
If @error Then
    _WinAPI_ReleaseDC($hMag_GUI, $hMagDC)
    Exit
EndIf
; Create pen
$hPen = _WinAPI_CreatePen($PS_SOLID, 5, 0x7E7E7E)
$oObj = _WinAPI_SelectObject($hMagDC, $hPen)


While 1
    ; Check if cursor has moved
    $aMouse_Pos = MouseGetPos()
    If $aMouse_Pos[0] <> $iLast_Mouse_X Or $aMouse_Pos[1] <> $iLast_Mouse_Y Then
        ; Redraw Mag GUI
        Loupe($aMouse_Pos)
        ; Reset position
        $iLast_Mouse_X = $aMouse_Pos[0]
        $iLast_Mouse_Y = $aMouse_Pos[1]
    EndIf
WEnd

Func On_Exit()

    ; Clear up Mag GUI
    _WinAPI_SelectObject($hMagDC, $oObj)
    _WinAPI_DeleteObject($hPen)
    _WinAPI_ReleaseDC(0, $hDeskDC)
    _WinAPI_ReleaseDC($hMag_GUI, $hMagDC)
    GUIDelete($hMag_GUI)

    Exit

EndFunc   ;==>On_Exit

Func Loupe($aMouse_Pos)

    Local $iX, $iY

    ; Fill Mag GUI with 5x expanded contents of desktop area (10 pixels around mouse)
    DllCall("gdi32.dll", "int", "StretchBlt", _
        "int", $hMagDC,  "int", 0,                   "int", 0,                   "int", 100, "int", 100, _
        "int", $hDeskDC, "int", $aMouse_Pos[0] - 10, "int", $aMouse_Pos[1] - 10, "int",  20, "int",  20, _
        "long", $SRCCOPY)

    ; Keep Mag GUI on screen
    If $aMouse_Pos[0] < (@DesktopWidth - 120) Then
        $iX = $aMouse_Pos[0] + 20
    Else
        $iX = $aMouse_Pos[0] - 120
    EndIf
    If $aMouse_Pos[1] < (@DesktopHeight - 150) Then
        $iY = $aMouse_Pos[1] + 20
    Else
        $iY = $aMouse_Pos[1] - 120
    EndIf
    WinMove($hMag_GUI, "", $iX, $iY, 100, 100)

EndFunc   ;==>Loupe

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Thank you melba

i will look tomorrow into it bcuz im on my phone..dont have enough time

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0