Nw BBS 壬天堂世界

 找回密码
 注册
搜索
热搜: 资料集合
123
返回列表 发新帖
楼主: zhugeyan
收起左侧

[贴图] ME的征途是推翻记事本和IE

[复制链接]
发表于 2008-7-2 19:46:04 | 显示全部楼层
求方法+233MAX
回复

使用道具 举报

 楼主| 发表于 2008-7-2 19:46:51 | 显示全部楼层
似乎没有。。。。。。。。。。。。。
不过要看是什么图了
回复

使用道具 举报

发表于 2008-7-2 19:49:25 | 显示全部楼层
233MAX什么意思来的?
回复

使用道具 举报

 楼主| 发表于 2008-7-2 19:50:03 | 显示全部楼层
原帖由 华丽的香蕉曲线 于 2008-7-2 19:46 发表
求方法+233MAX

话说真的要看
来了,其实也不复杂,核心部分就一点点,:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
       public float oldValue;
        public float vScrollMutiplier;
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
       private void button2_Click(object sender, EventArgs e)
        {
           FileStream fs;
           try
           {
               saveFileDialog1.Filter = @"所有格式|*.txt;*.doc;|*.TXT|*.txt|*.DOC|*.doc";
               saveFileDialog1.ShowDialog();
               richTextBox1.SaveFile(saveFileDialog1.FileName.ToString(), RichTextBoxStreamType.PlainText);
               
           }
           catch { }
            try
            {
               
                fs =File.Create(textBox1.Text);
            }
            catch  {
               
                return;
            }
            Byte[] content = new UTF8Encoding(true).GetBytes(richTextBox1.Text);
            try {
                fs.Write(content,0,content.Length);
                fs.Flush();
                MessageBox.Show("保存成功", "成功", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
               
            }catch{
                MessageBox.Show("写入文件出错", "错误", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning);
            }finally{
            
            fs.Close();
            }
            
        }
        ///private void SetVerticalScrollMultipliter(Control ctrl) {
          ///  float hsb = (float)(vScrollBar1.Height-ctrl.Height);
         ///   float ticks = (float)(vScrollBar1.Maximum - vScrollBar1.Minimum);
      ///       vScrollMutiplier = hsb / ticks;

    ///    }
        private void button3_Click(object sender, EventArgs e)
        {
            
           
            try
            {
                if (!File.Exists(textBox3.Text))
                {
                    
                    MessageBox.Show("文件不存在..");
                }
                FileStream fsa = File.OpenRead(textBox3.Text);
                byte[] arr = new byte[1000];
                UTF8Encoding data = new UTF8Encoding(true);
                while (fsa.Read(arr, 0, arr.Length) > 0)
                {
                    richTextBox1.Text = (data.GetString(arr));
                }
            }
            catch (Exception ex) {
                MessageBox.Show("出现错误"+ex.Message);
            }
        }
        private void 复制ToolStripMenuItem_Click(object sender, EventArgs e)
        {
     
        }
        private void 保存ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
            }
            catch { }
        }
        private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }
        private void 版本ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form2 fud = new Form2();
            fud.Show();
        }
        private void 保存ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            FileStream fs;
            try
            {
                saveFileDialog1.Filter = @"所有格式|*.txt;*.doc;|*.TXT|*.txt|*.DOC|*.doc";
                saveFileDialog1.ShowDialog();
                richTextBox1.SaveFile(saveFileDialog1.FileName.ToString(), RichTextBoxStreamType.PlainText);
            }
            catch { }
            try
            {
                fs = File.Create(textBox1.Text);
            }
            catch
            {

                return;
            }
            Byte[] content = new UTF8Encoding(true).GetBytes(richTextBox1.Text);
            try
            {
                fs.Write(content, 0, content.Length);
                fs.Flush();
                MessageBox.Show("保存成功", "成功", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
            }
            catch
            {
                MessageBox.Show("写入文件出错", "错误", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Warning);
            }
            finally
            {
                fs.Close();
            }
        }
        private void 字体ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            fontDialog1.ShowDialog();
           
        }
      ///  private void vScrollBar1_Scroll(object sender, ScrollEventArgs e)
     ///  {
     ///     float  vAbsPos = (float)(vScrollBar1.Value - vScrollBar1.Minimum);
    ///        SetVerticalScrollMultipliter(pictureBox1);
    ///        if (vScrollBar1.Value > oldValue)
    ///        {
    ///         textBox2.Top = textBox2.Top - (int)(vScrollMutiplier * vAbsPos);
    ///        }
    ///        else if (vScrollBar1.Value < oldValue)
    ///        {
   // /            textBox2.Top = textBox2.Top + (int)(vScrollMutiplier * vAbsPos);
    ///        }
     ///       oldValue = vScrollBar1.Value;
   ///   }
  }
   }三杠线的是部分,待补全
