——此文章摘自《C#高级编程(第
版)》定价
元 特价
元 购买
ScrollingDataBinding示例的代码如下所示
using System;
using SystemWindowsForms;
using SystemData;
using SystemDataSqlClient;
public class ScrollingDataBinding : SystemWindowsFormsForm
{
private Button retrieveButton;
private TextBox textName;
private TextBox textQuan;
private TrackBar trackBar;
private DataSet ds;
应用程序在ScrollingDataBinding构造函数中创建窗口以及该窗口中的所有控件
public ScrollingDataBinding()
{
thisAutoScaleBaseSize = new SystemDrawingSize( );
thisClientSize = new SystemDrawingSize( );
thisText = _ScrollingDataBinding;
thisretrieveButton = new Button();
retrieveButtonLocation = new SystemDrawingPoint( );
retrieveButtonSize = new SystemDrawingSize( );
retrieveButtonTabIndex = ;
retrieveButtonAnchor = AnchorStylesTop | AnchorStylesLeft;
retrieveButtonText = Retrieve;
retrieveButtonClick += new SystemEventHandler
(thisretrieveButton_Click);
thisControlsAdd(thisretrieveButton);
thistextName = new TextBox();
textNameLocation = new SystemDrawingPoint( );
textNameText = Please click retrieve;
textNameTabIndex = ;
textNameAnchor = AnchorStylesTop | AnchorStylesLeft |
AnchorStylesRight ;
textNameSize = new SystemDrawingSize( );
textNameEnabled = false;
thisControlsAdd(thistextName);
thistextQuan = new TextBox();
textQuanLocation = new SystemDrawingPoint( );
textQuanText = ;
textQuanTabIndex = ;
[] [] [] []