| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 842 人关注过本帖
标题:帮助看看!!
只看楼主 加入收藏
chenggan
Rank: 1
等 级:新手上路
帖 子:16
专家分:0
注 册:2005-4-14
收藏
 问题点数:0 回复次数:1 
帮助看看!!

运行这段程序后出现的错误是:F:\新建文件夹\WindowsApplication3\Form1.cs(63): “WindowsApplication3.Form1”并不包含对“MyPictureBox”的定义 我应该怎么改啊? using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.IO;

namespace WindowsApplication3 { /// <summary> /// Form1 的摘要说明。 /// </summary> public class Form1 : System.Windows.Forms.Form { /// <summary> /// 必需的设计器变量。 /// </summary> private System.ComponentModel.Container components=null; public Form1() { // // Windows 窗体设计器支持所必需的 // InitializeComponent(); // // TOD 在 InitializeComponent 调用后添加任何构造函数代码 // }

/// <summary> /// 清理所有正在使用的资源。 /// </summary> protected override void Dispose( bool disposing ) { if( disposing ) { if (components != null) { components.Dispose(); } } base.Dispose( disposing ); }

#region Windows 窗体设计器生成的代码 /// <summary> /// 设计器支持所需的方法 - 不要使用代码编辑器修改 /// 此方法的内容。 /// </summary> private void InitializeComponent() { // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size(6, 14); this.ClientSize = new System.Drawing.Size(292, 273); this.Name = "Form1"; this.Text = "Form1"; this.MyPictureBox=new System.Windows.Forms.PictureBox();

} #endregion

/// <summary> /// 应用程序的主入口点。 /// </summary> public class ReadClass { const int SizeBuff=1024; public static void Main() { ReadClass rc=new ReadClass(); rc.Run(); } private void Run() { Stream inputStream =File.OpenRead(@"f:\157590516.jpg"); inputStream.Close(); }

private void pictureBox1_Click(object sender, System.EventArgs e) { Application.Exit(); } } } }

搜索更多相关主题的帖子: 新建文件夹 public 
2005-04-16 11:21
live41
Rank: 10Rank: 10Rank: 10
等 级:贵宾
威 望:67
帖 子:12442
专家分:0
注 册:2004-7-22
收藏
得分:0 
public class Form1 : System.Windows.Forms.Form { /// <summary> /// 必需的设计器变量。 /// </summary> private System.Windows.Forms.PictureBox MyPictureBox; private System.ComponentModel.Container components=null;
2005-04-16 11:34
快速回复:帮助看看!!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017869 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved