CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
花落谁家,你作主! 盛大widget设计大赛英雄榜
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  VB >  基础类

如何做像windows计算器的关于对话框。

楼主cow_boy()2001-12-31 14:10:07 在 VB / 基础类 提问

问题点数:100、回复次数:10Top

1 楼tommychim(阿布洛迪)回复于 2001-12-31 14:11:25 得分 0

VB不是提供about类型的form吗Top

2 楼cow_boy()回复于 2001-12-31 14:16:24 得分 0

能够显示内存和windows字样的。Top

3 楼icy_csdn()回复于 2001-12-31 14:17:18 得分 0

你要做什么样的呀,有个性?  
  up说的很对啊,新建一个窗体(about类型的)Top

4 楼uguess(天地间,有我在行走!)回复于 2001-12-31 14:17:32 得分 10

Const   CSIDL_DESKTOP   =   &H0  
  Const   CSIDL_PROGRAMS   =   &H2  
  Const   CSIDL_CONTROLS   =   &H3  
  Const   CSIDL_PRINTERS   =   &H4  
  Const   CSIDL_PERSONAL   =   &H5  
  Const   CSIDL_FAVORITES   =   &H6  
  Const   CSIDL_STARTUP   =   &H7  
  Const   CSIDL_RECENT   =   &H8  
  Const   CSIDL_SENDTO   =   &H9  
  Const   CSIDL_BITBUCKET   =   &HA  
  Const   CSIDL_STARTMENU   =   &HB  
  Const   CSIDL_DESKTOPDIRECTORY   =   &H10  
  Const   CSIDL_DRIVES   =   &H11  
  Const   CSIDL_NETWORK   =   &H12  
  Const   CSIDL_NETHOOD   =   &H13  
  Const   CSIDL_FONTS   =   &H14  
  Const   CSIDL_TEMPLATES   =   &H15  
  Const   MAX_PATH   =   260  
  Private   Type   SHITEMID  
          cb   As   Long  
          abID   As   Byte  
  End   Type  
  Private   Type   ITEMIDLIST  
          mkid   As   SHITEMID  
  End   Type  
  Private   Declare   Function   ShellAbout   Lib   "shell32.dll"   Alias   "ShellAboutA"   (ByVal   hWnd   As   Long,   ByVal   szApp   As   String,   ByVal   szOtherStuff   As   String,   ByVal   hIcon   As   Long)   As   Long  
  Private   Declare   Function   SHGetSpecialFolderLocation   Lib   "shell32.dll"   (ByVal   hwndOwner   As   Long,   ByVal   nFolder   As   Long,   pidl   As   ITEMIDLIST)   As   Long  
  Private   Declare   Function   SHGetPathFromIDList   Lib   "shell32.dll"   Alias   "SHGetPathFromIDListA"   (ByVal   pidl   As   Long,   ByVal   pszPath   As   String)   As   Long  
  Private   Sub   Form_Load()  
          'KPD-Team   1998  
          'URL:   http://www.allapi.net/  
          'E-Mail:   KPDTeam@Allapi.net  
          'Show   an   about   window  
          ShellAbout   Me.hWnd,   App.Title,   "Created   by   the   KPD-Team   1999",   ByVal   0&  
          'Set   the   graphical   mode   to   persistent  
          Me.AutoRedraw   =   True  
          'Print   the   folders   to   the   form  
          Me.Print   "Start   menu   folder:   "   +   GetSpecialfolder(CSIDL_STARTMENU)  
          Me.Print   "Favorites   folder:   "   +   GetSpecialfolder(CSIDL_FAVORITES)  
          Me.Print   "Programs   folder:   "   +   GetSpecialfolder(CSIDL_PROGRAMS)  
          Me.Print   "Desktop   folder:   "   +   GetSpecialfolder(CSIDL_DESKTOP)  
  End   Sub  
  Private   Function   GetSpecialfolder(CSIDL   As   Long)   As   String  
          Dim   r   As   Long  
          Dim   IDL   As   ITEMIDLIST  
          'Get   the   special   folder  
          r   =   SHGetSpecialFolderLocation(100,   CSIDL,   IDL)  
          If   r   =   NOERROR   Then  
                  'Create   a   buffer  
                  Path$   =   Space$(512)  
                  'Get   the   path   from   the   IDList  
                  r   =   SHGetPathFromIDList(ByVal   IDL.mkid.cb,   ByVal   Path$)  
                  'Remove   the   unnecessary   chr$(0)'s  
                  GetSpecialfolder   =   Left$(Path,   InStr(Path,   Chr$(0))   -   1)  
                  Exit   Function  
          End   If  
          GetSpecialfolder   =   ""  
  End   Function  
  Top

5 楼tommychim(阿布洛迪)回复于 2001-12-31 14:19:32 得分 0

可用API函数GlobalMemoryStatus获得系统内存,至于图片嘛,自己拷屏下来做不就可以了Top

6 楼dbcontrols(泰山__抛砖引玉)回复于 2001-12-31 14:36:19 得分 0

什么破代码,自己做个好了.Top

7 楼cow_boy()回复于 2001-12-31 15:06:09 得分 0

新建一个窗体(about类型的)   ,怎样新建。。。  
  我的VB窗体没有ABOUT类型的啊。在哪里可以设置???Top

8 楼uguess(天地间,有我在行走!)回复于 2001-12-31 15:10:27 得分 90

Private   Declare   Function   ShellAbout   Lib   "shell32.dll"   Alias   "ShellAboutA"   (ByVal   hWnd   As   Long,   ByVal   szApp   As   String,   ByVal   szOtherStuff   As   String,   ByVal   hIcon   As   Long)   As   Long  
  Private   Sub   Form_Load()  
  ShellAbout   Me.hWnd,   App.Title,   "Created   by   the   KPD-Team   1999",   ByVal   0&  
  End   Sub  
   
   
  这个就是你要的了!  
   
   
   
  to   : dbcontrols(泰山)      不懂就滚到一边去!是不是新年了想要点"彩"啊?  
   
   
  Top

9 楼cow_boy()回复于 2001-12-31 15:15:37 得分 0

to   uguess(uguess)   
    thanks  
  Top

10 楼ArQ(阿丘)回复于 2001-12-31 15:19:11 得分 0

在VB自带得例子里有一个计算器的例子,你可以看看他的原理,自己做一个1Top

相关问题

  • 怎么实现像windows粘贴和删除那样的进度对话框???
  • 在PB中如何得到“存盘对话框”,像 windows 那样的, 就是PB 的saveas 那样的, 但不要 文件类型选择对话框
  • 对话框的UpdateData好像失灵了
  • 对话框中图像显示问题!!
  • 如何让程序在windows启动时运行(桌面出现前),就像windows的网络登陆对话框
  • 怎么调用windows的计算器
  • 初学者问题:如何添加通用对话框(windows系统提供的通用对话框)?
  • 在DOS下如何绘出Windows的对话框,如AfxMessageBox(...)之类的对话框?开发工具Borland c++ v3.1 for dos
  • MFC里有目录打开对话框类或控件吗?就是WINDOWS的目录打开对话框
  • 怎么使自己的程序,在windows登陆对话框出现前弹出对话框

关键词

  • .net
  • shell
  • dll
  • const csidl
  • shellabout
  • byval
  • shell32
  • hwnd
  • long
  • lib

得分解答快速导航

  • 帖主:cow_boy
  • uguess
  • uguess

相关链接

  • Visual Basic类图书
  • Visual Basic类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo