win7无法打开查看.hlp帮助文件解决办法

在计算机上运行 Windows Vista、 Windows 7、 Windows Server 2008 中或 Windows Server 2008 R2,您可能无法打开帮助文件 (.hlp) 需要 Windows 帮助 (WinHlp32.exe) 计划的。
Microsoft 已停止包括 32 位帮助文件查看器在开始与 Windows Vista 和 Windows Server 2008 的 Windows 版本中。若要支持客户仍依赖于传统的.hlp 文件,Microsoft 下载中心提供 WinHlp32.exe 下载 Windows Vista、 Windows 7、 Windows Server 2008 和 Windows Server 2008 R2。

下载并安装KB917607补丁即可解决:
32位win7:
http://download.microsoft.com/download/9/A/8/9A8FCFAA-78A0-49F5-8C8E-4EAE185F515C/Windows6.1-KB917607-x86.msu

64位win7:
http://download.microsoft.com/download/9/A/8/9A8FCFAA-78A0-49F5-8C8E-4EAE185F515C/Windows6.1-KB917607-x64.msu

Posted in 杂七杂八 at December 23, 2015. by 傻猫 .    Views: 2491    No Comments

excel 汉字转换成拼音

1、打开EXCEL
2、按 ALT+F11 ,点击插入-插入模块,在右面窗口中粘贴下面代码,直接关闭窗口
3、输入公式=hztopy(A1),填充所有单元格
4、选中所有缩写,复制-选择性粘贴-数值(因为是自定义函数,只有在当前文件中可以显示结果,其他电脑因没有公式而显示错误)

下面这个函数是将汉字转换了简拼,只取首字母
Function hztopy(hzpy As String) As String
Dim hzstring As String, pystring As String
Dim hzpysum As Integer, hzi As Integer, hzpyhex As Integer
hzstring = Trim(hzpy)
hzpysum = Len(Trim(hzstring))
pystring = ""
For hzi = 1 To hzpysum
hzpyhex = "&H" + Hex(Asc(Mid(hzstring, hzi, 1)))
Select Case hzpyhex
Case &HB0A1 To &HB0C4: pystring = pystring + "A"
Case &HB0C5 To &HB2C0: pystring = pystring + "B"
Case &HB2C1 To &HB4ED: pystring = pystring + "C"
Case &HB4EE To &HB6E9: pystring = pystring + "D"
Case &HB6EA To &HB7A1: pystring = pystring + "E"
Case &HB7A2 To &HB8C0: pystring = pystring + "F"
Case &HB8C1 To &HB9FD: pystring = pystring + "G"
Case &HB9FE To &HBBF6: pystring = pystring + "H"
Case &HBBF7 To &HBFA5: pystring = pystring + "J"
Case &HBFA6 To &HC0AB: pystring = pystring + "K"
Case &HC0AC To &HC2E7: pystring = pystring + "L"
Case &HC2E8 To &HC4C2: pystring = pystring + "M"
Case &HC4C3 To &HC5B5: pystring = pystring + "N"
Case &HC5B6 To &HC5BD: pystring = pystring + "O"
Case &HC5BE To &HC6D9: pystring = pystring + "P"
Case &HC6DA To &HC8BA: pystring = pystring + "Q"
Case &HC8BB To &HC8F5: pystring = pystring + "R"
Case &HC8F6 To &HCBF9: pystring = pystring + "S"
Case &HCBFA To &HCDD9: pystring = pystring + "T"
Case &HEDC5: pystring = pystring + "T"
Case &HCDDA To &HCEF3: pystring = pystring + "W"
Case &HCEF4 To &HD1B8: pystring = pystring + "X"
Case &HD1B9 To &HD4D0: pystring = pystring + "Y"
Case &HD4D1 To &HD7F9: pystring = pystring + "Z"
Case Else
pystring = pystring + Mid(hzstring, hzi, 1)
End Select
Next
hztopy = pystring
End Function

查看更多内容...

Posted in 杂七杂八 at December 23, 2015. by 傻猫 .    Views: 3677    No Comments

如何将Bitmap位图与base64字符串相互转换

先引用delphi自带的单元
uses EncdDecd;

然后就可以使用下面二个函数了:

///将Bitmap位图转化为base64字符串
function BitmapToString(img:TBitmap):string ;
var
ms:TMemoryStream;
ss:TStringStream;
s:string;
begin
ms := TMemoryStream.Create;
img.SaveToStream(ms);
ss := TStringStream.Create('');
ms.Position:=0;
EncodeStream(ms,ss);//将内存流编码为base64字符流
s:=ss.DataString;
ms.Free;
ss.Free;
result:=s;
end;

///将base64字符串转化为Bitmap位图
function StringToBitmap(imgStr:string):TBitmap;
var ss:TStringStream;
ms:TMemoryStream;
bitmap:TBitmap;
begin
ss := TStringStream.Create(imgStr);
ms := TMemoryStream.Create;
DecodeStream(ss,ms);//将base64字符流还原为内存流
ms.Position:=0;
bitmap := TBitmap.Create;
bitmap.LoadFromStream(ms);
ss.Free;
ms.Free;
result :=bitmap;
end;

Posted in 软件开发 at December 11, 2015. by 傻猫 .    Views: 2371    No Comments