当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 在.NET中得到计算机硬件信息的一些功能得到显示器分辨率 Dim
 

 

 ·设置datagrid的单选列     »显示摘要«
    摘要: 在datagrid中,我们可能会需要实现这种功能——列的单选,本身datagrid提供了select命令可以实现这种功能,而我们往往又习惯于radiobutton来实现,下面就谈谈怎么样用radiobuttonlist来实现。1、我们将datagrid的第一列设置为模板列,并加入radiobuttonlist 2、在datagrid.databind();后加入以下代码/......
 ·代号bolu项目开发日志1     »显示摘要«
    摘要:序:我的好哥们li应朋友之邀,要写一个.net的b/s系统。我从开始学习.net有2年了,这期间知识过一些书,并没有系统研究过.net,更没有.ne的项目开发经验。正好借此机会向我的这位.net高手哥们学习一下,也算帮帮他小忙。一下将会是我们两个人的开发的全过程日志。我们平时工作没有时间,只会用下班和周休开发,因此进度不会太快,但项目很小,1个多月就完成。希望这个过程中,.net能成为我的朋友。也......


在.NET中得到计算机硬件信息的一些功能

在.net中得到计算机硬件信息的一些功能

得到特殊文件夹的路径 "desktop"桌面文件夹路径msgbox(environment.getfolderpath(environment.specialfolder.desktopdirectory))"favorites"收藏夹路径msgbox(environment.getfolderpath(environment.specialfolder.favorites))"application data"路径msgbox(environment.getfolderpath(environment.specialfolder.applicationdata)) 【程序编程相关:XMLDOM对象方法:对象事件

得到显示器分辨率 dim x as short = system.windows.forms.screen.primaryscreen.bounds.widthdim y as short = system.windows.forms.screen.primaryscreen.bounds.heightmsgbox("您的显示器分辨率是:" & x & " x " & y) 【推荐阅读:无外部控件制作多媒体播放器(三)

得到操作系统版本信息 msgbox(environment.osversion.tostring) 【扩展信息:XMLDOM对象方法:Document对

通用写法dim spec as string = environment.getfolderpath(environment.specialfolder.xxxxxxx)xxxxxxx是特殊文件夹的名字

得到当前登录的用户名 msgbox(environment.username)

得到当前应用程序的路径 msgbox(environment.currentdirectory)

打开与关闭cd-rom 先新建模块module mciapimodule  declare function mcisendstring lib "winmm.dll" alias "mcisendstringa" _  (byval lpstrcommand as string, byval lpstrreturnstring as string, _  byval ureturnlength as integer, byval hwndcallback as integer) as integerend module

打开cd-rom dim lret as longlret = mcisendstring("set cdaudio door open", 0&, 0, 0)

关闭cd-rom dim lret as longlret = mcisendstring("set cdaudio door closed", 0&, 0, 0)

得到计算机ip与计算机全名 dim myip as system.net.iphostentry = system.net.dns.gethostbyname(system.net.dns.gethostname)msgbox("您的ip地址:" & (myip.addresslist.getvalue(0).tostring))msgbox("您的计算机全名:" & (myip.hostname.tostring))

使用win32_operatingsystem (wmi class)得到计算机信息 添加listbox在form1_load事件里,并引用system.managmentdim opsearch as new managementobjectsearcher("select * from win32_operatingsystem")dim opinfo as managementobjectfor each opinfo in opsearch.get()  listbox1.items.add("name: " & opinfo("name").tostring())  listbox1.items.add("version: " & opinfo("version").tostring())  listbox1.items.add("manufacturer: " & opinfo("manufacturer").tostring())  listbox1.items.add("computer name: " & opinfo("csname").tostring())  listbox1.items.add("windows directory: " & opinfo("windowsdirectory").tostring())next

列出计算机安装的全部字体,并添加到listbox 新建form并添加listbox与buttonprivate sub button1_click(byval sender as system.object, byval e as system.eventargs) handles button1.clickdim fntcollection as installedfontcollection = new installedfontcollection()dim fntfamily() as fontfamilyfntfamily = fntcollection.familieslistbox1.items.clear()dim i as integer = 0for i = 0 to fntfamily.length - 1  listbox1.items.add(fntfamily(i).name)nextend sub


...   下一页
    摘要: 第一步,在一台工作站上安装norton ghost 7.5企业版(含网络多播ghostcast server软件)。 第二步,创建安装模板。在这台计算机上安装windows操作系统(其他操作系统可作相应调整),还可以安装各种应用程序,并对整个系统进行适当的设置和调整。 第三步,使用ghost制作模板计算机的磁盘映像文件。 第四步,安装多播服务器。在windows系统环境下,从symantec g......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE