RSS

>Directing to web pages in a desktop application

26 Feb

>Herkese merhabalar;

Size console uygulamalarında web sayfalarını nasıl açabileceğimizi göstereceğim.
Java kodu

import java.awt.Desktop;
import java.net.URI;

public abstract class TestClass {
public static void main(String[] args) {
Desktop d;
URI u;
try {
d = Desktop.getDesktop();
d.browse(u);
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
}

C# Kodu

using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Process.Start(
http://www.bing.com/”);
}
}
}


Herkese kolay gelsin🙂

 
Leave a comment

Posted by on February 26, 2010 in C#, Java, Misc

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: