Windows API 函数助手, 欢迎下载。 (200分)

  • 主题发起人 leejames
  • 开始时间
L

leejames

Unregistered / Unconfirmed
GUEST, unregistred user!
为方便大家学习使用WindowsAPI,做了个小玩意,不知合不合用,请大家试试。<br><br>下载地址: http://www.2ccc.com/ &nbsp;(DELPHI盒子)<br><br>主要代码已贴在下面。
 
哈哈,已经下了<br>不过没有原代码,原代码应该一起给
 
好象打不开呀
 
试用中。。。
 
下载了一个,指示没有实例
 
还8错嘛。方便!
 
现在还下不了,回家再下吧!
 
补充一下: 如果是win98、me,因要通过ADO访问Access,可能要安装ms jet4.0以上<br>版本,win2000以上就不用了。<br><br>MDAC2.7简体中文版下载地址http://download.microsoft.com/download/dasdk/Install/2.70/W98NT42KMe/CN/mdac_typ.exe <br><br>Jet4.0下载地址 http://aspxcn.com/download/jet.rar <br><br>源码非常少,主要部分稍后我会在这里贴出。<br>
 
刚下的<br>还没开始用呢
 
挺方便的~<br>好人哪~ &nbsp; &nbsp;<br><br>:P<br>
 
多谢上面兄弟的支持:)<br><br>主要代码如下:<br><br>1、通过ADO连接Access库(ADOConnection-&gt;ADODateSet-&gt;DataSource-&gt;DBGridEh)<br>const<br>&nbsp; ConnStr: string =<br>&nbsp; &nbsp; 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s' +<br>&nbsp; &nbsp; ';Persist Security Info=False';<br>procedure TMainForm.FormCreate(Sender: TObject);<br>begin<br>&nbsp; ADOConnection.ConnectionString := Format(ConnStr,<br>&nbsp; &nbsp; [ExtractFileDir(Application.ExeName)+'/WinAPI.MDB']);<br>&nbsp; ADOConnection.Open;<br>&nbsp; ADODataSet.Open;<br>end;<br><br>2、查找函数<br>procedure TMainForm.EdFuncNameChange(Sender: TObject);<br>begin<br>&nbsp; if (EdFuncName.Text = '') or<br>&nbsp; &nbsp; (EdFuncName.Text = '%') then<br>&nbsp; begin<br>&nbsp; &nbsp; ADODataSet.Filtered := False;<br>&nbsp; &nbsp; Exit;<br>&nbsp; end;<br>&nbsp; ADODataSet.Filtered := False;<br>&nbsp; ADODataSet.Filter := '函数名 like ' +<br>&nbsp; &nbsp; QuotedStr(EdFuncName.Text + '%');<br>&nbsp; ADODataSet.Filtered := True;<br>end;<br><br>3、修改、查看函数详细资料<br>procedure TMainForm.DBGridEhDblClick(Sender: TObject);<br>begin<br>&nbsp; if ADODataSet.IsEmpty then<br>&nbsp; &nbsp; Exit;<br>&nbsp; { FunctionInfo 记录在另一窗体单元定义,用在Form间传递数据。请看后面}<br>&nbsp; FunctionInfo.Name := ADODataSet.FieldByName('函数名').AsString;<br>&nbsp; FunctionInfo.Explain := ADODataSet.FieldByName('函数说明').AsString;<br>&nbsp; FunctionInfo.Example := ADODataSet.FieldByName('详细说明').AsString;<br>&nbsp; FunctionInfo.SurpportWin16 := ADODataSet.FieldByName('Win16支持').AsBoolean;<br>&nbsp; FunctionInfo.SurpportWin9x := ADODataSet.FieldByName('Win9x支持').AsBoolean;<br>&nbsp; FunctionInfo.SurpportWinNT := ADODataSet.FieldByName('WinNT支持').AsBoolean;<br><br>&nbsp; { ShowFuncInfoForm 函数在另一窗体单元定义,请看后面}<br>&nbsp; if ShowFuncInfoForm(FunctionInfo) = mrOk then<br>&nbsp; begin<br>&nbsp; &nbsp; ADODataSet.Edit;<br>&nbsp; &nbsp; ADODataSet.FieldByName('函数名').AsString := FunctionInfo.Name;<br>&nbsp; &nbsp; ADODataSet.FieldByName('函数说明').AsString := FunctionInfo.Explain;<br>&nbsp; &nbsp; ADODataSet.FieldByName('详细说明').AsString := FunctionInfo.Example;<br>&nbsp; &nbsp; ADODataSet.FieldByName('Win16支持').AsBoolean := FunctionInfo.SurpportWin16;<br>&nbsp; &nbsp; ADODataSet.FieldByName('Win9x支持').AsBoolean := FunctionInfo.SurpportWin9x;<br>&nbsp; &nbsp; ADODataSet.FieldByName('WinNT支持').AsBoolean := FunctionInfo.SurpportWinNT;<br>&nbsp; &nbsp; ADODataSet.Post;<br>&nbsp; end;<br>end;<br><br>4、添加函数<br>&nbsp; 参考3(前面判断数据集为空那句就不要了),先清空FunctionInfo,然后 <br>&nbsp; if ShowFuncInfoForm(FunctionInfo) = mrOk then <br>&nbsp; begin<br>&nbsp; &nbsp; ADODataSet.Append;<br>&nbsp; &nbsp; ADODataSet.FieldByName('函数名').AsString := FunctionInfo.Name;<br>&nbsp; &nbsp; ....<br>&nbsp; &nbsp; ADODataSet.Post;<br>&nbsp; end;<br><br>5、函数信息窗体<br>unit FuncInfoFrm;<br>interface<br>type<br>&nbsp; TFunctionInfo = record<br>&nbsp; &nbsp; Name: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; string;<br>&nbsp; &nbsp; Explain: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;string;<br>&nbsp; &nbsp; Example: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;string;<br>&nbsp; &nbsp; SurpportWin16: &nbsp; &nbsp;boolean;<br>&nbsp; &nbsp; SurpportWin9x: &nbsp; &nbsp;boolean;<br>&nbsp; &nbsp; SurpportWinNT: &nbsp; &nbsp;boolean;<br>&nbsp; end;<br>var<br>&nbsp; FunctionInfo: TFunctionInfo;<br>&nbsp; {FuncInfoForm: TFuncInfoForm;}<br><br>function ShowFuncInfoForm(AFunctionInfo: TFunctionInfo): word;<br><br>implementation<br><br>{$R *.dfm}<br><br>{ 创建并显示窗体 }<br>function ShowFuncInfoForm(AFunctionInfo: TFunctionInfo): word;<br>var<br>&nbsp; FuncInfoForm: TFuncInfoForm;<br>begin<br>&nbsp; FuncInfoForm := TFuncInfoForm.Create(Application);<br>&nbsp; try<br>&nbsp; &nbsp; with FuncInfoForm do<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; EdFuncName.Text := AFunctionInfo.Name;<br>&nbsp; &nbsp; &nbsp; MemoExplain.Text := AFunctionInfo.Explain;<br>&nbsp; &nbsp; &nbsp; CBSurppotWin16.Checked := AFunctionInfo.SurpportWin16;<br>&nbsp; &nbsp; &nbsp; CBSurppotWin9x.Checked := AFunctionInfo.SurpportWin9x;<br>&nbsp; &nbsp; &nbsp; CBSurppotWinNT.Checked := AFunctionInfo.SurpportWinNT;<br>&nbsp; &nbsp; &nbsp; MemoExample.Text := AFunctionInfo.Example;<br>&nbsp; &nbsp; &nbsp; Result := ShowModal;<br>&nbsp; &nbsp; end;<br>&nbsp; finally<br>&nbsp; &nbsp; FuncInfoForm.Free;<br>&nbsp; end;<br>end;<br><br>{ 按下确定按钮 }<br>procedure TFuncInfoForm.BtnConfirmClick(Sender: TObject);<br>begin<br>&nbsp; if EdFuncName.Text = '' then<br>&nbsp; begin<br>&nbsp; &nbsp; Application.MessageBox('函数名不能为空,请重新输入。',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'错误',<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MB_ICONERROR);<br>&nbsp; &nbsp; Exit;<br>&nbsp; end;<br><br>&nbsp; FunctionInfo.Name := EdFuncName.Text;<br>&nbsp; FunctionInfo.Explain := MemoExplain.Text;<br>&nbsp; FunctionInfo.Example := MemoExample.Text;<br>&nbsp; FunctionInfo.SurpportWin16 := CBSurppotWin16.Checked;<br>&nbsp; FunctionInfo.SurpportWin9x := CBSurppotWin9x.Checked;<br>&nbsp; FunctionInfo.SurpportWinNT := CBSurppotWinNT.Checked;<br>&nbsp; ModalResult := mrOk;<br>end;<br>
 
下载了,还不错
 
studyinging!
 
由于API数量太大,不然我很早就想写了 在其他网站下载了别人已经做过了一个<br>很好用的太大,MODEM上传太慢!不然可以给大家分享!<br>我的把地址忘了!!<br>不过感谢leejames,的努力 你方便了大家的学习!^_^<br>
 
还行!<br>要是所有的参数说明就好了!<br>
 
鼓励,就是如果在详细一点,有列子就更好了!
 

Similar threads

D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
D
回复
0
查看
873
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
顶部