elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.


Tema destacado: Únete al Grupo Steam elhacker.NET


  Mostrar Mensajes
Páginas: 1 ... 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 [638] 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 ... 1254
6371  Foros Generales / Foro Libre / Re: TeamViewer - control remoto de ordenadores, que es? en: 27 Noviembre 2014, 23:11 pm
Ay señor...

No soy para nada ningún experto en el diseño de Malware pero en mi opinión dudo muchísimo que eso pudiese ocurrir solamente por utilizar TeamViewer, ¿que el virus se envie por si solo en algún paquete de los que estas recibiendo por parte de TeamViewer y se auto-ejecute en tu equipo?, ni que esto fuera el tan explotado eMule u otro peer2peer para la propagación de virus, Teamviewer es un programa profesional y con sus medidas de seguridad implementadas bajo una conexión "segura".

Si me dijeras que TeamViewer crease una conexión a un equipo remoto en el PC donde te conectas (cosa que no hace), y ese individuo estuviese infectado con un virus que tuviese un spread implementado capaz de propagarse remotamente buscando conexiones de equipos remotos instalados, entonces vale, pero 1 de cada 1.000.000 de virus deben ser así de eficientes (por decir un número aleatorio bajo mi percepción, vaya).

Quizás me he equivocado en algún concepto de lo que he mencionado ya que como he dicho no soy experto en Malware, desconozco realmente si un virus puede propagarse mediante una conexión establecida entre 2 clientes de TeamViewer, pero nunca he escuchado ese caso, demasiadas preocupaciones teneis... de verdad, DEMASIADAS.

Además, los AntiVirus están para algo.

Saludos!

