Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disabling Start Menu VB to VFP
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Disabling Start Menu VB to VFP
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Oracle
Divers
Thread ID:
01074789
Message ID:
01074789
Vues:
55
Hi Friends

One from disabling windows start button code, needs a conversion to VFP
This small code sample shows how to disable the Start Menu button through code, simply paste it into a BAS module and use : 



'
' Paste this into a Code Mode (BAS)
'
option Explicit
'
private Declare Function FindWindowEx Lib "user32" _
        Alias "FindWindowExA" (byval hWnd1 as Long, byval hWnd2 as Long, _
        byval lpsz1 as string, byval lpsz2 as string) as Long
'
private Declare Function EnableWindow Lib "user32" (byval hwnd as Long, _
        byval fEnable as Long) as Long

public Sub EnableStartMenuButton(byval bEnable as Boolean)
'
' Don't forget to re-enable it !
'
    Dim lHwnd as Long
' 
    lHwnd = FindWindowEx(0&, 0&, "Shell_TrayWnd", vbNullString)
    lHwnd = FindWindowEx(lHwnd, 0&, "Button", vbNullString)
    Call EnableWindow(lHwnd, bEnable)
'
End Sub
--
--
Aashish Sharma
Tele Nos: +1-201-490-5405
Mobile: +91-9821053938
E-Mail:
aashish@aashishsharma.com
write2aashish@gmail.com

You better believe in yourself... if you don't, who else will ?
TODAY is a gift, that's why it's called PRESENT
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform