Results 1 to 10 of 10

Thread: Help With API

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,051

    Help With API

    I found this http://msdn2.microsoft.com/en-us/library/aa458041.aspx
    but I haven't got a clue about how to use it.
    I've had very little experience in useing APIs with VB6, and I probably don't remember how to do those now anyway.
    Can someone point me to a location that will show me how to use this API? I need to use the full screen API.

    Thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Help With API

    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,051

    Re: Help With API

    Thanks jm. Actually I did search for quite a while and came up blank. Thanks for coming through again. You're a real help to many of us newbies.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,051

    Re: Help With API

    Ok the following didn't work for me:
    VB Code:
    1. Const SHFS_SHOWTASKBAR As Integer = &H1
    2. Const SHFS_HIDETASKBAR As Integer = &H2
    3. Const SHFS_SHOWSIPBUTTON As Integer = &H4
    4. Const SHFS_HIDESIPBUTTON As Integer = &H8
    5. Const SHFS_SHOWSTARTICON As Integer = &H10
    6. Const SHFS_HIDESTARTICON As Integer = &H20
    7.  
    8. <DllImport("aygshell.dll")>  _
    9. Shared Function SHFullScreen(ByVal hwndRequester As IntPtr, _
    10.   ByVal dwState As Integer) As Integer
    11. End Function
    12.  
    13. <DllImport("coredll.dll")>  _
    14. Public Shared Function GetCapture() As IntPtr
    15. End Function
    16.  
    17. Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
    18.  
    19.    Capture = True
    20.    Dim hwnd As IntPtr = GetCapture()
    21.    Capture = False
    22.  
    23.    SHFullScreen(hwnd, SHFS_HIDESTARTICON)
    24.  
    25. End Sub 'Form1_Load

    The Error I got was:
    "Can't find an entry point 'SHFullscreen' in a Pinvoke DLL 'aygshell.dll'."

    Does that mean the name in the dll is different than "SHFullscreen"?

    Any pointers to a full reference for API calls (beginners style) for Windows Mobile would be appreciated.

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Help With API

    Try changing "aygshell.dll" to "aygshell.lib" and see if that makes a difference.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,051

    Re: Help With API

    I did as you suggested. It returned "Can't find PInvoke DLL 'aygshell.lib'".

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Help With API

    Hmmm... that one was a shot in the dark.

    The doco you linked to says it requires Windows Mobile 2000 or later and Windows CE 3.0 or later. Are you using an older version of either?
    Last edited by jmcilhinney; Feb 24th, 2007 at 06:58 PM.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  8. #8
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Help With API

    Hi,
    full screen shown at http://www.vbforums.com/showthread.php?t=452464

    Are you using PocketPC - I don't think aygshell comes with CE - just PPC. Can you check it is on your device?

    By default, a lot of the system DLLs are hidden. You can see them when
    using the Remote File Viewer or when setting Explorer up to not hide
    anything; otherwise, you don't see them.


    Pete

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Aug 2006
    Posts
    1,051

    Re: Help With API

    Sorry, Been Busy.

    The Version Is Windows Mobile 2003 v 4.21.1088
    So it should have worked, correct?

  10. #10
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Help With API

    Hi,
    as I asked before, have you checked whether aygshell.dll is on your device?

    The version doesn't matter if the dll is not on the device.

    Pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width