| | |
What is "Private Declare Function ....."?
![]() |
visualbasic Syntax (Toggle Plain Text)
Private Declare Function Function_Name Lib "user32" () As Datatype
I've found such lines used in many VB6 projects and tutorials.
What is it? What actually is this used for? Are there more such function? How to find out more such function/properties?
A detail explanation will be helpful and highly appreciated.
Thank you.
(Is it calling read-only or some library functions or properties?)
Last edited by RahulV; Mar 9th, 2009 at 4:06 pm.
•
•
•
•
visualbasic Syntax (Toggle Plain Text)
Private Declare Function Function_Name Lib "user32" () As Datatype
I've found such lines used in many VB6 projects and tutorials.
What is it? What actually is this used for? Are there more such function? How to find out more such function/properties?
A detail explanation will be helpful and highly appreciated.
Thank you.
(Is it calling read-only or some library functions or properties?)
You can get references for any external libraries online if you use the right search terms. Here is a refererence for user32.dll as used in your statement. Another popular library to reference is shell32.dll.
Last edited by SlyMaelstrom; Mar 9th, 2009 at 5:56 pm.
•
•
Join Date: Mar 2009
Posts: 807
Reputation:
Solved Threads: 147
Otherwise known as API. Application Programming Interface. If you have VB 6.0 SP?, then you can access the API view via the vb interface or design environment buy the menu item Add-Ins...
Click on Add-Ins and if you do not see an entry in the sub menu that says API Viewer then goto Add-In Manager.
It takes a moment for it to come up but look for the entry in the list that says VB 6 API Viewer.
Highlight it and then check the checkbox that says Loaded/Unloaded. (My option is to also check the Load On Startup)
Click OK.
Now, go back to the menu item, Add-Ins, and you should now see an entry for API Viewer in the sub menu.
Select it.
In a moment another dialog appears.
Goto File>Load Text File.
The Common dialog open appears and you should see three files listed.
Select WIN32API.TXT
In a moment it should load with API declarations, constants, and types that you can use to extend the functionality of your program.
Good Luck
Click on Add-Ins and if you do not see an entry in the sub menu that says API Viewer then goto Add-In Manager.
It takes a moment for it to come up but look for the entry in the list that says VB 6 API Viewer.
Highlight it and then check the checkbox that says Loaded/Unloaded. (My option is to also check the Load On Startup)
Click OK.
Now, go back to the menu item, Add-Ins, and you should now see an entry for API Viewer in the sub menu.
Select it.
In a moment another dialog appears.
Goto File>Load Text File.
The Common dialog open appears and you should see three files listed.
Select WIN32API.TXT
In a moment it should load with API declarations, constants, and types that you can use to extend the functionality of your program.
Good Luck
![]() |
Similar Threads
- Get errors by using "friend function" (C++)
- can"t find entry point error 453 (Visual Basic 4 / 5 / 6)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: checking input data using checkinput() function
- Next Thread: How to di this....
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





