Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabling Start Menu VB to VFP
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Disabling Start Menu VB to VFP
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Oracle
Miscellaneous
Thread ID:
01074789
Message ID:
01074789
Views:
54
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
Next
Reply
Map
View

Click here to load this message in the networking platform