Author Date of submission User level
Maheswara Rao 07/18/2001 Intermediate
Source Code sunmsmsrao.zip 7 KB
Hi Sharpers
This is Mahesh again after some. In this article I am going to show you to call Java program using C #.
According Microsoft definition of C #:-
揅 # is a simple, modern. Object oriented language and combine the high productivity of VB and the raw power of c++?/font>
According mahesh definition of C #:-
揅 # is simple, modern, Object oriented beautiful language and daughter (She-sharp) of Java and Microsoft?/font>
What I want to say Sun (Sun) and MS (moon) both are very-IT world Important But both now are now They are making languages to dominate each of the other. This is sure without sun and moon there are no world like so with out sun and MS there are no IT world. I pry to God to make both are good the friends they should for IT work.
This application has 4 files
Shesharp.cs
Javasharp.java
Comp.bat//for Compel
J.bat
In this application I used the 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.darkorange,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;
}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.