教程中国
PHOTOSHOP CS9.0中文版 MAYA 8.5 FOR WINDOWS Corel Painter v9.0 Flash MX2004 中文版 Illustrator cs2 中文版
VC++6.0含sp6 中英文版 VB6.0 +sp6 简体中文版 Borland Delphi 7汉化版 MSDN for vb6.0中文版 Visual Studio 2005简体
教程中国下属 文件存储共享专家BIBIDU.COM 提供大型软件,教材,源码,电影,音乐,图书等下载 更多精品请点此进入
  您目前所在位置: 教程中国 >> .NET类 >> ASP.NET >> 从C#里调用java程序 RSS订阅
从C#里调用java程序
教程(视频,书籍)下载:  ASP.NET AutoCAD 数据库 C# ASP java photoshop 网页设计 delphi 3dmax Flash C++ VB 张孝祥 实例   更多请进入BIBIDU搜索
IT搜索引擎   
http://www.c-sharpcorner.com/1/CallingJavaFromCSMSRao.ASP
  
  
What I want to say SUN (sun) and MS (moon) both are very Important to IT
WORLD (world) but both are now enemies now a days they are making languages
to dominate each other.  This is sure without sun and moon there is no world
like that with out SUN and MS there is no IT WORLD. I pry to god to make both
are good friends they should work for IT PEOPLE.
  
This application has 4 files
shesharp.cs
javasharp.java
comp.bat  //for compel
j.bat
  
In this application I used Inner class for developing panel.
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Diagnostics;
using System;
  
//for mixed background
public void format(object s,PaintEventArgs a)
    {
      Graphics g=CreateGraphics();
      Rectangle rect=new Rectangle(0,0,300,300);
      Color nyc=Color.FromArgb(200,50,5,200);
      LinearGradientBrush b=new       LinearGradientBrush(rect,Color.DarkOra
nge,nyc,LinearGradientMode.Vertical);
      g.FillRectangle(b,rect);
    }
//for calling java program
private void calljava(object ob,EventArgs arg)
    {
        Process.Start("j.bat");
    }
//using Inner class for panel
public class pp:Panel
    {
     int x;
     int y;
     Timer t=new Timer();
     String s="Hi...\nyou Know?\nWe are good Friends\nI can call Java ...";
     String mail="mail me..\nmallm_uma@rediffmail.com\nmahe_proj@rediffmail.
com";
     private Label l=null;
     private Label maill=null;
     Color nyc;
//Constructor
     public pp()
       {
       x=10;
       y=200;
     this.Location=new Point(0,10);
     nyc=Color.FromArgb(200,10,5,225);
     this.Size=new Size(300,230);
     maill=new Label();
     l=new Label();
     l.Text=s;
     l.Size=new Size(250,100);
     l.ForeColor=nyc;
     l.BackColor=Color.Transparent;
     l.Font=new Font("verdana",15,FontStyle.Bold);
     l.TextAlign=ContentAlignment.MiddleCenter;
     maill.Text=mail;
     maill.Size=new Size(160,40);
     maill.Location=new Point(10,192);
     maill.Font=new Font("verdana",7,FontStyle.Bold);
     maill.ForeColor=Color.Yellow;
     maill.BackColor=Color.Transparent;
     this.Controls.Add(l);
     this.Controls.Add(maill);
     t.Interval=50;
     t.Tick+=new EventHandler(draw);
     t.Enabled=true;
      }
   protected override void OnPaint(PaintEventArgs a)
     {
      Graphics g=a.Graphics;
      Rectangle rect=new Rectangle(0,0,300,230);
      LinearGradientBrush b=new LinearGradientBrush(rect,Color.DarkOrange,ny
c,LinearGradientMode.Vertical);
      g.FillRectangle(b,rect);
      Font ff=new Font("Arial",14,FontStyle.Bold);
      SolidBrush bb=new SolidBrush(nyc);
      StringFormat df=new StringFormat();
     }
//for animation
     void draw(object ob,EventArgs a)
     {
     l.Location=new Point(x,y);
      --y;
      if(y==-100)y=230;
        }
    }
    public static void Main()
    {
    Application.Run(new shesharp());
    }


来源:upschool.com.cn
作者:
关键字:从C,里调用java程序
发表日期:2005-12-23

网页显示有限 阅读全文请下载本文完整版WORD文档

上一篇:用C#来捕获屏幕 (ZT-)   下一篇:c#重点知识详解(三)(转)


2009-1-9 19:34:20
本文的相类似文章
  • 从Caché 看后关系型数据库的发展
  • 让 应 用 程 序 从Ctrl-Alt-Del 列 表 中 消 失
  • 从C#中访问DHTML DOM对象
  • 从CPU的技术参数认识CPU
  • 从COSO报告看我国内部控制体系的构建
  • 从COM组件调用.NET组件编程实战
  • 从csdn上看到的一些文章,好象有人转过,再转一次吧——C#算法-----(一)选择排序 (
  • 从C#里调用java程序
  • 从C#转到VB .net
  • 从csdn上看到的一些文章,好象有人转过,再转一次吧——C#算法-----(一)选择排序 (solarsoft原创)
  • 在学习中进步 在进步中成长 教程中国相随您的成长之路
    华腾联合科技股份有限公司版权所有
    广告联系:Rosibo@163.com