在好例子网,分享、交流、成长!
您当前所在位置:首页Others 开发实例一般编程问题 → pb经典回答.pdf

pb经典回答.pdf

一般编程问题

下载此实例
  • 开发语言:Others
  • 实例大小:0.26M
  • 下载次数:14
  • 浏览次数:96
  • 发布时间:2020-11-29
  • 实例类别:一般编程问题
  • 发 布 人:csluoyq
  • 文件格式:.pdf
  • 所需积分:2
 相关标签: pb 经典

实例介绍

【实例简介】
【实例截图】

【核心代码】

1 Powerscript.......................................................................................................................................................1
1.1 pb−powerscript..................................................................................................................................1
1.2 Get PBL name....................................................................................................................................1
1.3 Time the execution.............................................................................................................................1
1.4 Rename an object...............................................................................................................................1
1.5 Get the numeric value for a color......................................................................................................1
1.6 Retrieve an environment variable......................................................................................................2
1.7 Blank an array....................................................................................................................................3
1.8 Make a reference to an instance variable from a Menu.....................................................................3
1.9 Make a reference to a Menu from a frame or a sheet........................................................................3
1.10 Get the Frame from a sheet..............................................................................................................3
1.11 Get the remainder of a decimal........................................................................................................3
1.12 Detect PB version............................................................................................................................4
1.13 Make a window stay "on top"..........................................................................................................4
1.14 Attach a menu in a response window..............................................................................................4
1.15 Navigate through a Tab control with keyboard...............................................................................4
1.16 Remove the rtf information from the rte content.............................................................................4
1.17 Capitalize a name.............................................................................................................................4
1.18 Convert an hex string to its decimal equivalent...............................................................................5
1.19 Have a window close itself after a delay.........................................................................................5
1.20 Have a "mouse−over" on a component............................................................................................5
1.21 Convert a number to hexadecimal...................................................................................................6
1.22 Evaluate an expression.....................................................................................................................6
1.23 Detect if running in PB or executable..............................................................................................7
1.24 Change text on button to bold..........................................................................................................7
1.25 Sort an array.....................................................................................................................................7
1.26 Get data from the Internet................................................................................................................7
1.27 Transform a KeyCode! to a String...................................................................................................8
1.28 Use the undocumented INDIRECT keyword..................................................................................9
1.29 Encrypt/Decrypt a string................................................................................................................10
1.30 Check if an event is supported by an object..................................................................................10
1.31 Check if an object definition exists................................................................................................11
1.32 Have a button with many lines.......................................................................................................11
1.33 Display Powerbuilder's easter egg.................................................................................................11
1.34 Close a window with ESC.............................................................................................................12
1.35 Terminate an another application...................................................................................................12
1.36 Use WSH−VBScript functionalities..............................................................................................12
1.37 Use a Java object from PB.............................................................................................................15
1.38 Use WSH−VBScript functionalities..............................................................................................15
1.39 Check if a program is running.......................................................................................................17
1.40 Get information for the current user from the ADS.......................................................................17
1.41 Run an executable and wait...........................................................................................................18
1.42 Create a Shortcut............................................................................................................................18
1.43 Use XML.......................................................................................................................................19
1.44 Encode/decode URL's parameters.................................................................................................19
1.45 Display PDF into a Window..........................................................................................................20
1.46 Write a Window Log Event...........................................................................................................20
1.47 Print a Word document..................................................................................................................20
1.48 Start the default browser................................................................................................................21
1.49 Upload a file using FTP.................................................................................................................21
Real's HowTo@www.rgagnon.com
1 Powerscript
1.50 Start a dial−up connection.............................................................................................................22
1.51 Start/Stop services..........................................................................................................................22
1.52 Display default email window to type and send an email.............................................................22
1.53 Use Internet Explorer.....................................................................................................................22
1.54 Use MQSeries................................................................................................................................24
1.55 Use RunDll32 utility......................................................................................................................27
1.56 Get the execution path of the current application..........................................................................28
1.57 Get the current directory................................................................................................................28
1.58 Change directory............................................................................................................................29
1.59 Create or remove a directory..........................................................................................................29
1.60 Rename a file.................................................................................................................................29
1.61 Generate a unique filename...........................................................................................................29
1.62 Determine the TEMP directory designated for temporary files....................................................30
1.63 Check if a file is open from another process..................................................................................30
1.64 Read big file (>32765 bytes).........................................................................................................30
1.65 Set File Attribute............................................................................................................................31
1.66 Browse for a folder using the standard Win dialog.......................................................................31
1.67 Retrieve a file timestamp...............................................................................................................32
1.68 Validate a date................................................................................................................................34
1.69 Obtain the day of the year..............................................................................................................34
1.70 Obtain the week of the year...........................................................................................................34
1.71 Set the system date/time................................................................................................................34
1.72 Obtain the last day of a month.......................................................................................................35
1.73 Get a list of printers installed.........................................................................................................35
1.74 Use file association to start an application.....................................................................................35
1.75 Shutdown from application............................................................................................................37
1.76 Start the screen saver.....................................................................................................................39
1.77 Get the CDROM drive letter..........................................................................................................39
1.78 Get the user name and the computer name....................................................................................40
1.79 Retrieve the UNC from a mapped drive........................................................................................40
1.80 Make a program sleep....................................................................................................................41
1.81 Call HtmlHelp................................................................................................................................41
1.82 Maximize a frame..........................................................................................................................42
1.83 Make a window popup "on top"....................................................................................................42
1.84 Make the "hourglass" cursor stay..................................................................................................42
1.85 Move a window without a titlebar.................................................................................................43
1.86 Convert ANSI to Oem character set..............................................................................................43
1.87 Send keystroke to a control............................................................................................................43
1.88 Return an ERRORLEVEL to a BAT file from a PB app..............................................................44
1.89 Change screen resolution...............................................................................................................44
1.90 Determine what is the decimal or hundred separator at runtime...................................................45
1.91 Move the mouse cursor..................................................................................................................46
1.92 Disable the MouseWheel ZOOM function....................................................................................47
1.93 Set the system date/time................................................................................................................47
1.94 Remove the Close item in the system menu..................................................................................47
1.95 Flash a Window Title bar...............................................................................................................48
1.96 Detect if an application is already running....................................................................................49
1.97 Retrieve error from calling a Win API..........................................................................................49
1.98 Use the default MAPI profile.........................................................................................................50
1.50 Start a dial−up connection
Real's HowTo@www.rgagnon.com
1 Powerscript
1.99 Set and retrieve the executable version..........................................................................................51
1.100 Get the application PID................................................................................................................52
1.101 Create and use a C DLL (created with VC  )............................................................................52
1.102 Use Windows Resources from a DLL.........................................................................................54
1.103 Get the IP address........................................................................................................................55
1.104 Use Windows Debugging API.....................................................................................................56
1.105 Animate a Window......................................................................................................................56
1.106 Use Microsoft Crypto API...........................................................................................................57
1.107 Scroll a Window..........................................................................................................................58
1.108 Get Windows OS version.............................................................................................................59
1.109 Retrieve the Regional Setting w/o using the Registry.................................................................60
1.110 Detect if Jaguar is down from a JSP............................................................................................61
1.111 Use XML.....................................................................................................................................62
1.112 Make a window unmoveable.......................................................................................................62
1.113 Retrieve window handle by its title.............................................................................................62
1.114 Have a transparent window..........................................................................................................62
1.115 Bypass Window Error popup message........................................................................................63
1.116 Get hard disk serial number.........................................................................................................63
2 Datawindow....................................................................................................................................................65
2.1 pb−datawindow................................................................................................................................65
2.2 Load an array with the names of every column in a dw..................................................................65
2.3 Have a different color for newly inserted row.................................................................................65
2.4 Set a Date to NULL.........................................................................................................................65
2.5 Create dynamically a DataWindow.................................................................................................65
2.6 Get the page count of a report..........................................................................................................66
2.7 Make the ENTER key act as TAB key............................................................................................66
2.8 Display only distinct rows...............................................................................................................66
2.9 Extract the display value of DDDW................................................................................................66
2.10 Do simple validation with the Datawindow properties..................................................................67
2.11 Set a default value for a DDDW....................................................................................................67
2.12 Delete current selection in DDDW................................................................................................67
2.13 Alternate row color........................................................................................................................68
2.14 Pass the content of a dw to another window..................................................................................68
2.15 Detect which button is clicked in a dw (PB6)................................................................................68
2.16 Detect if a row is new....................................................................................................................69
2.17 Set cursor at end of text in a dwcolumn.........................................................................................69
2.18 Make a static text visible on the last page only.............................................................................69
2.19 Print to a file..................................................................................................................................69
2.20 Make a dw with a title unmoveable...............................................................................................69
2.21 Trap the click on down Arrow on DDLB......................................................................................69
2.22 Scroll 2 datawindows in sync........................................................................................................70
2.23 Get the current filter.......................................................................................................................70
2.24 Disable a dw button.......................................................................................................................70
2.25 Prevent vertical scrolling via the mouse wheel or keyboard.........................................................70
2.26 Cut and Paste datawindow content................................................................................................70
2.27 Open a DDDW via Powerscript.....................................................................................................71
2.28 Change the presentation style........................................................................................................71
2.29 Autoselect an Editmask..................................................................................................................71
Real's HowTo@www.rgagnon.com
2 Datawindow
2.30 Sort an array...................................................................................................................................71
2.31 Get the count of rows selected.......................................................................................................72
2.32 Get data from Excel via the clipboard...........................................................................................72
3 PFC..................................................................................................................................................................74
3.1 pb−pfc..............................................................................................................................................74
3.2 Disconnect an inactive application..................................................................................................74
3.3 Display compile timestamp in the w_about window.......................................................................74
3.4 Use the w_master pfc_Save event...................................................................................................74
3.5 Control the Cutitems in m_master...................................................................................................75
3.6 Have PFC Help accessible through the Toolbar..............................................................................77
3.7 Have a FileExists function with wildcard........................................................................................77
3.8 Specify objects to be save during a pfc_Save event........................................................................77
3.9 Detect PFC version..........................................................................................................................77
4 Database..........................................................................................................................................................79
4.1 pb−database.....................................................................................................................................79
4.2 Suppress ODBC logon window.......................................................................................................79
4.3 List available ODBC datasources....................................................................................................79
4.4 How to get the current DBMS, Database or user through ODBC...................................................79
4.5 Create a table from PowerScript......................................................................................................80
4.6 Prevent of creating of special PB tables..........................................................................................80
4.7 Get time information from the DBMS.............................................................................................81
4.8 Enable database tracing....................................................................................................................81
5 Jaguar/EAServer............................................................................................................................................82
5.1 pb−jaguar.........................................................................................................................................82
5.2 Read me...........................................................................................................................................82
5.3 JagManager command line switches...............................................................................................82
5.4 Make sanity check works with Oracle.............................................................................................84
5.5 Recover from a lost jagadmin password..........................................................................................84
5.6 Call a Jaguar component from ASP.................................................................................................84
5.7 Call a Jaguar component from Cold Fusion (CFM)........................................................................85
5.8 Have french characters in web application properties.....................................................................86
5.9 Control Jaguar from the command line...........................................................................................86
5.10 Detect Jaguar status........................................................................................................................87
5.11 Send XLS file from EAS web server.............................................................................................88
5.12 Encrypt property value...................................................................................................................88
5.13 Trouble to connect to server in debug mode..................................................................................88
5.14 Get the client username and IP address.........................................................................................88
5.15 Get the package name....................................................................................................................89
5.16 Make a PB service component sleep.............................................................................................89
5.17 Read a PB component property.....................................................................................................89
5.18 Write to the Jaguar log...................................................................................................................89
5.19 Inter PB components calls.............................................................................................................90
5.20 Call a Jaguar component from PB.................................................................................................91
5.21 Pass an array by ref to a Pb component from JSP.........................................................................92
5.22 Get the server name (PB/JAVA)....................................................................................................92
5.23 Use JDBC connection cache from PB component........................................................................92
2.30 Sort an array
Real's HowTo@www.rgagnon.com
5 Jaguar/EAServer
5.24 Get the client username and IP address.........................................................................................93
5.25 Write to the Jaguar log...................................................................................................................93
5.26 See the java code file generated from a JSP..................................................................................93
5.27 Increase memory for the JVM.......................................................................................................94
5.28 Enable the JIT................................................................................................................................94
5.29 Restart or Refresh Jaguar from JSP...............................................................................................94
5.30 Refresh connection cache from JSP...............................................................................................94
5.31 Pass an array by ref to a Pb component from JSP.........................................................................96
5.32 Use a connection cache from JSP..................................................................................................96
5.33 Call Corba (PB) component from Java..........................................................................................97
5.34 Deploy a Servlet.............................................................................................................................98
5.35 Call another EJB............................................................................................................................99
5.36 Pass a ResultSet to a JSP from a Bean...........................................................................................99
5.37 List Web Application...................................................................................................................100
5.38 List Connection Caches...............................................................................................................101
5.39 List Packages and Components...................................................................................................102
5.40 Get statistics.................................................................................................................................104
5.41 Ping a connection cache...............................................................................................................108
5.42 Read Jaguar server properties......................................................................................................108
5.43 Detect if Jaguar is down from a JSP............................................................................................109
5.44 Refresh Jaguar roles.....................................................................................................................109
5.45 Access Package properties from EJB..........................................................................................109
5.46 Refresh a component....................................................................................................................110
6 Common problems.......................................................................................................................................111
6.1 pb−common...................................................................................................................................111
6.2 Table not visible.............................................................................................................................111
6.3 Avoid the error "numeric or value error" when calling Oracle stored proc...................................111
6.4 Editmask cause application crash..................................................................................................111
6.5 Watcom C   editor is not executed..............................................................................................112
6.6 Remove extra padding blanks in char column...............................................................................112
6.7 GPF when scrolling via the WheelMouse on a datawindow.........................................................112
6.8 ODBC drivers installed but not visible..........................................................................................112
6.9 GPF when debugging with PB7.....................................................................................................113
6.10 Blank sheets when printing reports..............................................................................................113
6.11 GPF on DW SetFullState (PB6.0)...............................................................................................113
6.12 Memory usage with PB7 and MS SQL direct driver...................................................................113
6.13 Accelerator key do not display in W2K.......................................................................................113

标签: pb 经典

实例下载地址

pb经典回答.pdf

不能下载?内容有错? 点击这里报错 + 投诉 + 提问

好例子网口号:伸出你的我的手 — 分享

网友评论

发表评论

(您的评论需要经过审核才能显示)

查看所有0条评论>>

小贴士

感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。

  • 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
  • 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
  • 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
  • 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。

关于好例子网

本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明

;
报警