Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


FindWindow error: EntryPointNotFoundException

FindWindow error: EntryPointNotFoundException

FindWindow error: EntryPointNotFoundException

Hello, I use vb.net 2005 to create a Form. Suppose the class name is Form1.vb.
And I try to find the handle of the Form in the code Form1.vb.


Private Declare Function FindWindow Lib "User32" Alias "FindWindow" (ByVal pClassName as String, ByVal pWindowName as String) as Long
' ------- many code
Dim retval As Long
retval = FindWindow("WindowsForms10.Window.8.app.0.3ce0bb8",vbNullString)
The string for the class name "WindowsForms10.Window.8.app.0.3ce0bb8" was gotten from the tool WinSpy++. Because I don't know what is the proper name for pWindowName, so I used vbNullString.
But an exception was thrown.


{"Unable to find an entry point named 'FindWindow' in DLL 'User32'.":""}

Can somebody guide me a right direction?

Many thanks.

RE: FindWindow error: EntryPointNotFoundException

Not that I'm an expert on .NET, but does not the form1.vb have a "Handle". I know in 6.0 it is me.hwnd and in 2k8 it is me.handle. Is it not the same for 2k5 (I don't have a machine it is installed on at the moment).

Good Luck


RE: FindWindow error: EntryPointNotFoundException

There are FindWindowA and FindWindowW (for Unicode) true entry points for FindWindow generic API name.
May be it helps...

RE: FindWindow error: EntryPointNotFoundException

From VB6.0 API Viewer...

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Good Luck


RE: FindWindow error: EntryPointNotFoundException

Thank you.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close