6372  Programación / .NET (C#, VB.NET, ASP) / Re: ¿Cómo puedo insertar un listbox en un messagebox? VB.NET 2010 en: 27 Noviembre 2014, 22:41 pm
Un MessageBox no es más que un diálogo, y como tal puedes hallar el handle (hwnd) de su ventana principal, redimensionar la ventana y enumerar sus controles para quizás hacer lo mismo y dejar espacio para tu nuevo control, por ende puedes posicionar "X" control relativamente en el rectangle de dicho dialog.

Pero esa idea es una locura, lo mejor es que hagas un nuevo Form y lo personalices de forma manual con el aspecto típico de un MessageBox (hay muchos ejemplos en Google) y allí añadas los controles que desees, y luego utilices ese Form como un Dialog, ya que un MessageBox puede ser cambiado o extendido, sí, pero es una pesadilla ya que requiere bastante esfuerzo y mucho P/Invoking para realizar pequeñas modificaciones, de todas formas te muestro un ejemplo que desarrollé donde deberías poder encontrar todo lo necesario para tus intenciones, pero como ya dije, no te recomiendo este enfoque para tus necesidades:

Código
  1. ' ***********************************************************************
  2. ' Author   : Elektro
  3. ' Modified : 27-November-2014
  4. ' ***********************************************************************
  5. ' <copyright file="CenteredMessageBox.vb" company="Elektro Studios">
  6. '     Copyright (c) Elektro Studios. All rights reserved.
  7. ' </copyright>
  8. ' ***********************************************************************
  9.  
  10. #Region " Usage Examples "
  11.  
  12. 'Using New CenteredMessageBox(ownerForm:=Me,
  13. '                             textFont:=New Font("Lucida Console", Font.SizeInPoints, FontStyle.Bold),
  14. '                             timeOut:=2500)
  15. '
  16. '    MessageBox.Show("Text", "Title", MessageBoxButtons.OK, MessageBoxIcon.Information)
  17. '
  18. 'End Using
  19.  
  20. #End Region
  21.  
  22. #Region " Option Statements "
  23.  
  24. Option Explicit On
  25. Option Strict On
  26. Option Infer Off
  27.  
  28. #End Region
  29.  
  30. #Region " Imports "
  31.  
  32. Imports System.Drawing
  33. Imports System.Runtime.InteropServices
  34. Imports System.Text
  35. Imports System.Windows.Forms
  36. Imports System.ComponentModel
  37.  
  38. #End Region
  39.  
  40. #Region " Centered MessageBox "
  41.  
  42. Namespace Tools
  43.  
  44.    ''' <summary>
  45.    ''' A customized <see cref="MessageBox"/>.
  46.    ''' This class cannot be inherited.
  47.    ''' </summary>
  48.    Friend NotInheritable Class CenteredMessageBox : Implements IDisposable
  49.  
  50. #Region " Properties "
  51.  
  52.        ''' <summary>
  53.        ''' Gets the messagebox main window handle (hwnd).
  54.        ''' </summary>
  55.        ''' <value>The messagebox main window handle (hwnd).</value>
  56.        Friend ReadOnly Property MessageBoxWindowHandle As IntPtr
  57.            Get
  58.                Return Me.messageBoxWindowHandle1
  59.            End Get
  60.        End Property
  61.        ''' <summary>
  62.        ''' The messagebox main window handle (hwnd).
  63.        ''' </summary>
  64.        Private messageBoxWindowHandle1 As IntPtr
  65.  
  66.        ''' <summary>
  67.        ''' Gets the owner <see cref="Form"/> to center the <see cref="CenteredMessageBox"/>.
  68.        ''' </summary>
  69.        ''' <value>The owner <see cref="Form"/> to center the <see cref="CenteredMessageBox"/>.</value>
  70.        Friend ReadOnly Property OwnerForm As Form
  71.            Get
  72.                Return Me.ownerForm1
  73.            End Get
  74.        End Property
  75.        ''' <summary>
  76.        ''' The owner <see cref="Form"/> to center the <see cref="CenteredMessageBox"/>
  77.        ''' </summary>
  78.        Private ownerForm1 As Form
  79.  
  80.        ''' <summary>
  81.        ''' Gets the <see cref="Font"/> used to display the <see cref="CenteredMessageBox"/> text.
  82.        ''' </summary>
  83.        ''' <value>The <see cref="Font"/> used to display the <see cref="CenteredMessageBox"/> text.</value>
  84.        Friend ReadOnly Property Font As Font
  85.            Get
  86.                Return Me.font1
  87.            End Get
  88.        End Property
  89.        ''' <summary>
  90.        ''' The <see cref="Font"/> used to display the <see cref="CenteredMessageBox"/> text.
  91.        ''' </summary>
  92.        Private ReadOnly font1 As Font
  93.  
  94.        ''' <summary>
  95.        ''' Gets the time interval to auto-close this <see cref="CenteredMessageBox"/>, in milliseconds.
  96.        ''' Default value is '0', which means Infinite.
  97.        ''' </summary>
  98.        Friend ReadOnly Property TimeOut As Integer
  99.            Get
  100.                Return Me.timeOut1
  101.            End Get
  102.        End Property
  103.        ''' <summary>
  104.        ''' The time interval to auto-close this <see cref="CenteredMessageBox"/>, in milliseconds.
  105.        ''' Default value is '0', which means Infinite.
  106.        ''' </summary>
  107.        Private ReadOnly timeOut1 As Integer = 0
  108.  
  109. #End Region
  110.  
  111. #Region " Objects "
  112.  
  113.        ''' <summary>
  114.        ''' A <see cref="Windows.Forms.Timer"/> that keeps track of <see cref="TimeOut"/> value to close this <see cref="CenteredMessageBox"/>.
  115.        ''' </summary>
  116.        Private WithEvents timeoutTimer As Timer
  117.  
  118.        ''' <summary>
  119.        ''' Keeps track of the current amount of tries to find this <see cref="CenteredMessageBox"/> dialog.
  120.        ''' </summary>
  121.        Private tries As Integer
  122.  
  123. #End Region
  124.  
  125. #Region " P/Invoke "
  126.  
  127.        ''' <summary>
  128.        ''' Platform Invocation methods (P/Invoke), access unmanaged code.
  129.        ''' This class does not suppress stack walks for unmanaged code permission.
  130.        ''' <see cref="System.Security.SuppressUnmanagedCodeSecurityAttribute"/>  must not be applied to this class.
  131.        ''' This class is for methods that can be used anywhere because a stack walk will be performed.
  132.        ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/ms182161.aspx
  133.        ''' </summary>
  134.        Protected NotInheritable Class NativeMethods
  135.  
  136. #Region " Functions "
  137.  
  138.            ''' <summary>
  139.            ''' Retrieves the thread identifier of the calling thread.
  140.            ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms683183%28v=vs.85%29.aspx
  141.            ''' </summary>
  142.            ''' <returns>The thread identifier of the calling thread.</returns>
  143.            <DllImport("kernel32.dll", SetLastError:=False)>
  144.            Protected Friend Shared Function GetCurrentThreadId() As Integer
  145.            End Function
  146.  
  147.            ''' <summary>
  148.            ''' Enumerates all nonchild windows associated with a thread by passing the handle to each window,
  149.            ''' in turn, to an application-defined callback function.
  150.            ''' <see cref="EnumThreadWindows"/> continues until the last window is enumerated or the callback function returns <c>false</c>.
  151.            ''' To enumerate child windows of a particular window, use the EnumChildWindows function.
  152.            ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633495%28v=vs.85%29.aspx
  153.            ''' </summary>
  154.            ''' <param name="dwThreadId">The identifier of the thread whose windows are to be enumerated.</param>
  155.            ''' <param name="lpfn">A pointer to an application-defined callback function.</param>
  156.            ''' <param name="lParam">An application-defined value to be passed to the callback function.</param>
  157.            ''' <returns>
  158.            ''' <c>true</c> if the callback function returns <c>true</c> for all windows in the thread specified by dwThreadId parameter.
  159.            ''' <c>false</c> if the callback function returns <c>false</c> on any enumerated window,
  160.            ''' or if there are no windows found in the thread specified by dwThreadId parameter.</returns>
  161.            <DllImport("user32.dll", SetLastError:=False)>
  162.            Protected Friend Shared Function EnumThreadWindows(
  163.                      ByVal dwThreadId As Integer,
  164.                      ByVal lpfn As NativeMethods.EnumThreadWndProc,
  165.                      ByVal lParam As IntPtr
  166.            ) As <MarshalAs(UnmanagedType.Bool)> Boolean
  167.            End Function
  168.  
  169.            ''' <summary>
  170.            ''' Retrieves the name of the class to which the specified window belongs.
  171.            ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633582%28v=vs.85%29.aspx
  172.            ''' </summary>
  173.            ''' <param name="hWnd">A handle to the window and, indirectly, the class to which the window belongs.</param>
  174.            ''' <param name="buffer">The class name string.</param>
  175.            ''' <param name="buflen">
  176.            ''' The length of the lpClassName buffer, in characters.
  177.            ''' The buffer must be large enough to include the terminating null character;
  178.            ''' otherwise, the class name string is truncated to nMaxCount-1 characters.
  179.            ''' </param>
  180.            ''' <returns>
  181.            ''' If the function succeeds, the return value is the number of characters copied to the buffer,
  182.            ''' not including the terminating null character.
  183.            ''' If the function fails, the return value is 0.
  184.            ''' </returns>
  185.            <DllImport("user32.dll", SetLastError:=False, CharSet:=CharSet.Unicode)>
  186.            Protected Friend Shared Function GetClassName(
  187.                      ByVal hWnd As IntPtr,
  188.                      ByVal buffer As StringBuilder,
  189.                      ByVal buflen As Integer
  190.            ) As Integer
  191.            End Function
  192.  
  193.            ''' <summary>
  194.            ''' Retrieves a handle to a control in the specified dialog box.
  195.            ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms645481%28v=vs.85%29.aspx
  196.            ''' </summary>
  197.            ''' <param name="hWnd">A handle to the dialog box that contains the control.</param>
  198.            ''' <param name="item">The identifier of the control to be retrieved.</param>
  199.            ''' <returns>
  200.            ''' If the function succeeds, the return value is the window handle of the specified control.
  201.            ''' If the function fails, the return value is <see cref="IntPtr.Zero"/>,
  202.            ''' indicating an invalid dialog box handle or a nonexistent control
  203.            ''' </returns>
  204.            <DllImport("user32.dll", SetLastError:=False)>
  205.            Protected Friend Shared Function GetDlgItem(
  206.                      ByVal hWnd As IntPtr,
  207.                      ByVal item As Integer
  208.            ) As IntPtr
  209.            End Function
  210.  
  211.            ''' <summary>
  212.            ''' Retrieves the dimensions of the bounding rectangle of the specified window.
  213.            ''' The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.
  214.            ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633519%28v=vs.85%29.aspx
  215.            ''' </summary>
  216.            ''' <param name="hWnd">A handle to the window.</param>
  217.            ''' <param name="rc">
  218.            ''' A pointer to a <see cref="RECT"/> structure that receives the screen coordinates of
  219.            ''' the upper-left and lower-right corners of the window.
  220.            ''' </param>
  221.            ''' <returns><c>true</c> if the function succeeds, <c>false</c> otherwise.</returns>
  222.            <DllImport("user32.dll", SetLastError:=False)>
  223.            Protected Friend Shared Function GetWindowRect(
  224.                      ByVal hWnd As IntPtr,
  225.                      ByRef rc As Rect
  226.            ) As <MarshalAs(UnmanagedType.Bool)> Boolean
  227.            End Function
  228.  
  229.            ''' <summary>
  230.            ''' Destroys the specified window.
  231.            ''' The function sends WM_DESTROY and WM_NCDESTROY messages to the window to deactivate it and remove the keyboard focus from it.
  232.            ''' The function also destroys the window's menu, flushes the thread message queue, destroys timers, removes clipboard ownership,
  233.            ''' and breaks the clipboard viewer chain (if the window is at the top of the viewer chain).
  234.            ''' If the specified window is a parent or owner window,
  235.            ''' DestroyWindow automatically destroys the associated child or owned windows when it destroys the parent or owner window.
  236.            ''' The function first destroys child or owned windows, and then it destroys the parent or owner window.
  237.            ''' DestroyWindow also destroys modeless dialog boxes created by the CreateDialog function.
  238.            ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms632682%28v=vs.85%29.aspx
  239.            ''' </summary>
  240.            ''' <param name="hwnd">Handle to the window to be destroyed.</param>
  241.            ''' <returns><c>true</c> if the function succeeds, <c>false</c> otherwise.</returns>
  242.            <DllImport("user32.dll", SetLastError:=False)>
  243.            Protected Friend Shared Function DestroyWindow(
  244.                      ByVal hwnd As IntPtr
  245.            ) As <MarshalAs(UnmanagedType.Bool)> Boolean
  246.            End Function
  247.  
  248.            ''' <summary>
  249.            ''' Changes the position and dimensions of the specified window.
  250.            ''' For a top-level window, the position and dimensions are relative to the upper-left corner of the screen.
  251.            ''' For a child window, they are relative to the upper-left corner of the parent window's client area.
  252.            ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633534%28v=vs.85%29.aspx
  253.            ''' </summary>
  254.            ''' <param name="hWnd">A handle to the window.</param>
  255.            ''' <param name="x">The new position of the left side of the window.</param>
  256.            ''' <param name="y">The new position of the top of the window.</param>
  257.            ''' <param name="width">The new width of the window.</param>
  258.            ''' <param name="height">The new height of the window.</param>
  259.            ''' <param name="repaint">
  260.            ''' Indicates whether the window is to be repainted.
  261.            ''' If this parameter is TRUE, the window receives a message.
  262.            ''' If the parameter is FALSE, no repainting of any kind occurs.
  263.            ''' This applies to the client area, the nonclient area (including the title bar and scroll bars),
  264.            ''' and any part of the parent window uncovered as a result of moving a child window.
  265.            ''' </param>
  266.            ''' <returns><c>true</c> if the function succeeds, <c>false</c> otherwise.</returns>
  267.            <DllImport("user32.dll", SetLastError:=False)>
  268.            Protected Friend Shared Function MoveWindow(
  269.                      ByVal hWnd As IntPtr,
  270.                      ByVal x As Integer,
  271.                      ByVal y As Integer,
  272.                      ByVal width As Integer,
  273.                      ByVal height As Integer,
  274.                      ByVal repaint As Boolean
  275.            ) As <MarshalAs(UnmanagedType.Bool)> Boolean
  276.            End Function
  277.  
  278.            ''' <summary>
  279.            ''' Changes the size, position, and Z order of a child, pop-up, or top-level window.
  280.            ''' These windows are ordered according to their appearance on the screen.
  281.            ''' The topmost window receives the highest rank and is the first window in the Z order.
  282.            ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633545%28v=vs.85%29.aspx
  283.            ''' </summary>
  284.            ''' <param name="hWnd">A handle to the window.</param>
  285.            ''' <param name="hWndInsertAfter">A handle to the window to precede the positioned window in the Z order.</param>
  286.            ''' <param name="x">The new position of the left side of the window, in client coordinates.</param>
  287.            ''' <param name="y">The new position of the top of the window, in client coordinates.</param>
  288.            ''' <param name="cx">The new width of the window, in pixels.</param>
  289.            ''' <param name="cy">The new height of the window, in pixels.</param>
  290.            ''' <param name="uFlags">The window sizing and positioning flags.</param>
  291.            ''' <returns><c>true</c> if the function succeeds, <c>false</c> otherwise.</returns>
  292.            <DllImport("user32.dll", SetLastError:=True)> _
  293.            Protected Friend Shared Function SetWindowPos(
  294.                      ByVal hWnd As IntPtr,
  295.                      ByVal hWndInsertAfter As IntPtr,
  296.                      ByVal x As Integer,
  297.                      ByVal y As Integer,
  298.                      ByVal cx As Integer,
  299.                      ByVal cy As Integer,
  300.                      ByVal uFlags As SetWindowPosFlags
  301.            ) As <MarshalAs(UnmanagedType.Bool)> Boolean
  302.            End Function
  303.  
  304.            ''' <summary>
  305.            ''' Sends the specified message to a window or windows.
  306.            ''' The <see cref="SendMessage"/> function calls the window procedure for the specified window and
  307.            ''' does not return until the window procedure has processed the message.
  308.            ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms644950%28v=vs.85%29.aspx
  309.            ''' </summary>
  310.            ''' <param name="hWnd">A handle to the window whose window procedure will receive the message.</param>
  311.            ''' <param name="msg">The windows message to be sent.</param>
  312.            ''' <param name="wParam">Additional message-specific information.</param>
  313.            ''' <param name="lParam">Additional message-specific information.</param>
  314.            ''' <returns>The result of the message processing; it depends on the message sent.</returns>
  315.            <DllImport("user32.dll", SetLastError:=False)>
  316.            Protected Friend Shared Function SendMessage(
  317.                      ByVal hWnd As IntPtr,
  318.                      ByVal msg As WindowsMessages,
  319.                      ByVal wParam As IntPtr,
  320.                      ByVal lParam As IntPtr
  321.            ) As IntPtr
  322.            End Function
  323.  
  324. #End Region
  325.  
  326. #Region " Callbacks "
  327.  
  328.            ''' <summary>
  329.            ''' An application-defined callback function used with the <see cref="EnumThreadWindows"/> function.
  330.            ''' It receives the window handles associated with a thread.
  331.            ''' The WNDENUMPROC type defines a pointer to this callback function.
  332.            ''' <see cref="EnumThreadWndProc"/> is a placeholder for the application-defined function name
  333.            ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633496%28v=vs.85%29.aspx
  334.            ''' </summary>
  335.            ''' <param name="hWnd">A handle to a window associated with the thread specified in the <see cref="EnumThreadWindows"/> function.</param>
  336.            ''' <param name="lParam">The application-defined value given in the <see cref="EnumThreadWindows"/> function.</param>
  337.            ''' <returns>
  338.            ''' To continue enumeration, the callback function must return <c>true</c>;
  339.            ''' To stop enumeration, it must return <c>false</c>.
  340.            ''' </returns>
  341.            Protected Friend Delegate Function EnumThreadWndProc(
  342.                      ByVal hWnd As IntPtr,
  343.                      ByVal lParam As IntPtr
  344.            ) As Boolean
  345.  
  346. #End Region
  347.  
  348. #Region " Enumerations "
  349.  
  350.            ''' <summary>
  351.            ''' Specifies a System-Defined Message.
  352.            ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms644927%28v=vs.85%29.aspx#system_defined
  353.            ''' </summary>
  354.            <Description("Enum used for 'SendMessage' function.")>
  355.            Protected Friend Enum WindowsMessages As Integer
  356.  
  357.                ' **************************************
  358.                ' NOTE:
  359.                ' This enumeration is partially defined.
  360.                ' **************************************
  361.  
  362.                ''' <summary>
  363.                ''' Sets the font that a control is to use when drawing text.
  364.                ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms632642%28v=vs.85%29.aspx
  365.                ''' </summary>
  366.                WM_SETFONT = &H30
  367.  
  368.                ''' <summary>
  369.                ''' Retrieves the font with which the control is currently drawing its text.
  370.                ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms632624%28v=vs.85%29.aspx
  371.                ''' </summary>
  372.                WM_GETFONT = &H31
  373.  
  374.            End Enum
  375.  
  376.            ''' <summary>
  377.            ''' Specifies the window sizing and positioning flags.
  378.            ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms633545%28v=vs.85%29.aspx
  379.            ''' </summary>
  380.            <FlagsAttribute>
  381.            <Description("Enum used for 'SetWindowPos' function.")>
  382.            Protected Friend Enum SetWindowPosFlags As UInteger
  383.  
  384.                ' **************************************
  385.                ' NOTE:
  386.                ' This enumeration is partially defined.
  387.                ' **************************************
  388.  
  389.                ''' <summary>
  390.                ''' Indicates any flag.
  391.                ''' </summary>
  392.                None = &H0UI
  393.  
  394.            End Enum
  395.  
  396. #End Region
  397.  
  398. #Region " Structures "
  399.  
  400.            ''' <summary>
  401.            ''' Defines the coordinates of the upper-left and lower-right corners of a rectangle.
  402.            ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/dd162897%28v=vs.85%29.aspx
  403.            ''' </summary>
  404.            <Description("Structure used for 'GetWindowRect' function.")>
  405.            Protected Friend Structure Rect
  406.  
  407.                ''' <summary>
  408.                ''' The x-coordinate of the upper-left corner of the rectangle.
  409.                ''' </summary>
  410.                Friend Left As Integer
  411.  
  412.                ''' <summary>
  413.                ''' The y-coordinate of the upper-left corner of the rectangle.
  414.                ''' </summary>
  415.                Friend Top As Integer
  416.  
  417.                ''' <summary>
  418.                ''' The x-coordinate of the lower-right corner of the rectangle.
  419.                ''' </summary>
  420.                Friend Right As Integer
  421.  
  422.                ''' <summary>
  423.                ''' The y-coordinate of the lower-right corner of the rectangle.
  424.                ''' </summary>
  425.                Friend Bottom As Integer
  426.  
  427.            End Structure
  428.  
  429. #End Region
  430.  
  431.        End Class
  432.  
  433. #End Region
  434.  
  435. #Region " Constructors "
  436.  
  437.        ''' <summary>
  438.        ''' Initializes a new instance of the <see cref="CenteredMessageBox"/> class.
  439.        ''' </summary>
  440.        ''' <param name="ownerForm">The form that owns this <see cref="CenteredMessageBox"/>.</param>
  441.        ''' <param name="TextFont">The <see cref="Font"/> used to display the text of this <see cref="CenteredMessageBox"/>.</param>
  442.        ''' <param name="TimeOut">
  443.        ''' The time interval to auto-close this <see cref="CenteredMessageBox"/>, in milliseconds;
  444.        ''' Default value is '0', which means Infinite.
  445.        ''' </param>
  446.        Public Sub New(ByVal ownerForm As Form,
  447.                       Optional textFont As Font = Nothing,
  448.                       Optional timeOut As Integer = 0I)
  449.  
  450.            Me.ownerForm1 = ownerForm
  451.            Me.font1 = textFont
  452.            Me.timeOut1 = timeOut
  453.            Me.ownerForm1.BeginInvoke(New MethodInvoker(AddressOf Me.FindDialog))
  454.  
  455.        End Sub
  456.  
  457.        ''' <summary>
  458.        ''' Prevents a default instance of the <see cref="CenteredMessageBox"/> class from being created.
  459.        ''' </summary>
  460.        Private Sub New()
  461.        End Sub
  462.  
  463. #End Region
  464.  
  465. #Region " Private Methods "
  466.  
  467.        ''' <summary>
  468.        ''' Finds the <see cref="CenteredMessageBox"/> dialog window.
  469.        ''' </summary>
  470.        Private Sub FindDialog()
  471.  
  472.            ' Enumerate windows to find the message box
  473.            If Me.tries < 0 Then
  474.                Return
  475.            End If
  476.  
  477.            Dim callback As New NativeMethods.EnumThreadWndProc(AddressOf Me.CheckWindow)
  478.  
  479.            If NativeMethods.EnumThreadWindows(NativeMethods.GetCurrentThreadId(), callback, IntPtr.Zero) Then
  480.  
  481.                If Threading.Interlocked.Increment(Me.tries) < 10 Then
  482.                    Me.ownerForm1.BeginInvoke(New MethodInvoker(AddressOf Me.FindDialog))
  483.                End If
  484.  
  485.            End If
  486.  
  487.            If Me.timeOut1 > 0 Then
  488.  
  489.                Me.timeoutTimer = New Timer With
  490.                                  {
  491.                                      .Interval = Me.timeOut1,
  492.                                      .Enabled = True
  493.                                  }
  494.  
  495.                Me.timeoutTimer.Start()
  496.  
  497.            End If
  498.  
  499.        End Sub
  500.  
  501.        ''' <summary>
  502.        ''' Checks whether the specified window is our <see cref="CenteredMessageBox"/> dialog.
  503.        ''' </summary>
  504.        ''' <param name="hWnd">A handle to the window to check.</param>
  505.        ''' <param name="lParam">The application-defined value given in the <see cref="NativeMethods.EnumThreadWindows"/> function.</param>
  506.        ''' <returns>
  507.        ''' <c>true</c> the specified window is our <see cref="CenteredMessageBox"/> dialog, <c>false</c> otherwise.
  508.        ''' </returns>
  509.        Private Function CheckWindow(ByVal hWnd As IntPtr,
  510.                                     ByVal lParam As IntPtr) As Boolean
  511.  
  512.            ' Checks if <hWnd> is a dialog
  513.            Dim sb As New StringBuilder(260)
  514.            NativeMethods.GetClassName(hWnd, sb, sb.Capacity)
  515.            If sb.ToString() <> "#32770" Then
  516.                Return True
  517.            End If
  518.  
  519.            ' Get the control that displays the text.
  520.            Dim hText As IntPtr = NativeMethods.GetDlgItem(hWnd, &HFFFFI)
  521.            Me.messageBoxWindowHandle1 = hWnd
  522.  
  523.            ' Get the dialog Rect.
  524.            Dim frmRect As New Rectangle(Me.ownerForm1.Location, Me.ownerForm1.Size)
  525.            Dim dlgRect As NativeMethods.Rect
  526.            NativeMethods.GetWindowRect(hWnd, dlgRect)
  527.  
  528.            ' Set the custom Font (if any).
  529.            If hText <> IntPtr.Zero Then
  530.  
  531.                Me.SetFont(font:=Me.font1,
  532.                           hwnd:=hText,
  533.                           rect:=frmRect)
  534.  
  535.            End If
  536.  
  537.            ' Center the dialog window in the specified Form.
  538.            Me.CenterDialog(hwnd:=hWnd,
  539.                            dialogRect:=dlgRect,
  540.                            formRect:=frmRect)
  541.  
  542.            ' Stop the EnumThreadWndProc callback by sending False.
  543.            Return False
  544.  
  545.        End Function
  546.  
  547.        ''' <summary>
  548.        ''' Sets the font of this <see cref="CenteredMessageBox"/> window.
  549.        ''' </summary>
  550.        ''' <param name="font">The <see cref="Font"/> used to display the <see cref="CenteredMessageBox"/> text.</param>
  551.        ''' <param name="hwnd">A handle to the <see cref="CenteredMessageBox"/> window.</param>
  552.        ''' <param name="rect">A <see cref="Rectangle"/> to positionate the text.</param>
  553.        Private Sub SetFont(ByVal font As Font,
  554.                            ByVal hwnd As IntPtr,
  555.                            ByVal rect As Rectangle)
  556.  
  557.            Select Case font IsNot Nothing
  558.  
  559.                Case True
  560.                    ' Set the text position.
  561.                    NativeMethods.SetWindowPos(hWnd:=hwnd,
  562.                                               hWndInsertAfter:=IntPtr.Zero,
  563.                                               x:=65,
  564.                                               y:=35,
  565.                                               cx:=rect.Width,
  566.                                               cy:=font.Height,
  567.                                               uFlags:=NativeMethods.SetWindowPosFlags.None)
  568.  
  569.                    ' Set the font.
  570.                    NativeMethods.SendMessage(hWnd:=hwnd,
  571.                                              msg:=NativeMethods.WindowsMessages.WM_SETFONT,
  572.                                              wParam:=font.ToHfont,
  573.                                              lParam:=New IntPtr(1))
  574.  
  575.                Case Else
  576.                    ' Do Nothing.
  577.  
  578.                    ' Get the dialog font.
  579.                    ' dim fnt as Font = Font.FromHfont(NativeMethods.SendMessage(hWnd:=hwnd,
  580.                    '                                                            msg:=NativeMethods.WindowsMessages.WM_GETFONT,
  581.                    '                                                            wParam:=IntPtr.Zero,
  582.                    '                                                            lParam:=IntPtr.Zero))
  583.  
  584.            End Select
  585.  
  586.        End Sub
  587.  
  588.        ''' <summary>
  589.        ''' Centers the <see cref="CenteredMessageBox"/> dialog in the specified <see cref="Form"/>.
  590.        ''' </summary>
  591.        ''' <param name="hwnd">A handle to the <see cref="CenteredMessageBox"/> window.</param>
  592.        ''' <param name="dialogRect">The dialog <see cref="NativeMethods.Rect"/> structure.</param>
  593.        ''' <param name="formRect">The form <see cref="Rectangle"/> structure.</param>
  594.        Private Sub CenterDialog(ByVal hwnd As IntPtr,
  595.                                 ByVal dialogRect As NativeMethods.Rect,
  596.                                 ByVal formRect As Rectangle)
  597.  
  598.            ' Resize and positionate the messagebox window.
  599.            NativeMethods.MoveWindow(hwnd,
  600.                                     x:=formRect.Left + (formRect.Width - dialogRect.Right + dialogRect.Left) \ 2I,
  601.                                     y:=formRect.Top + (formRect.Height - dialogRect.Bottom + dialogRect.Top) \ 2I,
  602.                                     width:=(dialogRect.Right - dialogRect.Left),
  603.                                     height:=(dialogRect.Bottom - dialogRect.Top),
  604.                                     repaint:=True)
  605.  
  606.        End Sub
  607.  
  608. #End Region
  609.  
  610. #Region " Event Handlers "
  611.  
  612.        ''' <summary>
  613.        ''' Handles the Tick event of the TimeoutTimer control.
  614.        ''' </summary>
  615.        ''' <param name="sender">The source of the event.</param>
  616.        ''' <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
  617.        Private Sub TimeoutTimer_Tick(ByVal sender As Object, ByVal e As EventArgs) _
  618.        Handles timeoutTimer.Tick
  619.  
  620.            NativeMethods.DestroyWindow(Me.messageBoxWindowHandle1)
  621.            Me.Dispose()
  622.  
  623.        End Sub
  624.  
  625. #End Region
  626.  
  627. #Region " IDisposable "
  628.  
  629.        ''' <summary>
  630.        ''' To detect redundant calls when disposing.
  631.        ''' </summary>
  632.        Private isDisposed As Boolean = False
  633.  
  634.        ''' <summary>
  635.        ''' Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
  636.        ''' </summary>
  637.        Public Sub Dispose() Implements IDisposable.Dispose
  638.  
  639.            Me.Dispose(isDisposing:=True)
  640.            GC.SuppressFinalize(obj:=Me)
  641.  
  642.        End Sub
  643.  
  644.        ''' <summary>
  645.        ''' Releases unmanaged and - optionally - managed resources.
  646.        ''' </summary>
  647.        ''' <param name="IsDisposing">
  648.        ''' <c>true</c> to release both managed and unmanaged resources;
  649.        ''' <c>false</c> to release only unmanaged resources.
  650.        ''' </param>
  651.        Protected Sub Dispose(ByVal isDisposing As Boolean)
  652.  
  653.            If Not Me.isDisposed Then
  654.  
  655.                If isDisposing Then
  656.  
  657.                    Me.tries = -1
  658.                    Me.ownerForm1 = Nothing
  659.  
  660.                    If Me.font1 IsNot Nothing Then
  661.                        Me.font1.Dispose()
  662.                    End If
  663.  
  664.                End If
  665.  
  666.            End If
  667.  
  668.            Me.isDisposed = True
  669.  
  670.        End Sub
  671.  
  672. #End Region
  673.  
  674.    End Class
  675.  
  676. End Namespace
  677.  
  678. #End Region
6373  Programación / Programación General / MOVIDO: Ayuda Codigo C++ en: 27 Noviembre 2014, 00:18 am
El tema ha sido movido a Programación C/C++.

http://foro.elhacker.net/index.php?topic=425425.0
6374  Foros Generales / Foro Libre / Re: TeamViewer - control remoto de ordenadores, que es? en: 27 Noviembre 2014, 00:13 am
Citar
Crees que puede confiar con ese chico? me podra desbloquar el bootloader, instalar el recovery y instalar la room en el mi movil hacer por mi?
Desconozco la honestidad, las capacidades y el conocimiento informático del individuo.
Pero oye, si te lo proponen y es gratis, al menos dale una oportunidad.

Citar
si por ejemplo intenta entrar a mis documentos o ver algo o hacer algo lo podre apreciar/ver?
Repito, es como si lo hicieras tú.
El invitado moverá TU puntero del ratón, y se abrira la carpeta como cuando tu la abres en el explorer y ves como se abre.
No hay ventanas adicionales, los movimientos se realizan sobre tu pantalla directamente.

mete algun virus o troyano en mi ordenador o coge mis fotos, lo podria ver? es seguro en el tema de seguirdad teamviewer? puede acceder a mis correo, facebook, etc?
TeamViewer no está considerado una aplicación maliciosa ni conozco a nadie que la haya usado con fines maliciosos, ¿te sirve como respuesta?.

Él puede intentar transferirte un troyano, ejecutarlo, y etc, pero bastante ciego habría que ser.

¿Por que no lo pruebas con alguien de confianza para despejarte las dudas de como funciona?, ya te han explicado que podrías buscar videos para verlo...

Saludos
6375  Foros Generales / Foro Libre / Re: Nanorrobótica, ¿que opinan? en: 27 Noviembre 2014, 00:03 am
que qué os parece el tema
En esta etapa de la tecnología, el concepto de los nano-robots es algo bello e inofensivo a la vez que inquietante, pero es una mera ilusión, me parece que cuando estalle el Boom y se pongan a producir en masa eso va a tener las mismas consecuencias y utilidades que una bomba nuclear, y al final acabarán imponiendo todo tipo de leyes contra el uso de los nano-robots, pero bueno, yo no viviré para decir "!OS LO DIJE!".

¿le veis futuro?
Cualquier cosa aprovada y planificada para uso militar tiene un futuro asegurado, y la nano-tecnología es una de esas cosas.
¿Sabes de donde vienen los Jeans y por ende la moda de los pantalones vaqueros?, exacto, empezó como proyecto de uso militar, así que imagina lo que ocurrirá con esto, ya me imagino a 3 de cada 10 personas con una nano-mascota.

¿a donde creéis que puede llegar?
Tanto a escenarios muy buenos para la humanidad como podría ser la Medicina, como a escenarios catastróficos, poniendonos en lo peor se convertiran en los portadores de virus de futuras guerras biológicas que provocarán grandes epidemias/pandemias en el futuro, y si no... ya lo vereis, los robots en general serán las armas perfectas del futuro (como ya lo empiezan a ser los Drones) y nadie se tendrá que manchar las manos para matar, locos/terroristas hay muchos, y psicópatas Yankees en altos cargos del gobierno dispuestos a dar órdenes militares siempre habrán.

Saludos!
6376  Foros Generales / Foro Libre / Re: TeamViewer - control remoto de ordenadores, que es? en: 26 Noviembre 2014, 21:48 pm
pero donde lo veo (en forma grafica, texto o veo a esa persona que hace?)

El invitado controla el ratón y el teclado (siempre que primero le des permiso para ello), así que ves sus movimientos en tiempo REAL, es como si se sentase alguien delante de tu PC y tu estuvieras al lado mirando lo que hace en tu PC.

El invitado también puede mirar tus directorios de forma oculta desde el panel de transferencia de archivos de Teamviewer, pero TeamViewer te notifica de cualquier transferencia, así que a parte de perder un poco de privacidad no hay de que preocuparse, de hecho no se ni por que te preocupas por eso, a un desconocido no le va a interesar tus "cosas" ni tu vida.

Yo he ayudado a muchas personas por TeamViewer y yo era un desconocido para la mayoría de ellos, gente de este foro y otros lares, nunca vi que nadie se preocupase de la manera en la que lo estás haciendo, no te ralles, si ves algo raro y no te fias desconectas el router y se acabó la conexión con el individuo xD.

Saludos
6377  Programación / Programación General / MOVIDO: identificar varias palabras en una oracion en: 26 Noviembre 2014, 19:33 pm
El tema ha sido movido a Programación Visual Basic.
Las secciones específicas de programación están para algo.
http://foro.elhacker.net/index.php?topic=425364.0
6378  Sistemas Operativos / Windows / Re: Poner contraseña al administrador de tareas en: 26 Noviembre 2014, 17:05 pm
No soy una entendida, no hay alguna forma mas sencilla para hacerlo?

Si te refieres a alguna forma más sencilla de hacer lo mismo, puedes utilizar cualquier software de terceros pero atenuandote a los inconvenientes que ya comenté, te recomiendo PowerCryptor.

Si te refieres a alguna forma más sencilla de realizar los pasos que expuse, puedes automatizarlo todo en un único archivo Batch (por ejemplo), pero prefiero que sigas los pasos y entiendas lo que hagas, a que no entiendas nada y la cagues, algo has de poner de tu parte, yo ya escribí todo eso por ti.

No es tan dificil, ánimo, si tienes dudas con algún paso pregunta.

Saludos.
6379  Foros Generales / Sugerencias y dudas sobre el Foro / Re: Al corrector ortográfico del foro no le gustan los besos... en: 26 Noviembre 2014, 16:54 pm
Bueno gente, el tema ya se ha solucionado y se ha dicho todo lo que habia por decir...

Cierro el tema para que esto no derive en más charlas offtopic, a menos que algún mod global decida reabrirlo por el motivo que sea, claro está.

PD: Tremolero, esa duda o sugerencia que tienes es distinta a mi sugerencia del tema principal, si quieres deberías plantearla en un nuevo topic.

Saludos!
6380  Foros Generales / Foro Libre / Re: Locura, estupidez y conspiranoia en: 26 Noviembre 2014, 16:40 pm
Chico, lo siento mucho, pero esos títulos son de por sí tan ridículos que no vale la pena escuchar las argumentaciones.

No me vengas como los religiosos con lo de interpretar metafóricamente la biblia. Las cosas son como son, y lo que dice ese tío no tiene ni pies ni cabeza.

Vaya comparación...

La Biblia, en mi opinión es la mayor mentira creada por el ser humano y con fines que ya todos conocemos o deberiamos conocer (dinero y poder).

Las hipótesis de JL (SOLO ALGUNAS) desde un principio ni son verdad ni son mentiras ni mucho menos con ánimo de lucro, son dudas existenciales a las que este individuo intentar hallar respuestas exponiendo argumentos, y tu eres libre de interpretarlo como quieras, pero por favor, no nos burlemos del ESFUERZO de este hombre, no hay motivos suficientes ni justificados para hacerlo.

Si, muchos dirán que JL gana dinero con su publicidad en la web, blah blah blah, eso es algo que todos hariamos para sustentar nuestra web, pero no hablais de los cientos de conferencias y eventos a los que JL participa de forma gratuita, los viajes que realiza por España para visitar "Fans" y tener entrevistas privadas, claro, ya que de eso no teneis ni pajolera idea ni os importa por la imagen negativa que teneis de él y de los falsos beneficios económicos que pretende ganar con sus hipótesis más hallá de lo que todos hariamos en su lugar si nos fuera bien, y a mi eso me parece algo honrado.

Creo que ya no tengo nada más que decir sobre el tema.
Saludos.
Páginas: 1 ... 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 [638] 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 ... 1254
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines