Kısayol Oluşturma- Ekran Görüntüsü Yakalama

Kısayol Oluşturma

Bir buton ekliyorsunuz ve butonun içine bu kodu yazın.

using IWshRuntimeLibrary;
//////////////////////////////////////////////////////////////////////////////////////////
private void button1_Click(object sender, EventArgs e)
{
WshShell shell = new WshShell();
IWshShortcut MyShortcut;
//  [UserName] Bilgisayarın kendi kullanıcı adını yazacaksınız.
 
MyShortcut = (IWshShortcut)shell.CreateShortcut(@"C:\Documents and Settings\[UserName]\Start Menu\Programs\MyShortcut.lnk");
MyShortcut.TargetPath = Application.ExecutablePath;
MyShortcut.Description = "Launch the App!";
// MyShortcut.IconLocation = [IconPath]; // [IconPath] - Kısaylun varsa resim yolunu yazın
 
MyShortcut.Save();
}

Ekran Görüntüsü Yakalama

 
using System.Drawing.Imaging;
using System.Threading;
 
///////////////// Declarations ////////////////////////
ImageFormat img; Bitmap bt; Graphics screenShot;
 
///////////////////// Button1 /////////////////////////////
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
this.Hide();
// This gives time to the Form to hide before it takes the screenshot. 500 miliseconds are enough.
Thread.Sleep(500);
// Set the image to the size of the screen.
bt = new Bitmap(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height, PixelFormat.Format32bppArgb);
// Creates the graphic object for the image (bt).
screenShot = Graphics.FromImage(bt);
// Takes the screenshot.
screenShot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X, Screen.PrimaryScreen.Bounds.Y, 0, 0, Screen.PrimaryScreen.Bounds.Size,
 
CopyPixelOperation.SourceCopy);
switch (saveFileDialog1.FilterIndex)
{
case 0: img = ImageFormat.Bmp; break;
case 1: img = ImageFormat.Png; break;
case 2: img = ImageFormat.Jpeg; break;
}
// Saves the image.
bt.Save(saveFileDialog1.FileName, img);
// After the screenshot is taken the Form reappears.
this.Show();
}
 
 
<div id="-chrome-auto-translate-plugin-dialog" style="display: none; opacity: 1 !important; border-color: none !important; background: transparent !important; padding: 0 !important; margin: 0 !important; position: absolute !important; top: 0; left: 0; overflow: visible !important; z-index: 999999 !important; text-align: left !important;">
<div style="max-width: 300px !important; color: #fafafa !important; opacity: 0.8 !important; border-color: #000000 !important; border-width: 0px !important; -webkit-border-radius: 10px !important; background-color: #363636 !important; font-size: 16px !important; padding: 8px !important; overflow: visible !important; background-image: -webkit-gradient(linear, left top, right bottom, color-stop(0%, #000), color-stop(50%, #363636), color-stop(100%, #000)); z-index: 999999 !important; text-align: left  !important;"></div>
 
<img style="position: absolute !important; z-index: -1 !important; right: 1px !important; top: -20px !important; cursor: pointer !important; -webkit-border-radius: 20px; background-color: rgba(200, 200, 200, 0.3) !important; padding: 3px 5px 0 !important; margin: 0 !important;" onclick="document.location.href='http://translate.google.com/';" src="http://www.google.com/uds/css/small-logo.png" alt="" /></div>
 

Ara 18th, 2011 | Kategoriler C# Dersleri | Toplam Okunma=27.583
Tags:
İlk yorumu siz yazın.

Yorum Yazın

XHTML: İzin verilen HTML kodları: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>