Initially on denial (^_^)/, I finally have time to investigate the issue. Tanmoy actually got it correctly. So I created a new GUI demo on how to correctly kill a particular Excel process.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Excel;
using System.Diagnostics;
namespace ThreadingGUI_01
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
ApplicationClass app = new ApplicationClass();
if (app == null)
{
MessageBox.Show("Unable to Open Excel");
}
app.Visible = true;
_Workbook wb = app.Workbooks.Add(XlWBATemplate.xlWBATWorksheet);
this.listBox1.Items.Add(app.Hwnd);
}
private void button2_Click(object sender, EventArgs e)
{
if (this.listBox1.SelectedIndex >= 0)
{
Process[] procs = Process.GetProcessesByName("EXCEL");
int selectedExcel = (Int32)this.listBox1.SelectedItem;
foreach (Process p in procs)
{
if (p.MainWindowHandle.ToInt32() == selectedExcel )
{
p.Kill();
this.listBox1.Items.Remove(selectedExcel);
}
}
}
}
}
}
Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.
Larry Keiler asked me whether the Sodeve’s WP-Translate works on Blogger. The answer is no. This is because Blogger doesn’t use PHP (frankly, I’m don’t know. My hunch tells me it’s running on Python.)
I actually have written the JavaScript version of the plugin. You could see it running here.
Basically it consists of two parts, the JavaScript, and HTML. You could host the images in your own blogs, but it would be tedious to add the flags one by one. So I put them up at PhotoBucket. This way you can just copy and paste into your Blogger layout.
<table style="border=0px;padding:5px;">
<tr>
<td ><img alt="Back to English" style="cursor:pointer;" onclick="translateURL('');" src="http:/images/photobucket/uk.gif" /></td>
<td ><img alt="English to German" style="cursor:pointer;" onclick="translateURL('en_de');" src="http:/images/photobucket/germany.gif" /></td>
<td ><img alt="English to Spanish" style="cursor:pointer;" onclick="translateURL('en_es');" src="http:/images/photobucket/spain.gif" /></td>
<td ><img alt="English to French" style="cursor:pointer;" onclick="translateURL('en_fr');" src="http:/images/photobucket/france.gif" /></td>
<td><img alt="English to Italian" style="cursor:pointer;" onclick="translateURL('en_it');" src="http:/images/photobucket/italy.gif" /></td>
<td ><img alt="English to Portuguese" style="cursor:pointer;" onclick="translateURL('en_pt');" src="http:/images/photobucket/portugal.gif" /></td>
</tr><tr>
<td ><img alt="English to Dutch" style="cursor:pointer;" onclick="translateURL('en_nl');" src="http:/images/photobucket/netherlands.gif" /></td>
<td ><img alt="English to Greek" style="cursor:pointer;" onclick="translateURL('en_el');" src="http:/images/photobucket/greece.gif" /></td>
<td ><img alt="English to Nippon" style="cursor:pointer;" onclick="translateURL('en_ja');" src="http:/images/photobucket/japan.gif" /></td>
<td ><img alt="English to Korean" style="cursor:pointer;" onclick="translateURL('en_ko');" src="http:/images/photobucket/korea.gif" /> </td>
<td ><img alt="English to Russian" style="cursor:pointer;" onclick="translateURL('en_ru');" src="http:/images/photobucket/russia.gif" /> </td>
<td ><img alt="English to Simplified Chinese" style="cursor:pointer;" onclick="translateURL('en_zt');" src="http:/images/photobucket/china.gif" /></td>
</tr>
</table>
So now how to add it to Blogger? Please follow this steps:
Login to Blogger
Go to Dashboard, then click Layout
At the sidebar location. Click “Add a Page Element”
A new window will pop-up. Select ‘HTML/Javascript’, click ‘Add to Blog’
You now will have a text box and a text area. Leave the title blank. Copy the code described in the ‘Javascript Part’, then paste it in the text area. Then copy the code from ‘HTML Part’, and paste it also in the text area. Inside the text area, separate the Javascript and the HTML with one line.
You are good to go. If you like this tips, I would be grateful if you link-back to this blog. Thanks.
Good luck with your Blogger (^_^)/
List of Bloggers that use Sodeve’s WP-Translate, Blogger Edition:
Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.
A few days back, Dorota asked me to share the trick of those flags under this blog title. So here you are the WordPress plugin.
This plugin initially developed by Scott Hough. The original translation service used was Google Translate. But I was disappointed by the frequent errors thrown by Google Translate. Another bug was, you cannot translate more than once. To translate into other language, you need to go back to the original page and click different flag.
Requirements:
Your blog must be written in English. This is because only this language can be translated into many languages by Babel Fish.
You are using WordPress 1.5 and above. It’s tested in WordPress 2.1 (this blog (^_^)v )
You have access to install the plugin
Installation and Usage Guide:
Extract the zip file, upload the wp-translate directory to your plugins folder, usually wp-content/plugins/
Activate the plugin on the plugin screen.
Add <?php translate(n); ?> to your template where you want the flags to be displayed. n can be either 1 or 2. 1 is for a vertical display. 2 makes it horizontal.
For non WordPress user, you can still use this plugin provided your Web Server supports PHP. To do so, please follow this steps:
Extract the zip file
Edit wp-translate.php which is located in wp-translate directory
At line 103, replace $img_loc = get_settings(’siteurl’) . ‘/wp-content/plugins/wp-translate’; with $img_loc = ‘/wp-translate’;
Save the file
Upload the wp-translate directory to your root folder.
In the page you want the flags to be displayed, put <?php include_once(realpath($_SERVER[‘DOCUMENT_ROOT’]).’/wp-translate/wp-translate.php’); ?> in the first line of the file.
Add <?php wptranslate(n); ?> anywhere you want the flags to be displayed. n can be either 1 or 2. 1 is for a vertical display. 2 makes it horizontal.
If you like this plugin, please link-back to this post, or add me to your blog-roll. Would be greatly appreciated. Thank you.
Having problem with installing the plugin? You have ideas for the plugin? Post a comment and I will try my best to help you.
Howdy! I'm Hardono. I am working as a Software Developer. I am working mostly in Windows, dealing with .NET, conversing in C#. But I know a bit of Linux, mainly because I need to keep this blog operational. I've been working in Logistics/Transport industry for more than 11 years.