-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathProgram.cs
More file actions
48 lines (46 loc) · 1.55 KB
/
Copy pathProgram.cs
File metadata and controls
48 lines (46 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using eraAPK.Forms;
using System.Runtime.InteropServices;
using System.IO;
namespace eraAPK
{
class Program
{
private static eraGUI GUI;
[DllImport("user32.dll")]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll")]
public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
[STAThread]
static void Main(string[] args)
{
Program.consoleOcultar();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
GUI = new eraGUI();
if (Directory.Exists(Directory.GetCurrentDirectory() + "\\temp"))
Directory.Delete(Directory.GetCurrentDirectory() + "\\temp", true);
Directory.CreateDirectory(Directory.GetCurrentDirectory() + "\\temp");
Application.Run(GUI);
}
public static void consoleOcultar()
{
IntPtr hWnd = FindWindow(null, Console.Title.ToString());
ShowWindow(hWnd, 0);
}
public static void consoleMostrar()
{
IntPtr hWnd = FindWindow(null, Console.Title.ToString());
ShowWindow(hWnd, 1);
}
public static void OcultarAlgo(string t) //Titulo
{
IntPtr hWnd = FindWindow(null, t);
ShowWindow(hWnd, 0);
}
}
}