Problem with Sleep API declaration
Problem with Sleep API declaration
Problem with Sleep API declaration
Problem with Sleep API declaration
Problem with Sleep API declaration
Problem with Sleep API declaration Problem with Sleep API declaration Problem with Sleep API declaration Problem with Sleep API declaration Problem with Sleep API declaration Problem with Sleep API declaration Problem with Sleep API declaration Problem with Sleep API declaration
Problem with Sleep API declaration Problem with Sleep API declaration
Problem with Sleep API declaration
Go Back  Xtreme Visual Basic Talk > > > Problem with Sleep API declaration


Reply
 
Thread Tools Display Modes
  #1  
Old 06-14-2015, 07:13 AM
fcrotto fcrotto is offline
Newcomer
 
Join Date: Jun 2015
Posts: 1
Question Problem with Sleep API declaration


Hi,
I've tryed the Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) everywhere inside my module but I haven't been able to get past the "Only comments may appear after End Sub, End Function, or End Property" message I get.

Would you help me out with this?

Thanks in advance
Same issues as described in the following thread sleep API problem

Last edited by passel; 06-15-2015 at 11:08 AM.
Reply With Quote
  #2  
Old 06-15-2015, 11:04 AM
passel's Avatar
passelProblem with Sleep API declaration passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,026
Default

Are you actually putting it in a Module?
It should be right at the top of the module (know as the declarations area), before any other subs or functions.
Here is the first few lines at the top of my Module1.bas file and it works fine.
Code:
Option Explicit

Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Problem with Sleep API declaration
Problem with Sleep API declaration
Problem with Sleep API declaration Problem with Sleep API declaration
Problem with Sleep API declaration
Problem with Sleep API declaration
Problem with Sleep API declaration Problem with Sleep API declaration Problem with Sleep API declaration Problem with Sleep API declaration Problem with Sleep API declaration Problem with Sleep API declaration Problem with Sleep API declaration
Problem with Sleep API declaration
Problem with Sleep API declaration
 
Problem with Sleep API declaration
Problem with Sleep API declaration
 
-->