|
9252
|
Sistemas Operativos / Windows / Re: ¿Por que tanto odio hacia Windows 8?
|
en: 10 Abril 2013, 17:50 pm
|
PD: @gAb1, Aquí tienes un claro ejemplo de porque tanta critica hacia W8. La gente sin mas se fian (copian) de lo que dicen los demás.. No les importa si es cierto o no.. Espero que no me estés llamando mentiroso y eso séa lo que quisiste decir nada más xD Yo como ya dije cada uno puede sacar sus própias conclusiones respecto al SO que utilice. Hay aspectos de Windows 8 que algunos consideramos muy malos, pero otras personas se benefician de ellos y les parece bueno, empezándo por algo tán básico como la interfaz del SO, en fín es imposible ponerse deacuerdo en algo como esto si nombramos todos los nuevos aspectos de Win8. Por otro lado tengo que decir, para defender la postura de dato000 y contradecir un poco ese comentario (porque según se mire...), si una persona va a una tienda de electrodomésticos y le dicen que una plancha es mala o buena, pues todos confiamos en que la opinión del vendedor séa cierta, ¿no?, y esa es la misma opinión que el comprador le va a dar a su familia, amigos, etc, y todos van a pensar que esa plancha es una m**** sin haberla probado, a menos que el tipo séa un maestro en planchar corbatas y sepa que el vendedor le mintió...xD. En fín, con esto quiero decir que me parece lo más normal del mundo tomar como referencia la opinión de otra persona que te parezca de confianza, aunque si que es cierto que eso es "hablar sin saber" y lo mejor es que uno mismo pruebe "X" producto y obtenga sus própias conclusiones (para que luego te digan eso de: "Cuanta razón tenías!") . Saludos!
|
|
|
9253
|
Programación / .NET (C#, VB.NET, ASP) / Re: [APORTE] Plantillas de Game Launchers para juegos de Steam
|
en: 10 Abril 2013, 17:36 pm
|
Es que esto de la piratería se lo toman a guasa todo dios, por no decir hasta la policia, pero yo que se... Es que es de guasa, Copiar no es Robar, Compartir tampoco es robar. No enserio, se lo que pasa con la pirateria y todo eso, pero si fueses tan amable de explicarme o mandarme un link dnde explicase, que pasaria si denunciasen la web de piratería de IKillnukes? xD
Bueno, yo no soy abogado macho!, pero que yo sepa la SGAE te da un límite de 3 a 7 días (no lo recuerdo bien) para que cierres la web (O sinó te la cierran ellos), pero la multa según tengo entendido te la llevas igual, si quieres saber más sobre estas cosas deberías preguntarle a cualquier admin que lleve una web donde suban pelis y esas cosas, que deben estar muy puestos en el tema. Para evitar denuncias deberías subirlo a la nube o en servidores rusos (si la política de allí sigue igual como estaba hace unos meses, que no lo sé). Sabrás de sobra que los temas ilegales están prohibidos en este foro, así que mejor dejar el tema aquí, que además le estás quitando protagonismo a los launchers con el tema de la piratería x'D. Si quieres podriamos hablar por la chat de mi web Espero que no te sepa mal pero no me interesa en absoluto meterme en esas cosas (formar parte de ese tipo de webs, o algo parecido), no porque subas material ilegal, sinó porque ponerme a subir juegos en una web no es lo mío, no me apetece nada la verdad, ni tampoco me voy a poner a codear launchers para todos los juegos que existen, sólo lo hago para los que tengo ocasión de jugar y me gustan. Saludos!
|
|
|
9254
|
Programación / .NET (C#, VB.NET, ASP) / Re: [APORTE] Plantillas de Game Launchers para juegos de Steam
|
en: 10 Abril 2013, 17:14 pm
|
lo guapo sería una web con estas plantillas y con los chetos Ya hay demasiadas webs que comparten chetos, y muy buenas, como GameCopyWorld, e incluso de trainers dedicados como CheatHappens donde te hacen un trainer por un módico précío. (Sorry por el spam) Que te parece si lo metemos en mi web? No sé cual es tu web, no creo que séa la del MineCraft porque dices que subes juegos piratas y ahi yo solo véo el MineCraft xD Pero en fín, mételo donde quieras siempre que respetes el nombre dle autor (YO), es gratis y cada uno puede usar estas plantillas como le apetezca para diseñar un launcher. Saludos
|
|
|
9255
|
Programación / .NET (C#, VB.NET, ASP) / Re: [APORTE] Plantillas de Game Launchers para juegos de Steam
|
en: 10 Abril 2013, 16:56 pm
|
eso se supone que tu le metes la app que es y carga la plantilla? eing?! no te he entendido, son proyectos (solutions) para el VS. Las plantillas sólo fácilitan la tarea de cargar esa combinación de aplicaciones (steam + juego + trainer + "X"), para automatizarlo o portabilizarlo, nada más. Edito: Si, puedes hacer un acceso directo (o 4 en casos como este...), o hacerlo desde un Bat, de hecho yo siempre lo hago primero en Batch, pero un launcher gráfico es mucho más bonito, más seguro (errores), y lo considero más rápido (una vez guardas la configuración actual para usarla la próxima vez). Y eso de los chets, se puede poner desde Steam? Es que no entiendo bien de Steam. Tampoco lo he entendido muy bien. Se pueden usar trucos online, yo he jugado con munición infinita por steam y demás. Las malas lenguas dicen que si usas trucos te banean, pero solo lo hacen para asustar (para ver si asi dejan de joder usando trucos), te lo dice alguien que tiene legálmente Steam hace unos 7 años y chetando a saco en los servers de Steam sin problemas xD. Si no has entendido algo dímelo. Saludos! PD: Aquí tienes la versión Batchera para ti y para todos: :: Launcher Configuration Set " Title=TombRaider Launcher by Elektro H @cker" Set "Game=TombRaider.exe" Set "Trainer=TombRaider-Trainer.exe" Set "MouseLock=MouseLock.exe" Set "SteamDIR=C:\Juegos\Counter Strike" :: Steam Configuration ( Echo ActivityLogEnable = disable Echo ActivityLogGroupSteamAPI = disable Echo BootStrapperForceClientBootstrap = disable Echo BootStrapperForceSelfUpdate=disable Echo BootStrapperInhibitAll=enable Echo CachePreLoaderMode = disable Echo EngineInSameProcessAsClient = disable Echo FullMemoryMinidumps = disable )>"%SteamDIR%\Steam.cfg" :: CMD Config MODE CON Cols=50 lines=10 :: Run Steam Echo Waiting for Steam to load... | MORE Start /B """" "%SteamDIR%\Steam.exe" -applaunch 0 :Steam_Is_Loading (cmdow | find /I "steam" | Findstr /I "amigos friends" 1 >Nul 2 >&1 ) || (GOTO : Steam_Is_Loading) :: Run Game things Echo Running the game... | MORE Echo [+] The key to unlock the mouse is "CTRL+C". (TaskList /FI "IMAGENAME eq %MouseLock%" 1 >NUL 2 >&1 | FIND " %MouseLock%" ) || (Start /B """" " %MouseLock%" ) (TaskList /FI "IMAGENAME eq %Trainer%" 1 >NUL 2 >&1 | FIND " %Trainer%" ) || (Start /B """" " %Trainer%" ) (TaskList /FI "IMAGENAME eq %Game%" 1 >NUL 2 >&1 | FIND " %Game%" ) || (Start /W """" " %Game%" ) :: Clean Del /Q /F ".\SteamAPI.log" 2 >Nul TaskKill /F /T /IM " %Trainer%" 1 >Nul 2 >&1 TaskKill /F /T /IM " %MouseLock%" 1 >Nul 2 >&1 TaskKill /F /T /IM "Steam.exe" 1 >Nul 2 >&1
|
|
|
9256
|
Programación / .NET (C#, VB.NET, ASP) / [APORTE] Plantillas de Game Launchers para juegos de Steam
|
en: 10 Abril 2013, 16:21 pm
|
Estos dos proyectos los comparto como plantillas para las personas que quieren hacer un Game launcher. Los dos poryectos son idénticos, y estas son algunas de sus características a resaltar: · Configuración portable en un archivo INI sencillísima e intuitiva (Para usarlo en juegos autoextraibles con WinRAR por ejemplo) · Drag&drop en los textboxes · Permite soltar accesos directos también (.lnk) en los textboxes, · La mayor parte del code (sobre todo los eventos de controles) está muy simplificado y optimizado · Está todo bastante optimizado en el code para poder modificar el diseño fácilmente mediante variables (título del juego y del launcher, colores y fuente de texto, etc...) · Varios controles de errores ...Y en definitiva creo que me han quedado bonito como plantillas. Los dos proyectos son WinForms, y he usado VS2012 y el FrameWork 3.5. El método y el orden de carga del programa es este: 1. Primero se ejecuta Steam (si estuviera seleccionado) con el parámetro "-applaunch 0" para que no salga la ventana de auto-login. (el proceso espera a que Steam se haya cargado complétamente) 2. Se ejecuta el Trainer (si hubiera alguno seleccionado) 3. Se ejecuta la aplicación alternativa (si hubiera alguna seleccionada), esta aplicación alternativa puede ser por ejemplo un programa para bloquear el mouse... http://foro.elhacker.net/net/source_mouselock_gui_version-t387309.0.html4. Se ejecuta el Juego y se monitoriza su ejecución hasta que el proceso del juego se cierre. Descarga: www.elektrostudios.tk/Game Launchers by Elektro H@cker.rarEspero que os guste, Saludos!
|
|
|
9257
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets)
|
en: 10 Abril 2013, 13:25 pm
|
· Cargar fuentes de texto desde los recursos: Nota: Este code ya lo posteé pero se me olvidó agregar lo más importante, la class, así que lo vuelvo a postear xD #Region " Use Custom Text-Font " ' [ Use Custom Text-Font ] ' ' Instructions : ' 1. Add a .TTF font to the resources ' 2. Add the class ' 3. Use it ' ' Examples: ' Label1.Font = New Font(GameFont.Font, 10.0!) ' Label1.Text = "This is your custom font !!" Dim MyFont As New CustomFont(My.Resources.kakakaka) Private Sub Main_Disposed(sender As Object, e As System.EventArgs) Handles Me.Disposed MyFont.Dispose() End Sub ' CustomFont.vb #Region " CustomFont Class " Imports System.Drawing Imports System.Drawing.Text Imports System.Runtime.InteropServices ''' <summary> ''' Represents a custom font not installed on the user's system. ''' </summary> Public NotInheritable Class CustomFont Implements IDisposable Private fontCollection As New PrivateFontCollection() Private fontPtr As IntPtr #Region "Constructor" ''' <summary> ''' Creates a new custom font using the specified font data. ''' </summary> ''' <param name="fontData">The font data representing the font.</param> Public Sub New(ByVal fontData() As Byte) 'Create a pointer to the font data and copy the 'font data into the location in memory pointed to fontPtr = Marshal.AllocHGlobal(fontData.Length) Marshal.Copy(fontData, 0, fontPtr, fontData.Length) 'Add the font to the shared collection of fonts: fontCollection.AddMemoryFont(fontPtr, fontData.Length) End Sub #End Region #Region "Destructor" 'Free the font in unmanaged memory, dispose of 'the font collection and suppress finalization Public Sub Dispose() Implements IDisposable.Dispose Marshal.FreeHGlobal(fontPtr) fontCollection.Dispose() GC.SuppressFinalize(Me) End Sub 'Free the font in unmanaged memory Protected Overrides Sub Finalize() Marshal.FreeHGlobal(fontPtr) End Sub #End Region #Region "Properties" ''' <summary> ''' Gets the font family of the custom font. ''' </summary> Public ReadOnly Property Font() As FontFamily Get Return fontCollection.Families(0) End Get End Property #End Region End Class #End Region #End Region
· Esperar a que una aplicación termine de CARGAR Nota : El código no está muy simplificado, pero se puede usar y funciona bien. Nota 2: Esto sirve para aquellas aplicaciones a las que no le afecta un "Process.WaitForInputIdle", de lo contrario es una tontería usar este code tán largo y bruto. Ejemplo de uso: Private Sub Wait_For_Application_To_Load(ByVal APP_Path As String, Optional ByVal APP_Arguments As String = Nothing) Process.Start("Photoshop.exe") Timer_CheckCPU.Tag = "Photoshop" Timer_CheckCPU.Enabled = True While Not Timer_CheckCPU.Tag = "" Application.DoEvents() End While End Sub
#Region " Wait For Application To Load (UNFINISHED AND WAITING TO BE IMPROVED)" Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByVal lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer Private WithEvents Timer_CheckCPU As New Timer Dim Memory_Value_Changed As Boolean Dim CPU_Changed As Boolean Dim CPU_Time As Boolean Dim Running_Time As Boolean Private _desiredTime_ms As Integer = 1500 Private Sub Timer_CheckCPU_Tick(sender As Object, ev As EventArgs) Handles Timer_CheckCPU.Tick Timer_CheckCPU.Enabled = False Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName(Timer_CheckCPU.Tag) Dim hprocess As Process = pProcess(0) If hprocess Is Nothing Then Running = False Timer_CheckCPU.Enabled = True Return End If Running = True Memory = hprocess.PrivateMemorySize64 CPUTotal = hprocess.TotalProcessorTime.TotalMilliseconds If AllConditionsGood() Then If Not (_countdown.IsRunning) Then _countdown.Reset() _countdown.Start() End If Dim _elapsed As Long = _countdown.ElapsedMilliseconds If _elapsed >= _desiredTime_ms Then Timer_CheckCPU.Tag = "" Return End If Else _countdown.Reset() End If Timer_CheckCPU.Enabled = True End Sub Private Function AllConditionsGood() As Boolean If CPU_Time Then Return False If Memory_Value_Changed Then Return False If Running_Time Then Return False Return True End Function Private _countdown As New Stopwatch Private _Running As Boolean = False Public WriteOnly Property Running() As Boolean Set(ByVal value As Boolean) _Running = value If value Then Running_Time = False Else Running_Time = True End If End Set End Property Private _CPUTotal As Double Public WriteOnly Property CPUTotal() As Double Set(ByVal value As Double) CPU = value - _CPUTotal 'used cputime since last check _CPUTotal = value End Set End Property Private _CPU As Double Public WriteOnly Property CPU() As Double Set(ByVal value As Double) If value = 0 Then CPU_Time = False Else CPU_Time = True End If _CPU = value End Set End Property Private _Memory As Long Public WriteOnly Property Memory() As Long Set(ByVal value As Long) MemoryDiff = Math.Abs(value - _Memory) _Memory = value End Set End Property Private _MemoryDiff As Long Public WriteOnly Property MemoryDiff() As Long Set(ByVal value As Long) If value = _MemoryDiff Then Memory_Value_Changed = False Else Memory_Value_Changed = True End If _MemoryDiff = value End Set End Property #End Region
|
|
|
9258
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets)
|
en: 9 Abril 2013, 20:23 pm
|
· Devuelve el título de la ventana de un proceso #Region " Get Process Window Title Function " ' [ Get Process Window Title Function ] ' ' // By Elektro H@cker ' ' Examples : ' MsgBox(Get_Process_Window_Title("cmd")) ' MsgBox(Get_Process_Window_Title("cmd.exe")) Private Function Get_Process_Window_Title(ByVal ProcessName As String) As String If ProcessName.ToLower.EndsWith(".exe") Then ProcessName = ProcessName.Substring(0, ProcessName.Length - 4) Dim ProcessArray = Process.GetProcessesByName(ProcessName) If ProcessArray.Length = 0 Then Return Nothing Else Return ProcessArray(0).MainWindowTitle End Function #End Region
· Devuelve el handle de un proceso #Region " Get Process Handle Function " ' [ Get Process Handle Function ] ' ' // By Elektro H@cker ' ' Examples : ' MsgBox(Get_Process_Handle("cmd")) ' MsgBox(Get_Process_Handle("cmd.exe")) Private Function Get_Process_Handle(ByVal ProcessName As String) As IntPtr If ProcessName.ToLower.EndsWith(".exe") Then ProcessName = ProcessName.Substring(0, ProcessName.Length - 4) Dim ProcessArray = Process.GetProcessesByName(ProcessName) If ProcessArray.Length = 0 Then Return Nothing Else Return ProcessArray(0).MainWindowHandle End Function #End Region
· Devuelve el PID de un proceso #Region " Get Process PID Function " ' [ Get Process PID Function ] ' ' // By Elektro H@cker ' ' Examples : ' MsgBox(Get_Process_PID("cmd")) ' MsgBox(Get_Process_PID("cmd.exe")) Private Function Get_Process_PID(ByVal ProcessName As String) As IntPtr If ProcessName.ToLower.EndsWith(".exe") Then ProcessName = ProcessName.Substring(0, ProcessName.Length - 4) Dim ProcessArray = Process.GetProcessesByName(ProcessName) If ProcessArray.Length = 0 Then Return Nothing Else Return ProcessArray(0).Id End Function #End Region
|
|
|
9259
|
Programación / .NET (C#, VB.NET, ASP) / Sobre los child handles
|
en: 9 Abril 2013, 19:54 pm
|
Necesito listar todos los handles hijos de un proceso, para eso utilizo esta Class: http://kellyschronicles.wordpress.com/2008/06/23/get-window-handles-associated-with-process-in-vb-net/Imports System.Collections.Generic Imports System.Runtime.InteropServices Imports System.Text Public Class ApiWindow Public MainWindowTitle As String = "" Public ClassName As String = "" Public hWnd As Int32 End Class ''' <summary> ''' Enumerate top-level and child windows ''' </summary> ''' <example> ''' Dim enumerator As New WindowsEnumerator() ''' For Each top As ApiWindow in enumerator.GetTopLevelWindows() ''' Console.WriteLine(top.MainWindowTitle) ''' For Each child As ApiWindow child in enumerator.GetChildWindows(top.hWnd) ''' Console.WriteLine(" " + child.MainWindowTitle) ''' Next child ''' Next top ''' </example> Public Class WindowsEnumerator Private Delegate Function EnumCallBackDelegate(ByVal hwnd As Integer, ByVal lParam As Integer) As Integer ' Top-level windows. Private Declare Function EnumWindows Lib "user32" _ (ByVal lpEnumFunc As EnumCallBackDelegate, ByVal lParam As Integer) As Integer ' Child windows. Private Declare Function EnumChildWindows Lib "user32" _ (ByVal hWndParent As Integer, ByVal lpEnumFunc As EnumCallBackDelegate, ByVal lParam As Integer) As Integer ' Get the window class. Private Declare Function GetClassName _ Lib "user32" Alias "GetClassNameA" _ (ByVal hwnd As Integer, ByVal lpClassName As StringBuilder, ByVal nMaxCount As Integer) As Integer ' Test if the window is visible--only get visible ones. Private Declare Function IsWindowVisible Lib "user32" _ (ByVal hwnd As Integer) As Integer ' Test if the window's parent--only get the one's without parents. Private Declare Function GetParent Lib "user32" _ (ByVal hwnd As Integer) As Integer ' Get window text length signature. Private Declare Function SendMessage _ Lib "user32" Alias "SendMessageA" _ (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32 ' Get window text signature. Private Declare Function SendMessage _ Lib "user32" Alias "SendMessageA" _ (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As StringBuilder) As Int32 Private _listChildren As New List(Of ApiWindow) Private _listTopLevel As New List(Of ApiWindow) Private _topLevelClass As String = "" Private _childClass As String = "" ''' <summary> ''' Get all top-level window information ''' </summary> ''' <returns>List of window information objects</returns> Public Overloads Function GetTopLevelWindows() As List(Of ApiWindow) EnumWindows(AddressOf EnumWindowProc, &H0) Return _listTopLevel End Function Public Overloads Function GetTopLevelWindows(ByVal className As String) As List(Of ApiWindow) _topLevelClass = className Return Me.GetTopLevelWindows() End Function ''' <summary> ''' Get all child windows for the specific windows handle (hwnd). ''' </summary> ''' <returns>List of child windows for parent window</returns> Public Overloads Function GetChildWindows(ByVal hwnd As Int32) As List(Of ApiWindow) ' Clear the window list. _listChildren = New List(Of ApiWindow) ' Start the enumeration process. EnumChildWindows(hwnd, AddressOf EnumChildWindowProc, &H0) ' Return the children list when the process is completed. Return _listChildren End Function Public Overloads Function GetChildWindows(ByVal hwnd As Int32, ByVal childClass As String) As List(Of ApiWindow) ' Set the search _childClass = childClass Return Me.GetChildWindows(hwnd) End Function ''' <summary> ''' Callback function that does the work of enumerating top-level windows. ''' </summary> ''' <param name="hwnd">Discovered Window handle</param> ''' <returns>1=keep going, 0=stop</returns> Private Function EnumWindowProc(ByVal hwnd As Int32, ByVal lParam As Int32) As Int32 ' Eliminate windows that are not top-level. If GetParent(hwnd) = 0 AndAlso CBool(IsWindowVisible(hwnd)) Then ' Get the window title / class name. Dim window As ApiWindow = GetWindowIdentification(hwnd) ' Match the class name if searching for a specific window class. If _topLevelClass.Length = 0 OrElse window.ClassName.ToLower() = _topLevelClass.ToLower() Then _listTopLevel.Add(window) End If End If ' To continue enumeration, return True (1), and to stop enumeration ' return False (0). ' When 1 is returned, enumeration continues until there are no ' more windows left. Return 1 End Function ''' <summary> ''' Callback function that does the work of enumerating child windows. ''' </summary> ''' <param name="hwnd">Discovered Window handle</param> ''' <returns>1=keep going, 0=stop</returns> Private Function EnumChildWindowProc(ByVal hwnd As Int32, ByVal lParam As Int32) As Int32 Dim window As ApiWindow = GetWindowIdentification(hwnd) ' Attempt to match the child class, if one was specified, otherwise ' enumerate all the child windows. If _childClass.Length = 0 OrElse window.ClassName.ToLower() = _childClass.ToLower() Then _listChildren.Add(window) End If Return 1 End Function ''' <summary> ''' Build the ApiWindow object to hold information about the Window object. ''' </summary> Private Function GetWindowIdentification(ByVal hwnd As Integer) As ApiWindow Const WM_GETTEXT As Int32 = &HD Const WM_GETTEXTLENGTH As Int32 = &HE Dim window As New ApiWindow() Dim title As New StringBuilder() ' Get the size of the string required to hold the window title. Dim size As Int32 = SendMessage(hwnd, WM_GETTEXTLENGTH, 0, 0) ' If the return is 0, there is no title. If size > 0 Then title = New StringBuilder(size + 1) SendMessage(hwnd, WM_GETTEXT, title.Capacity, title) End If ' Get the class name for the window. Dim classBuilder As New StringBuilder(64) GetClassName(hwnd, classBuilder, 64) ' Set the properties for the ApiWindow object. window.ClassName = classBuilder.ToString() window.MainWindowTitle = title.ToString() window.hWnd = hwnd Return window End Function End Class
Y la uso de esta manera, pero solo obtengo el "main" handle: Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Dim enumerator As New WindowsEnumerator() For Each top As ApiWindow In enumerator.GetTopLevelWindows() If top.MainWindowTitle.ToLower.Contains("firefox") Then RichTextBox1.Text += vbNewLine & ("main handle: " & top.MainWindowTitle) For Each child As ApiWindow In enumerator.GetChildWindows(top.hWnd) RichTextBox1.Text += vbNewLine & ("child handle: " & " " + child.MainWindowTitle) Next End If Next top End Sub
Así que algo está mal. Lo que quiero es obtener todos los handles de un proceso, como por ejemplo el output que nos da la utilidad CommandLine "CMDOW" con este comando: C:\>cmdow | find /i "firefox" 0x2C0242 1 912 Res Ina Ena Hid firefox Code Sample <pre><code> Ctrl+K 0x1F0C10 1 912 Res Ina Ena Hid firefox pinvoke.net: EnumWindowsProc (Delegate 0x6E06A8 1 912 Res Ina Ena Hid firefox MozillaDropShadowWindowClass 0x310ADA 1 912 Res Ina Ena Hid firefox MozillaDropShadowWindowClass 0x610D3A 1 912 Res Ina Ena Hid firefox MozillaWindowClass 0x840A54 1 912 Res Ina Ena Hid firefox MozillaDropShadowWindowClass 0x9A08D6 1 912 Res Ina Ena Hid firefox Search using Google (English) 0x17E057C 1 912 Res Ina Ena Hid firefox MozillaDropShadowWindowClass 0x2E0A5A 1 912 Res Ina Ena Hid firefox MozillaWindowClass 0x4A04DC 1 912 Min Ina Ena Vis firefox Get all child handles of process - Sta 0xA40994 1 912 Min Ina Ena Hid firefox pinvoke.net: EnumWindowsProc (Delegate 0x110CF4 1 912 Min Ina Ena Hid firefox pinvoke.net: EnumChildWindows (user32) 0x560270 1 912 Min Ina Ena Hid firefox Get handles of process forms c# - Stac 0x7B0CCC 1 912 Min Ina Ena Hid firefox Get child window handles in C# - Stack 0x74040A 1 912 Min Ina Ena Hid firefox Get all child handles of process - Sta 0xC0028A 1 912 Min Ina Ena Hid firefox Get Window Handles Associated With Pro 0xAC067C 1 912 Min Ina Ena Hid firefox vbnet get child handles of process - B 0x6308B0 1 912 Min Ina Ena Hid firefox Process Class (System.Diagnostics) - M 0xB20B2E 1 912 Min Ina Ena Hid firefox How to wait the process until the proc 0xA7021C 1 912 Min Ina Ena Hid firefox vb.net - Waiting For Process To Comple 0xD30356 1 912 Min Ina Ena Hid firefox FreeVBCode code snippet: Execute a Pro 0x583207D0 1 912 Res Ina Ena Hid firefox nsAppShell:EventWindow 0x3C0550 1 912 Res Ina Ena Hid firefox DDEMLEvent 0x3E065C 1 912 Res Ina Ena Hid firefox DDEMLMom 0x590288 1 912 Res Ina Ena Hid firefox FirefoxMessageWindow 0x2D085A 1 912 Min Ina Ena Hid firefox vbnet wait for process end - Buscar co 0x5F0584 1 912 Res Ina Ena Hid firefox MCI command handling window 0x2307D2 1 912 Res Ina Ena Hid firefox MozillaHiddenWindowClass 0x1760466 1 912 Res Ina Dis Hid firefox MSCTFIME UI 0x200CB4 1 912 Res Ina Dis Hid firefox Default IME 0x510320 1 912 Res Ina Dis Hid firefox Default IME
|
|
|
9260
|
Programación / .NET (C#, VB.NET, ASP) / Sobre los Handles del SystemTray...
|
en: 9 Abril 2013, 19:48 pm
|
Este tema me lleva días matándome, he creado 5 posts sobre temas relacionados con los handles en StackOverFlow, porque no me aclaro nada con las funciones de la API (FindWindow, FindWindowEx, etc...). A ver, lo que necesito es, saber si una aplicación de terceros ha mostrado su icono en el systemtray, es decir, saber si "X" icono existe en el SysTray, ya séa buscando el icono por el handle del proceso, o por el nombre de la ventana, o como séa. Para esto, primero intento obtener el handle de la aplicación, y luego el handle de mi systray, pero hasta aquí, ya no sé como seguir ni que debo hacer. Imports System.Runtime.InteropServices Public Class Form1 Public Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Public Shared Function WindowHandle(sTitle As String) As Long Return FindWindow(vbNullString, sTitle) End Function Private Shared Function GetSystemTrayHandle() As IntPtr Dim hWndTray As IntPtr = FindWindow("Shell_TrayWnd", Nothing) If hWndTray <> IntPtr.Zero Then hWndTray = FindWindowEx(hWndTray, IntPtr.Zero, "TrayNotifyWnd", Nothing) If hWndTray <> IntPtr.Zero Then hWndTray = FindWindowEx(hWndTray, IntPtr.Zero, "SysPager", Nothing) If hWndTray <> IntPtr.Zero Then hWndTray = FindWindowEx(hWndTray, IntPtr.Zero, "ToolbarWindow32", Nothing) Return hWndTray End If End If End If Return IntPtr.Zero End Function Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click MsgBox(WindowHandle("Steam")) ' 6687230 MsgBox(GetSystemTrayHandle()) ' 65728 End Sub End Class
|
|
|
|
|
|
|