www.flickr.com

How to kill your program's process in Task Manager (VB.NET/C#) ?

Saturday, December 14, 2013 Posted by Glenn 5 comments

Getting pretty baffled on your C# or vb.NET programs? Your program is in the process in task manager although all of the windows are already closed? I already made several "quite"-big projects in vb.NET and seriously, such problem is really a pain the arse. :) But now, I'm learning C# and currently developing my program called: "Employee Locator v2.0". Anyways, I would like to share this solution that I've recently found out. After an hour, I finally solved my problem haha!

By the way, this program opens first its splashscreen, which of course let the user be informed what is going on in the background. During such duration of splashing such splashscreen, the user can close the program instantly, just like in MS Office 2013. Now, as soon as the user clicks the X button, the program is supposed to be closed and cleared in the Task Manager.




Also, if the main window is to be closed by the user, the program shouldn't be displaying in the Task Manager Processes.
So, after several steps and changing of codes, I finally got the answered. In order to be sure: I executed these two steps:

1. As I've said, if the x button in the splashscreen is clicked, the whole program is killed! --- CHECKED!
2. If the Main Window is closed (X button is clicked), the whole program should also be killed! --- CHECKED!

SOLUTION:
1. Go to App.xaml, set your shutdownmode: (note that my StartupUri is set to my SplashScreen)

ShutdownMode="OnLastWindowClose"

2. In your MainWindow XAML, add this:

Closing="Window_Closing" Closed="Window_Closed"

3. Finally, make a closing handle event in your MainWindow.xaml.cs

       private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            System.Environment.Exit(0);
         }

        private void Window_Closed(object sender, EventArgs e)
        {
            System.Environment.Exit(0);
        }

There are lots of ways to solve this, I know :). In order to be sure and avoid more debugging, I just doubled my event handlers. The Window_Closing and the Window_Closed.

article by: Glenn Posadas

additional tags: WPF in C#.NET, how to handle closing events, how to close all the apps in C# and VB.NET, VB.NET/C# closing events, closing events in C# WPF, WPF C# close all process after closing windows, C# WPF SplashScreen problems.

Sharing is so Easy:
StumpleUpon DiggIt! Del.icio.us Blinklist Yahoo Furl Technorati Simpy Spurl Reddit Google Twitter FaceBook

Best motivation (quote) for those who go to GYM

Tuesday, December 10, 2013 Posted by Glenn 0 comments

NEVER GIVE UP BITCH!!!


So....sometimes laziness strikes me severely. lol. Studies and other stuffs that keep me so busy really hinder me to go to the gym. I can't show you guys right now my THEN and NOW picture. ahahah! Soon I promise! But really, this photo above is very true! right? Sometimes when I just couldn't go to the gym, I feel like my muscles are getting weaker and getting back to its old small form. XD. I tell my classmates, you can't just forget what you've paid in the gym, and what you've lost in that gym to gain some muscle.

Sharing is so Easy:
StumpleUpon DiggIt! Del.icio.us Blinklist Yahoo Furl Technorati Simpy Spurl Reddit Google Twitter FaceBook

Labels:

Free Internet for Computers using Android or any cellphones

Posted by Glenn 0 comments

photo courtesy of ABS-CBN news.
Article by: Glenn Posadas

Thanks to the partnership of Globe Telecoms and Facebook, users can now access the Facebook using their Android phones or any mobile phones as long as it provides you a GPRS access.

But apparently, Globe is not smart enough to block all the websites. Wait, what? Yes, Globe can't block other sites (google, yahoo, in fact all websites!!!) unless you are using a mobile phone.

Basically, this blog post aims to tell my readers that we can now have a free internet access until January! But how?
ANSWER: By tethering our Mobile Phones to our PC/Laptop. (NOTE: I use CM Flare v1.0 )

Steps:
Simple as ABC: just make sure your account or sim card is now available to access and browse the Facebook.
Next is to tether our cellphone to our PC or laptop.
How to tether? Just find it out in Settings of your mobile phone. I don't think tethering is available in iOS. My girlfriend has an ipadMini but I can't find tethering function there.
If the tethering is successful, voila! You can now browse the web. Don't forget to share this and share your speedtest. By the way, the Download/Upload speed doesn't mean you can access or browse a certain website in just a short period of time.

Here is my speedtest result: (anyways, my classmate had 5mbps dl speed but not fast enough to open a website).


additional tags: free internet for android 2013, 2013 free internet for pc desktops, free internet for laptops, free internet using android cellphones 2013, 2013 free internet unlimited android operating system.

Sharing is so Easy:
StumpleUpon DiggIt! Del.icio.us Blinklist Yahoo Furl Technorati Simpy Spurl Reddit Google Twitter FaceBook

Labels: ,