3个问题:1.能否提供一个c#中所有的命名空间和类的列表2.如何做控件3.如何使用水晶报表? ms-help://MS.VSCC/MS.MSDNVS.2052/cpref/html/cpref_start.htm 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 前两个问题看MSDN;第三个下一个水晶报表设计气;新件一个Form,写如下代码//----------------------------------------//CrystalFirst 2003.1.12 by win32c; //CrystalFirst使用例子水晶报表;//----------------------------------------//Dock设置为fill即可和Form同大小了;using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;namespace CrystalFirst{ /// <summary> /// Form1 的摘要说明。 /// </summary> public class Form1 : System.Windows.Forms.Form { private CrystalDecisions.Windows.Forms.CrystalReportViewer crystalReportViewer1; /// <summary> /// 必需的设计器变量。 /// </summary> private System.ComponentModel.Container components = null; public Form1() { // // Windows 窗体设计器支持所必需的 // InitializeComponent(); // // TODO: 在 InitializeComponent 调用后添加任何构造函数代码 // } /// <summary> /// 清理所有正在使用的资源。 /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( disposing ); } #region Windows Form Designer generated code /// <summary> /// 设计器支持所需的方法 - 不要使用代码编辑器修改 /// 此方法的内容。 /// </summary> private void InitializeComponent() { this.crystalReportViewer1 = new CrystalDecisions.Windows.Forms.CrystalReportViewer(); this.SuspendLayout(); // // crystalReportViewer1 // this.crystalReportViewer1.ActiveViewIndex = -1; this.crystalReportViewer1.Dock = System.Windows.Forms.DockStyle.Fill; this.crystalReportViewer1.Name = "crystalReportViewer1"; this.crystalReportViewer1.ReportSource = "C:\\Program Files\\Microsoft Visual Studio .NET\\Crystal Reports\\Samples\\Reports\\Gen" + "eral Business\\World Sales Report.rpt"; this.crystalReportViewer1.Size = new System.Drawing.Size(512, 301); this.crystalReportViewer1.TabIndex = 0; this.crystalReportViewer1.HandleException += new CrystalDecisions.Windows.Forms.ExceptionEventHandler(this.crystalReportViewer1_HandleException); // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); this.ClientSize = new System.Drawing.Size(512, 301); this.Controls.AddRange(new System.Windows.Forms.Control[] { this.crystalReportViewer1}); this.Name = "Form1"; this.Text = "水晶报表"; this.Load += new System.EventHandler(this.Form1_Load); this.ResumeLayout(false); } #endregion /// <summary> /// 应用程序的主入口点。 /// </summary> [STAThread] static void Main() { Application.Run(new Form1()); } private void Form1_Load(object sender, System.EventArgs e) { } private void crystalReportViewer1_HandleException(object source, CrystalDecisions.Windows.Forms.ExceptionEventArgs e) {/* //异常处理; if(e.Exception is EngineException) { EngineException engEx = (EngineException)e.Exception; if(engEx.ErroID == EngineExceptionErrorID.DataSourceError) { e.Handled = true; MessageBox.Show("连接到数据库是出错。"); } else if(engEx.ErrorID == EngineExceptionErrorID.LogOnFailed) { e.Handled = true; MessageBox.Show("错误登陆参数,请检查您的用户名和密码。"); } }*/ } }} 1,3有人回答了.2看,http://www.csdn.net/develop/read_article.asp?id=15568 关于DateTime的问题 急求C#数据库连接问题。。 c# Dns.IpToString() 未定义 魔兽改键工具的源码谁有给贴出来下! 用C#抓取即时比分的问题 如何修改DataGrid某一行的背景颜色? 高分求发邮件代码!顶者有分 我的xde 2003启动时老是报告说data model loading失败,谁碰到过,如何解决? 如何使用ping,并得到ping命令返回的值 请大家推荐几本比较有深度的C#书籍 SharpDevelop和.netIDE的比较 如何统计用vs.net开发的软件的源代码总行数多少,其中代码行数、注释行数、空白行数各有多少?
第三个下一个水晶报表设计气;
新件一个Form,写如下代码
//----------------------------------------
//CrystalFirst 2003.1.12 by win32c;
//CrystalFirst使用例子水晶报表;
//----------------------------------------//Dock设置为fill即可和Form同大小了;using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;namespace CrystalFirst
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private CrystalDecisions.Windows.Forms.CrystalReportViewer crystalReportViewer1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null; public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent(); //
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
} /// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
} #region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.crystalReportViewer1 = new CrystalDecisions.Windows.Forms.CrystalReportViewer();
this.SuspendLayout();
//
// crystalReportViewer1
//
this.crystalReportViewer1.ActiveViewIndex = -1;
this.crystalReportViewer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.crystalReportViewer1.Name = "crystalReportViewer1";
this.crystalReportViewer1.ReportSource = "C:\\Program Files\\Microsoft Visual Studio .NET\\Crystal Reports\\Samples\\Reports\\Gen" +
"eral Business\\World Sales Report.rpt";
this.crystalReportViewer1.Size = new System.Drawing.Size(512, 301);
this.crystalReportViewer1.TabIndex = 0;
this.crystalReportViewer1.HandleException += new CrystalDecisions.Windows.Forms.ExceptionEventHandler(this.crystalReportViewer1_HandleException);
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(512, 301);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.crystalReportViewer1});
this.Name = "Form1";
this.Text = "水晶报表";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false); }
#endregion /// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
} private void Form1_Load(object sender, System.EventArgs e)
{
} private void crystalReportViewer1_HandleException(object source, CrystalDecisions.Windows.Forms.ExceptionEventArgs e)
{/*
//异常处理;
if(e.Exception is EngineException)
{
EngineException engEx = (EngineException)e.Exception;
if(engEx.ErroID == EngineExceptionErrorID.DataSourceError)
{
e.Handled = true;
MessageBox.Show("连接到数据库是出错。");
}
else if(engEx.ErrorID == EngineExceptionErrorID.LogOnFailed)
{
e.Handled = true;
MessageBox.Show("错误登陆参数,请检查您的用户名和密码。");
}
}*/
}
}
}
2看,http://www.csdn.net/develop/read_article.asp?id=15568