
Features Guide PowerBuilder® .NET 12.0 DOCUMENT ID: DC01261-01-1200-01 LAST REVISED: March 2010 Copyright © 2010 by Sybase, Inc. All rights reserved. This publication pertains to Sybase software and to any subsequent release until otherwise indicated in new editions or technical notes. Information in this document is subject to change without notice. The software described herein is furnished under a license agreement, and it may be used or copied only in accordance with the terms of that agreement. To order additional documents, U.S. and Canadian customers should call Customer Fulfillment at (800) 685-8225, fax (617) 229-9845. Customers in other countries with a U.S. license agreement may contact Customer Fulfillment via the above fax number. All other international customers should contact their Sybase subsidiary or local distributor. Upgrades are provided only at regularly scheduled software release dates. No part of this publication may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual, optical, or otherwise, without the prior written permission of Sybase, Inc. Sybase trademarks can be viewed at the Sybase trademarks page at http://www.sybase.com/detail?id=1011207. Sybase and the marks listed are trademarks of Sybase, Inc. A ® indicates registration in the United States of America. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. All other company and product names used herein may be trademarks or registered trademarks of the respective companies with which they are associated. Use, duplication, or disclosure by the government is subject to the restrictions set forth in subparagraph (c)(1)(ii) of DFARS 52.227-7013 for the DOD and as set forth in FAR 52.227-19(a)-(d) for civilian agencies. Sybase, Inc., One Sybase Drive, Dublin, CA 94568 Contents About PowerBuilder .NET ........................................1 PowerBuilder .NET Architecture ............................1 WPF Control Classes ..........................................3 Semantic Differences ........................................4 Runtime Requirements for PowerBuilder .NET ..........5 Advantages of WPF Applications ...........................5 Modified and Unsupported Features in PowerBuilder .NET ........................................6 Behavior Changes for Runtime Controls ...................9 Conditional Compilation in PowerBuilder .NET Targets .....................................................13 Memory Tuning for Large Applications ...................14 Graphic User Interface ...........................................17 Visual Studio Shell Features ...............................17 Solution Explorer in PowerBuilder .NET .................19 PowerBuilder .NET Toolbox ................................20 Document Outline ...........................................21 PB Object Outline ...........................................21 Toolbars in the IDE ..........................................23 Options Dialog Box ..........................................24 New and Inherit From Object Dialog Boxes .............28 Customizing the New Dialog Box ...................29 PowerBuilder .NET Painters ................................30 About the Enumeration Painter ....................30 About the Interface Painter .........................31 Project Painter User Interface ......................31 Window Painter in PowerBuilder .NET ............32 Building a New WPF Window ........................32 MDI Applications in PowerBuilder .NET ...........34 Menus and Toolbars for PowerBuilder .NET Applications ........................................36 Features Guide iii Contents User Objects ...........................................52 Source Control in PowerBuilder .NET ....................54 Adding Solutions to Source Control ................54 Add-ins in the PowerBuilder .NET Environment ........55 PowerBuilder .NET Targets and Projects .....................57 Creating a WPF Window Target ...........................57 WPF Window Application Target and Project Properties ..........................................58 Adding Resources to a Target ..............................61 Runtime Requirements for WPF Window Application Targets .....................................................62 Creating a .NET Assembly Target .........................64 .NET Assembly Target and Project Properties ....64 Runtime Requirements for .NET Assembly Targets .....68 WCF Client Project Overview ..............................68 Creating a WCF Client ...............................69 Scripts and Code Fundamentals ................................71 Script View in PowerBuilder .NET ........................71 Script Navigation Option ............................71 Opening the Script View .............................72 Modifying Script View Properties ...................72 Editing Scripts ...............................................73 Handling Problems with Script Compilation .............73 Code Snippets ................................................73 IntelliSense ...................................................74 Inner Control Properties and Methods ...................74 Declaring Variables and External Functions .............75 Go To Definition .............................................75 Skin Selection for Applications and Controls ............75 Right-To-Left Formatting ...................................77 FlowDirection Property ..............................79 Coding Restrictions ..........................................79 Accelerator Characters in Control Labels .........80 Keywords as Identifiers ..............................81 Supported Custom Events ..................................82 iv PowerBuilder .NET Contents Unsupported Properties, Events, and Functions ........82 CLS Compliance in PowerBuilder ............................. 87 CLS Roles .....................................................87 PowerBuilder Array Enhancements .......................88 Runtime Array Bounds ...............................88 Returning an Array for a Function or Event ......89 Jagged Array Support ................................89 .NET System.Array Support .........................90 BitRight and BitLeft Operator Support ...................90 Inheritance from .NET System.Object ...................91 Declaring a Namespace .....................................91 Access Order with Unqualified Names ............92 Syntax for Returning Namespace Names ..........93 Defining an Interface .......................................93 Implementing an Interface ..........................94 Deleting a Declared Interface ......................95 System Interface Syntax .............................95 Inheriting from a .NET Class ...............................97 Syntax to Support Inheritance from a .NET Class .......................................................97 Adding a Parameterized Constructor .....................99 Defining .NET Properties ...................................99 Defining Indexers ..........................................100 Creating a Global User-Defined Enumeration .........102 Syntax for User-Defined Enumerations ..........102 Creating a Local User-Defined Enumeration ...........103 Consuming a .NET Delegate ..............................103 Syntax for Consuming .NET Delegates ..........104 Syntax for Consuming Generic Classes ..................106 Enhancements to .NET Component Projects ...........107 DataWindows .....................................................109 DataWindows in PowerBuilder .NET ....................109 Using DataWindow Objects in PowerBuilder .NET ..............................109 Features Guide v Contents DataWindow Differences Between PowerBuilder Classic and PowerBuilder .NET ......................................................110 Behavior Changes for DataWindow Objects .....113 Presentation Styles for DataWindow Objects ..........121 Using SQL Select ...........................................122 Defining the Data Using SQL Select ..............122 Selecting Tables and Views Using SQL Select ...123 Table Layout View in SQL Select ..................123 Selecting Columns Using SQL Select ..............124 Including Computed Columns Using SQL Select ...................................................... 124 Queries in PowerBuilder .NET ............................125 Previewing the Query ...............................125 Saving the Query ....................................125 Modifying the Query ................................126 DataWindow Object Enhancements ..................... 126 DataWindow Painter ................................127 Saving Data to an External File ...................130 Adding Controls to a DataWindow Object ............. 130 Adding Columns to a DataWindow Object ...... 131 Adding Text to a DataWindow Object ...........131 Adding Drawing Controls to a DataWindow Object ............................................131 Adding a GroupBox to a DataWindow Object ..132 Adding Pictures to a DataWindow Object ......132 Adding Computed Fields to a DataWindow Object ............................................133 Adding Buttons to a DataWindow Object ....... 136 Add Graphs to DataWindow Objects .............139 Adding InkPicture Controls to a DataWindow Object ............................................. 139 Adding Third-Party and Custom Controls to DataWindow Objects ............................139 Adding a TableBlob to
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages240 Page
-
File Size-