21.10.10

Disable Direct Access to iframe !

Hey today i'm gonna show you how to NOT let people access your iframe directly !

It's quiet simple in JavaScript ;)

here is the code: (make sure you put it above the </head> tag)

<script type="text/javascript">
    if (top.location == self.location) {
        top.location = "FULL-URL-HERE";
    }
</script>
Just make sure you replace the "FULL-URL-HERE" to the URL you would like to redirect them ;)

And you'r done no one can access your iframe directly :)

6.10.10

Run C# Console Application Without a Window

Or simply run a hidden Console Application. (C#)

Ok first of all if you want the application to be hidden right click the Project in the Solution Explorer then Properties inside Properties go to Application then Output type and change Console Application to Windows Application.

Now if you want to run a hidden Console Application from a running Console Application we gonna do some coding :)

First of all - using System.Diagnostics;

Then:

Process myProcess = new Process();
myProcess.StartInfo.FileName = @"C:\App.exe"; // Path to the Application
myProcess.StartInfo.CreateNoWindow = true; // YES create in new window
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; //Make the new window Hidden :)
myProcess.Start();
Now you'r done :)

Happy coding, and don't forget to subscribe ! :P