Program ' form
Option Explicit
Private Sub Form_Load ()
DIM ret as Long
' Record the original window program address
Prewinproc = GetWindowLong (Me.hwnd, GWL_WNDPROC)
' Replace the original window program with a custom program
ret = SetWindowLong
Public Declare Function attachconsole Lib "Kernel32.dll" (ByVal ProcessID as Integer) as BooleanA parameter is the process ID. To implement an attachment, you must provide its process ID, which requires a very complex process. Now, then, please
Private const socket_error as long =-1Private const max_wsade133 = 256Private const max_wsasysstatus = 128Private const error_success as long = 0Private const ws_version_reqd as long = & H101Private const min_sockets_reqd as long = 1Private const ws_
The method of creating a transparent bitmap is widely seen on the internet. Most of them use a Mask image in advance. The advantage of this method is that it is fast, but it is too troublesome and has poor flexibility.It is often used to specify
VB6 Code:Private Declare Function isuseranadmin Lib "Shell32" Alias "#680" () as Integerprivate Sub Form_Load () If isuseranadmin () = 0 Thenmsgbox "not admin" elsemsgbox "admin" End IfEnd Sub Get Windows OS version information:Option
Set (. ini) when there are too many rows.
You can use these two methods to save them.Joint Venture,When there is a lack of legal support, there is a lack of legal support.Please wait, set (. ini) Please try again later, so that many users may think
A very useful module for reading and writing INI files in VB6New module (registry not recommended) named rwiniThe INI file may encounter an error when there is a carriage return or line break. After testing, the number of Chinese characters must be
Like the example found on the internet, here is just a more specific point of writing the code in Form
'-----------------------------------------'Code in the module is as follows:'-----------------------------------------Option Explicit
Public
My specific ideas are as follows:
Write two programs, one is the main program, and the other is the Upgrade Program (the Upgrade Program is placed on the server );
Note: All upgrade tasks are completed by the upgrade procedure.
1. Start the Upgrade
'Lele1
Option explicit
Public declare function setwindowlong lib "USER32" alias "setwindowlonga" (byval hwnd as long, byval nindex as long, byval dwnewlong as long) as longPublic declare function callwindowproc lib "USER32" alias "callwindowproca"
Loadmenu:
Hmenu loadmenu (hinstance, // handle to module lpctstr lpmenuname // menu name or resource identifier );
The parameter lpmenuname is generated using makeintresource, while
# Define makeintresourcea (I) (lpstr) (DWORD) (Word) (I) # define
1. For a string, if it is an lpctstr string, use byval! Otherwise, it may only be cstring. This type of VB cannot be processed! In addition, there is no string type in VC.
2. For the type [in] defined by the VB system, if the API is a pointer, is it
Option explicit
Private declare function createpipe lib "Kernel32" (phreadpipe as long, phwritepipe as long, lppipeattributes as security_attributes, byval nsize as long) as long
Private declare function readfile lib "Kernel32" (byval hfile as long,
Pixel acquisition and output in VB Image Processing
Author: Region nameSource: InterNetTime added: 2005-1-28
To process an image, first obtain the pixel value of the image. Although the PICTURE control provided
Always want to write an image processing of their own software. On the network to find a variety of image processing technology articles.
But find often not advanced theory, is to use C + + and other languages written out of the routine, very
' Add a module to project and add the following code to it:Option ExplicitType Large_integerLowPart as LongHighpart as LongEnd TypePublic Declare Function QueryPerformanceCounter Lib "Kernel32" _(Lpperformancecount as Large_integer) As LongPublic
Programming preface
Hooks in Windows systems are powerful enough to intercept, monitor, and process messages in almost all Windows systems. This technology can be widely used in various software, especially the software that needs monitoring,
VB itself does not allow you to copy the entire picture on a form, UserControl, or PictureBox to the Clipboard. If you use Clipboard.setdata, only the bitmap that is loaded into this object will be copied. By using the API method, you can go beyond
Relatively speaking, it's not hard, we don't need a decoder to get every byte of jpg, or anything like that, instead, we'll use a picture frame to open a picture and then upload it to the surface, but first we need to declare the API function:
1, using the API method
Copy Code code as follows:
' Type declaration '
Private Type Browseinfo
hWndOwner as Long
Pidlroot as Long
pszDisplayName as Long
Lpsztitle as Long
Ulflags as Long
Lpfncallback as Long
LParam as Long
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.