保存一个工具,以后也许能用上

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/benwdm/article/details/83739093

VclSkin 5.03 Fullsource(源码),谁用谁知道。


VclSkin 5.04己经支持 Delphi2009 ,5.04的源码包可不容易找,就将就着用5.03吧。

 

VCLskin是一个很好用的Delphi,BCB皮肤控件,使用非常简单。而且还有很多皮肤可以下载。

 

展开阅读全文

资料保存:☆读硬盘序列号☆ (也许以后有用)

07-01

#include rn#include rn#include rn#include rn#include rnchar *GetAscii(unsigned int inData[], int offStart, int offEnd);rnint main(void)rnrn unsigned int diskData[256]; /* Disk data */rn unsigned int offset; /* Disk data offset */rn int loop;rn int numDrv; /* Number of IDE hard drives */rn union REGS registers;rn unsigned int biosCyl[2]; /* Cylinders, Heads, Sectors */rn unsigned int biosHead[2];rn unsigned int biosSec [2];rn printf("\nCopyright 2000.02.16 IDESCAN.");rn //printf("\n ");rn numDrv = peekb(0x40, 0x75); /* BIOS Data area, Number of Hard disks */rn for (loop = 0; loop < numDrv; loop++)rn rn while (inp(0x01f7) != 0x50); /* Wait for controller not busy */rn outp(0x01f6, (loop == 0 ? 0xa0 : 0xb0)); /* Get first/second drive */rn outp(0x01f7, 0xec); /* Get drive info data */rn while (inp(0x1f7)!= 0x58); /* Wait for data ready */rn for (offset = 0; offset != 256; offset++) /* Read "sector" */rndiskData[offset] = inpw(0x1f0);rn /* Get BIOS drive info */rn registers.h.ah = 0x08; /* Get drive info */rn registers.h.dl = 0x80 + loop; /* Drive is 80H for Disk 0, 81H for Disk 1 */rn int86(0x13, ®isters, ®isters);rn if (!registers.x.cflag) /* All OK if carry not set */rn rnbiosHead[loop] = registers.h.dh + 1; /* Heads are from 0GetAscii(diskData, 27, 46), */rnbiosSec[loop] = registers.h.cl & 0x3f; /* sec is bits 5 - 0 */rn/* +1 because starts from 0 and +1 for FDISK leaving one out */rnbiosCyl[loop] = ((registers.h.cl & 0xc0) << 2) + registers.h.ch + 2;rn /* end of if */rn printf("\nFIX DRIVE %d:\n", loop);rn printf("Model Number______________________:%s \n",GetAscii(diskData, 27, 46));rn printf("Serial Number_____________________::%s \n", GetAscii(diskData, 10, 19));rn printf("Controller Revision Number________: %s\n", GetAscii(diskData, 23, 26));rn printf("Able to do Double Word Transfer___: %6s\n", (diskData[48] == 0 ? "No" : "Yes"));rn printf("Controller type___________________: %04X\n", diskData[20]);rn printf("Controller buffer size (bytes)____: %6u\n", diskData[21] * 512);rn printf("Number of ECC bytes transferred___: %6u\n", diskData[22]);rn printf("Number of sectors per interrupt___: %6u\n", diskData[47]);rn printf("Hard Disk Reports \n");rn printf("Number of Cylinders (Fixed)_______: %6u\n", diskData[1]);rn printf("Number of Heads___________________: %6u\n", diskData[3]);rn printf("Number of Sectors per Track_______: %6u\n", diskData[6]);rn printf("BIOS Reports\n");rn printf("Number of Cylinders_______________: %6u\n", biosCyl[loop]);rn printf("Number of Heads___________________: %6u\n", biosHead[loop]);rn printf("Number of Sectors per Track_______: %6u\n", biosSec[loop]);rn printf("\n");rn //getch();rn /* end of for */rn return 0;rn /* main() */rnchar *GetAscii(unsigned int inData[], int offStart, int offEnd)rnrn static char retVal[255];rn int loop, loop1;rn for (loop = offStart, loop1 = 0; loop <= offEnd; loop++)rn rn retVal[loop1++] = (char )(inData[loop] / 256); /* Get High byte */rn retVal[loop1++] = (char )(inData[loop] % 256); /* Get Low byte */rn /* end of for */rn retVal[loop1] = '\0'; /* Make sure it ends in a NULL character */rn return retVal;rn /* GetAscii() */ rn rn 论坛

移动控件以后保存 出现的问题!!!

05-29

[code=VB]rn'现在移动 并且保存是正常的。但是有个问题,如果我双击第三个图,rn'然后再双击第四个图,第三个图坐标就会变成第四个的坐标,而与第四个图重叠了,rnrn'这是第三个 的移动保存代码rnPrivate Sub Image3_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)rnIf Button = 1 Thenrn'标示为移动状态rnMoveScreen = Truern'得到鼠标在窗体上的位置(相对与窗体内部坐标)rnMousX = XrnMousY = YrnEnd IfrnEnd SubrnrnPrivate Sub Image3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)rnIf MoveScreen Thenrn'计算新的窗体坐标值rnCurrX = Image3.Left - MousX + XrnCurrY = Image3.Top - MousY + Yrn'移动窗体到新的位置rnImage3.Move CurrX, CurrYrnEnd IfrnText1.Text = CurrXrnText2.Text = CurrYrnEnd SubrnrnPrivate Sub Image3_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)rnMoveScreen = FalsernDim cn As New ADODB.Connectionrn Dim mrc As ADODB.Recordsetrn Dim txtSQL As Stringrn Dim MsgText As Stringrn txtSQL = "UPDATE Sossid SET ClassX = '" & Text1.Text & "' , ClassY ='" & Text2.Text & "' WHERE SoftId = 3"rn RunSQL txtSQL, MsgTextrnEnd Subrnrn'第四个rnPrivate Sub Image4_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)rnIf Button = 1 Thenrn'标示为移动状态rnMoveScreen = Truern'得到鼠标在窗体上的位置(相对与窗体内部坐标)rnMousX = XrnMousY = YrnEnd IfrnEnd SubrnrnPrivate Sub Image4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)rnIf MoveScreen Thenrn'计算新的窗体坐标值rnCurrX = Image4.Left - MousX + XrnCurrY = Image4.Top - MousY + Yrn'移动窗体到新的位置rnImage4.Move CurrX, CurrYrnEnd IfrnText1.Text = CurrXrnText2.Text = CurrYrnEnd SubrnrnPrivate Sub Image4_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)rnMoveScreen = FalsernDim cn As New ADODB.Connectionrn Dim mrc As ADODB.Recordsetrn Dim txtSQL As Stringrn Dim MsgText As Stringrn txtSQL = "UPDATE Sossid SET ClassX = '" & Text1.Text & "' , ClassY ='" & Text2.Text & "' WHERE SoftId = 4"rn RunSQL txtSQL, MsgTextrnEnd Subrn[/code] 论坛

没有更多推荐了,返回首页