回复

使用道具 举报

 楼主| 发表于 2008-7-2 19:57:05 | 显示全部楼层
这些东西我想了2小时。。。
有点晕了
回复

使用道具 举报

发表于 2008-7-2 20:50:34 | 显示全部楼层
华而不实...............
回复

使用道具 举报

发表于 2008-7-2 20:51:51 | 显示全部楼层
说实话,你做的更难看。
回复

使用道具 举报

发表于 2008-7-2 20:53:33 | 显示全部楼层
做的更難看+1

真想做的好
用VB不就輕鬆方便多了嗎?
回复

使用道具 举报

发表于 2008-7-2 21:03:26 | 显示全部楼层
VB,N年前乱写个记事本,加了很多乱七八糟的功能,还附带小游戏
但是。。。。。生成的文件,前后都带有“”
读取的文件,MS也都需要。。。。
回复

使用道具 举报

发表于 2008-7-2 21:16:52 | 显示全部楼层
VB同样照着样例改写过记事本的爬过
最后运行让机器缓冲溢出了

那是敲了一周代码,外加斯巴达修改的结果

从此发誓:就算世界末日,我也不学编程了
回复

使用道具 举报

发表于 2008-7-2 21:17:47 | 显示全部楼层
顺便半拉这次编写费心了,看到代码,又头疼了
回复

使用道具 举报

发表于 2008-7-2 21:26:01 | 显示全部楼层
LOL喵,这可是你本行啊,小心毕业论文喵~
顺便~捏~~~~~
回复

使用道具 举报

发表于 2008-7-2 22:01:51 | 显示全部楼层
VB那個“”不是可以簡單調整的嗎?
詳細的忘了,但至少我自己以前弄的絕無此問題

不過老實說,VB也就只有這些地方可以玩玩看
真正的還是乖乖的用C#吧
回复

使用道具 举报

 楼主| 发表于 2008-7-3 09:38:46 | 显示全部楼层
原帖由 Amynot 于 2008-7-2 21:34 发表
自带的的确是渣 不过你做的也不怎么样 这种软件实用性最高

YO..上面的小图标好多。。。功能满塞。
但是加点功能很难么?
。。。。。。。。。。
。。。。。。。。。。
。。。。。。。。。。
。。。。。。。。。
。。。。。。。。。
难个P,说了是2小时鼓捣出来的东西,能只把基本功能实现了
至于难看好看的问题,也要看人。
各位前辈看不过去是你们的事,我出来买酱油的
飘~
回复

使用道具 举报

发表于 2008-7-3 09:41:08 | 显示全部楼层
C语言吗?
main()
{
}
中间不会.....
回复

使用道具 举报

 楼主| 发表于 2008-7-3 09:41:17 | 显示全部楼层
原帖由 斩舰猫の空圆斩 于 2008-7-2 21:17 发表
顺便半拉这次编写费心了,看到代码,又头疼了

对了,十六夜同学幸运星的漫画买到了吗~~
回复

使用道具 举报

发表于 2008-7-3 13:48:51 | 显示全部楼层
写着玩玩没问题,只是代码中某些编写习惯实在不太好……
回复

使用道具 举报

 楼主| 发表于 2008-7-4 16:23:08 | 显示全部楼层
续更新。。。。。。。。。
LOLI猫快进来
回复

使用道具 举报

 楼主| 发表于 2008-7-4 16:35:39 | 显示全部楼层
美化问题下版再说。。。。
PHOTOSHOP。。我来了
回复

使用道具 举报

发表于 2008-7-4 20:19:34 | 显示全部楼层
这个是。。。勇敢的向操作系统进化中的记事本君?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|手机版|Archiver|Nw壬天堂世界 ( 京ICP备05022083号-1 京公网安备11010202001397号 )

GMT+8, 2024-5-18 05:53 , Processed in 0.014728 second(s), 3 queries , Redis On.

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表