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


Tema destacado: Curso de javascript por TickTack


  Mostrar Mensajes
Páginas: 1 ... 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 [682] 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 ... 1254
6811  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Compartan aquí sus snippets) en: 19 Septiembre 2014, 15:02 pm
WindowSticker
· Adhiere el Form a los bordes de la pantalla al mover la ventana cerca de los bordes.

Ejemplo de uso:

Código
  1. Private WindowSticker As New WindowSticker(ClientForm:=Me) With {.SnapMargin = 35}


Código
  1. ' ***********************************************************************
  2. ' Author           : Elektro
  3. ' Last Modified On : 09-19-2014
  4. ' ***********************************************************************
  5. ' <copyright file="WindowSticker.vb" company="Elektro Studios">
  6. '     Copyright (c) Elektro Studios. All rights reserved.
  7. ' </copyright>
  8. ' ***********************************************************************
  9.  
  10. #Region " Usage Examples "
  11.  
  12. ' Private WindowSticker As New WindowSticker(ClientForm:=Me) With {.SnapMargin = 35}
  13.  
  14. 'Private Sub Form1_Load() Handles MyBase.Shown
  15.  
  16. '    WindowSticker.Dispose()
  17. '    WindowSticker = New WindowSticker(Form2)
  18. '    WindowSticker.ClientForm.Show()
  19.  
  20. 'End Sub
  21.  
  22. #End Region
  23.  
  24. #Region " Imports "
  25.  
  26. Imports System.ComponentModel
  27. Imports System.Runtime.InteropServices
  28.  
  29. #End Region
  30.  
  31. #Region " WindowSticker "
  32.  
  33. ''' <summary>
  34. ''' Sticks a Form to a Desktop border (if the Form is near).
  35. ''' </summary>
  36. Public Class WindowSticker : Inherits NativeWindow : Implements IDisposable
  37.  
  38. #Region " Properties "
  39.  
  40. #Region " Public "
  41.  
  42.    ''' <summary>
  43.    ''' Gets the client form used to stick its borders.
  44.    ''' </summary>
  45.    ''' <value>The client form used to stick its borders.</value>
  46.    Public ReadOnly Property ClientForm As Form
  47.        Get
  48.            Return Me._ClientForm
  49.        End Get
  50.    End Property
  51.    Private WithEvents _ClientForm As Form = Nothing
  52.  
  53.    ''' <summary>
  54.    ''' Gets or sets the snap margin (offset), in pixels.
  55.    ''' (Default value is: 30))
  56.    ''' </summary>
  57.    ''' <value>The snap margin (offset), in pixels.</value>
  58.    Public Property SnapMargin As Integer
  59.        Get
  60.            Return Me._SnapMargin
  61.        End Get
  62.        Set(ByVal value As Integer)
  63.            Me.DisposedCheck()
  64.            Me._SnapMargin = value
  65.        End Set
  66.    End Property
  67.    Private _SnapMargin As Integer = 30I
  68.  
  69. #End Region
  70.  
  71. #Region " Private "
  72.  
  73.    ''' <summary>
  74.    ''' Gets rectangle that contains the size of the current screen.
  75.    ''' </summary>
  76.    ''' <value>The rectangle that contains the size of the current screen.</value>
  77.    Private ReadOnly Property ScreenRect As Rectangle
  78.        Get
  79.            Return Screen.FromControl(Me._ClientForm).Bounds
  80.        End Get
  81.    End Property
  82.  
  83.    ''' <summary>
  84.    ''' Gets the working area of the current screen.
  85.    ''' </summary>
  86.    ''' <value>The working area of the current screen.</value>
  87.    Private ReadOnly Property WorkingArea As Rectangle
  88.        Get
  89.            Return Screen.FromControl(Me._ClientForm).WorkingArea
  90.        End Get
  91.    End Property
  92.  
  93.    ''' <summary>
  94.    ''' Gets the desktop taskbar height (when thet taskbar is horizontal).
  95.    ''' </summary>
  96.    ''' <value>The desktop taskbar height (when thet taskbar is horizontal).</value>
  97.    Private ReadOnly Property TaskbarHeight As Integer
  98.        Get
  99.            Return Me.ScreenRect.Height - Me.WorkingArea.Height
  100.        End Get
  101.    End Property
  102.  
  103. #End Region
  104.  
  105. #End Region
  106.  
  107. #Region " Enumerations "
  108.  
  109.    ''' <summary>
  110.    ''' Windows Message Identifiers.
  111.    ''' </summary>
  112.    <Description("Messages to process in WndProc")>
  113.    Public Enum WindowsMessages As Integer
  114.  
  115.        ''' <summary>
  116.        ''' Sent to a window whose size, position, or place in the Z order is about to change.
  117.        ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms632653%28v=vs.85%29.aspx
  118.        ''' </summary>
  119.        WM_WINDOWPOSCHANGING = &H46I
  120.  
  121.    End Enum
  122.  
  123. #End Region
  124.  
  125. #Region " Structures "
  126.  
  127.    ''' <summary>
  128.    ''' Contains information about the size and position of a window.
  129.    ''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms632612%28v=vs.85%29.aspx
  130.    ''' </summary>
  131.    <StructLayout(LayoutKind.Sequential)>
  132.    Public Structure WINDOWPOS
  133.  
  134.        ''' <summary>
  135.        ''' A handle to the window.
  136.        ''' </summary>
  137.        Public hwnd As IntPtr
  138.  
  139.        ''' <summary>
  140.        ''' The position of the window in Z order (front-to-back position).
  141.        ''' This member can be a handle to the window behind which this window is placed,
  142.        ''' or can be one of the special values listed with the 'SetWindowPos' function.
  143.        ''' </summary>
  144.        Public hwndInsertAfter As IntPtr
  145.  
  146.        ''' <summary>
  147.        ''' The position of the left edge of the window.
  148.        ''' </summary>
  149.        Public x As Integer
  150.  
  151.        ''' <summary>
  152.        ''' The position of the top edge of the window.
  153.        ''' </summary>
  154.        Public y As Integer
  155.  
  156.        ''' <summary>
  157.        ''' The window width, in pixels.
  158.        ''' </summary>
  159.        Public width As Integer
  160.  
  161.        ''' <summary>
  162.        ''' The window height, in pixels.
  163.        ''' </summary>
  164.        Public height As Integer
  165.  
  166.        ''' <summary>
  167.        ''' Flag containing the window position.
  168.        ''' </summary>
  169.        Public flags As Integer
  170.  
  171.    End Structure
  172.  
  173. #End Region
  174.  
  175. #Region " Constructor "
  176.  
  177.    ''' <summary>
  178.    ''' Initializes a new instance of WindowSticker class.
  179.    ''' </summary>
  180.    ''' <param name="ClientForm">The client form to assign this NativeWindow.</param>
  181.    Public Sub New(ByVal ClientForm As Form)
  182.  
  183.        ' Assign the Formulary.
  184.        Me._ClientForm = ClientForm
  185.  
  186.    End Sub
  187.  
  188.    ''' <summary>
  189.    ''' Prevents a default instance of the <see cref="WindowSticker"/> class from being created.
  190.    ''' </summary>
  191.    Private Sub New()
  192.    End Sub
  193.  
  194. #End Region
  195.  
  196. #Region " Event Handlers "
  197.  
  198.    ''' <summary>
  199.    ''' Assign the handle of the target Form to this NativeWindow,
  200.    ''' necessary to override target Form's WndProc.
  201.    ''' </summary>
  202.    Private Sub SetFormHandle() Handles _ClientForm.HandleCreated, _ClientForm.Load, _ClientForm.Shown
  203.  
  204.        If (Me._ClientForm IsNot Nothing) AndAlso (Not MyBase.Handle.Equals(Me._ClientForm.Handle)) Then
  205.  
  206.            MyBase.AssignHandle(Me._ClientForm.Handle)
  207.  
  208.        End If
  209.  
  210.    End Sub
  211.  
  212.    ''' <summary>
  213.    ''' Releases the Handle.
  214.    ''' </summary>
  215.    Private Sub OnHandleDestroyed() Handles _ClientForm.HandleDestroyed
  216.  
  217.        MyBase.ReleaseHandle()
  218.  
  219.    End Sub
  220.  
  221. #End Region
  222.  
  223. #Region " WndProc "
  224.  
  225.    ''' <summary>
  226.    ''' Invokes the default window procedure associated with this window to process messages.
  227.    ''' </summary>
  228.    ''' <param name="m">
  229.    ''' A <see cref="T:System.Windows.Forms.Message" /> that is associated with the current Windows message.
  230.    ''' </param>
  231.    Protected Overrides Sub WndProc(ByRef m As Message)
  232.  
  233.        If (Me._ClientForm IsNot Nothing) AndAlso (m.Msg = WindowsMessages.WM_WINDOWPOSCHANGING) Then
  234.  
  235.            Me.SnapToDesktopBorder(ClientForm:=Me._ClientForm, Handle:=m.LParam, widthAdjustment:=0)
  236.  
  237.        End If
  238.  
  239.        MyBase.WndProc(m)
  240.  
  241.    End Sub
  242.  
  243. #End Region
  244.  
  245. #Region " Private Methods "
  246.  
  247.    ''' <summary>
  248.    ''' Sticks a Form to a desktop border (it its near).
  249.    ''' </summary>
  250.    ''' <param name="ClientForm">The client form used to stick its borders.</param>
  251.    ''' <param name="Handle">A pointer to a 'WINDOWPOS' structure that contains information about the window's new size and position.</param>
  252.    ''' <param name="widthAdjustment">The border width adjustment.</param>
  253.    Private Sub SnapToDesktopBorder(ByVal ClientForm As Form,
  254.                                    ByVal Handle As IntPtr,
  255.                                    Optional ByVal widthAdjustment As Integer = 0I)
  256.  
  257.        Dim newPosition As WINDOWPOS = CType(Marshal.PtrToStructure(Handle, GetType(WINDOWPOS)), WINDOWPOS)
  258.  
  259.        If (newPosition.y = 0) OrElse (newPosition.x = 0) Then
  260.            ' Nothing to do.
  261.            Exit Sub
  262.        End If
  263.  
  264.        ' Top border (check if taskbar is on top or bottom via WorkingRect.Y)
  265.        If (newPosition.y >= -SnapMargin AndAlso (Me.WorkingArea.Y > 0 AndAlso newPosition.y <= (Me.TaskbarHeight + Me.SnapMargin))) _
  266.        OrElse (Me.WorkingArea.Y <= 0 AndAlso newPosition.y <= (SnapMargin)) Then
  267.  
  268.            If Me.TaskbarHeight > 0 Then
  269.                ' Horizontal Taskbar
  270.                newPosition.y = Me.WorkingArea.Y
  271.            Else
  272.                ' Vertical Taskbar
  273.                newPosition.y = 0
  274.            End If
  275.  
  276.        End If
  277.  
  278.        ' Left border
  279.        If (newPosition.x >= Me.WorkingArea.X - Me.SnapMargin) _
  280.        AndAlso (newPosition.x <= Me.WorkingArea.X + Me.SnapMargin) Then
  281.  
  282.            newPosition.x = Me.WorkingArea.X
  283.  
  284.        End If
  285.  
  286.        ' Right border.
  287.        If (newPosition.x + Me._ClientForm.Width <= Me.WorkingArea.Right + Me.SnapMargin) _
  288.        AndAlso (newPosition.x + Me._ClientForm.Width >= Me.WorkingArea.Right - Me.SnapMargin) Then
  289.  
  290.            newPosition.x = (Me.WorkingArea.Right - Me._ClientForm.Width)
  291.  
  292.        End If
  293.  
  294.        ' Bottom border.
  295.        If (newPosition.y + Me._ClientForm.Height <= Me.WorkingArea.Bottom + Me.SnapMargin) _
  296.        AndAlso (newPosition.y + Me._ClientForm.Height >= Me.WorkingArea.Bottom - Me.SnapMargin) Then
  297.  
  298.            newPosition.y = (Me.WorkingArea.Bottom - Me._ClientForm.Height)
  299.  
  300.        End If
  301.  
  302.        ' Marshal it back.
  303.        Marshal.StructureToPtr([structure]:=newPosition, ptr:=Handle, fDeleteOld:=True)
  304.  
  305.    End Sub
  306.  
  307. #End Region
  308.  
  309. #Region " Hidden Methods "
  310.  
  311.    ''' <summary>
  312.    ''' Determines whether the specified System.Object instances are the same instance.
  313.    ''' </summary>
  314.    <EditorBrowsable(EditorBrowsableState.Never)>
  315.    Private Shadows Sub ReferenceEquals()
  316.    End Sub
  317.  
  318.    ''' <summary>
  319.    ''' Assigns a handle to this window.
  320.    ''' </summary>
  321.    <EditorBrowsable(EditorBrowsableState.Never)>
  322.    Public Shadows Sub AssignHandle()
  323.    End Sub
  324.  
  325.    ''' <summary>
  326.    ''' Creates a window and its handle with the specified creation parameters.
  327.    ''' </summary>
  328.    <EditorBrowsable(EditorBrowsableState.Never)>
  329.    Public Shadows Sub CreateHandle()
  330.    End Sub
  331.  
  332.    ''' <summary>
  333.    ''' Destroys the window and its handle.
  334.    ''' </summary>
  335.    <EditorBrowsable(EditorBrowsableState.Never)>
  336.    Public Shadows Sub DestroyHandle()
  337.    End Sub
  338.  
  339.    ''' <summary>
  340.    ''' Releases the handle associated with this window.
  341.    ''' </summary>
  342.    <EditorBrowsable(EditorBrowsableState.Never)>
  343.    Public Shadows Sub ReleaseHandle()
  344.    End Sub
  345.  
  346.    ''' <summary>
  347.    ''' Retrieves the window associated with the specified handle.
  348.    ''' </summary>
  349.    <EditorBrowsable(EditorBrowsableState.Never)>
  350.    Private Shadows Sub FromHandle()
  351.    End Sub
  352.  
  353.    ''' <summary>
  354.    ''' Serves as a hash function for a particular type.
  355.    ''' </summary>
  356.    <EditorBrowsable(EditorBrowsableState.Never)>
  357.    Public Shadows Sub GetHashCode()
  358.    End Sub
  359.  
  360.    ''' <summary>
  361.    ''' Retrieves the current lifetime service object that controls the lifetime policy for this instance.
  362.    ''' </summary>
  363.    <EditorBrowsable(EditorBrowsableState.Never)>
  364.    Public Shadows Function GetLifeTimeService()
  365.        Return Nothing
  366.    End Function
  367.  
  368.    ''' <summary>
  369.    ''' Obtains a lifetime service object to control the lifetime policy for this instance.
  370.    ''' </summary>
  371.    <EditorBrowsable(EditorBrowsableState.Never)>
  372.    Public Shadows Function InitializeLifeTimeService()
  373.        Return Nothing
  374.    End Function
  375.  
  376.    ''' <summary>
  377.    ''' Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
  378.    ''' </summary>
  379.    <EditorBrowsable(EditorBrowsableState.Never)>
  380.    Public Shadows Function CreateObjRef()
  381.        Return Nothing
  382.    End Function
  383.  
  384.    ''' <summary>
  385.    ''' Determines whether the specified System.Object instances are considered equal.
  386.    ''' </summary>
  387.    <EditorBrowsable(EditorBrowsableState.Never)>
  388.    Public Shadows Sub Equals()
  389.    End Sub
  390.  
  391.    ''' <summary>
  392.    ''' Returns a String that represents the current object.
  393.    ''' </summary>
  394.    <EditorBrowsable(EditorBrowsableState.Never)>
  395.    Public Shadows Sub ToString()
  396.    End Sub
  397.  
  398.    ''' <summary>
  399.    ''' Invokes the default window procedure associated with this window.
  400.    ''' </summary>
  401.    <EditorBrowsable(EditorBrowsableState.Never)>
  402.    Public Shadows Sub DefWndProc()
  403.    End Sub
  404.  
  405. #End Region
  406.  
  407. #Region " IDisposable "
  408.  
  409.    ''' <summary>
  410.    ''' To detect redundant calls when disposing.
  411.    ''' </summary>
  412.    Private IsDisposed As Boolean = False
  413.  
  414.    ''' <summary>
  415.    ''' Prevent calls to methods after disposing.
  416.    ''' </summary>
  417.    ''' <exception cref="System.ObjectDisposedException"></exception>
  418.    Private Sub DisposedCheck()
  419.  
  420.        If Me.IsDisposed Then
  421.            Throw New ObjectDisposedException(Me.GetType().FullName)
  422.        End If
  423.  
  424.    End Sub
  425.  
  426.    ''' <summary>
  427.    ''' Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
  428.    ''' </summary>
  429.    Public Sub Dispose() Implements IDisposable.Dispose
  430.        Dispose(True)
  431.        GC.SuppressFinalize(Me)
  432.    End Sub
  433.  
  434.    ''' <summary>
  435.    ''' Releases unmanaged and - optionally - managed resources.
  436.    ''' </summary>
  437.    ''' <param name="IsDisposing">
  438.    ''' <c>true</c> to release both managed and unmanaged resources;
  439.    ''' <c>false</c> to release only unmanaged resources.
  440.    ''' </param>
  441.    Protected Sub Dispose(ByVal IsDisposing As Boolean)
  442.  
  443.        If Not Me.IsDisposed Then
  444.  
  445.            If IsDisposing Then
  446.                Me._ClientForm = Nothing
  447.                MyBase.ReleaseHandle()
  448.                MyBase.DestroyHandle()
  449.            End If
  450.  
  451.        End If
  452.  
  453.        Me.IsDisposed = True
  454.  
  455.    End Sub
  456.  
  457. #End Region
  458.  
  459. End Class
  460.  
  461. #End Region
6812  Foros Generales / Foro Libre / Re: ¿Que opinan? en: 19 Septiembre 2014, 02:03 am
una parte importante son barrios (zonas "populares" donde vive gente de bajos recursos) esa parte debe ser evitada a toda costa... y los asesinatos en BUEN porcentaje son allí adentro...

Me pongo en la piel de los ciudadanos de esos barrios y de barrios cercanos y debe dar incluso TERROR el simple hecho de vivir el día a día, porque cualquier dia caminando por la calle puedan matar a tu hija, a tu hermana, a tu madre, o a ti mismo.

Sinceramente yo no entiendo porque el gobierno de ese pais (y del resto de paises con ese tio de problemas como Brasil ya dije) no hace algo y deja que pasen todas esas muertes, les perjudica en todos los sentidos empezando por uno de los más "grandes" como es las perdidas de beneficio de un posible turismo extranjero, deberían hacer algo como un exterminio de esos barrios infectados (lo que equivaldria a fumigar cucarachas), matar a cientos de escoria (y lo digo así) para salvar la vida de miles de personas las cuales no tienen intención de matar a otros.

No veo necesario matar para alimentar a tu familia, ni para drogarte, ni para divertirse.

Me repugna toda esa clase de gente psociópata por naturaleza, aquí en España tenemos algo parecido, los Gitanos, pero no puedo decir lo mismo de ellos, porque en general los Gitanos no dan ese tipo de problemas criminalísticos (no de esa forma tan exagerada) y además son sociables y se han integrado bastante en la sociedad a pesar de vivir en barrios muuuuuuuy pobres, no puedo decir que me repugnen, pero tampoco son personas que caigan bien a simple vista, tienen fama de violentos.

Saludos
6813  Foros Generales / Foro Libre / Re: ¿Que opinan? en: 19 Septiembre 2014, 01:50 am
No es para nada fake.

Lo dije de broma, sé que el video no es falso, pero realmente preferiría creer que es un Fake, ya que no entiendo como un pais en general puede estar así de mal, robando a punta de pistola a plena luz del día, bueno, en Brasil es aun peor.

Saludos!
6814  Programación / Programación General / Re: Alguien que me ayude a Ordenar este Código? en: 18 Septiembre 2014, 23:29 pm
veo muchos puntos flotando por ahí...

Yo tampoco manejo LUA pero es bastante confusa/imperfecta la sintaxis de este lenguaje, 2 puntos es el operador para concatenar Strings (que no instrucciones), 3 puntos es para otra cosa, y 1 punto para otra diferente.

> http://www.lua.org/work/doc/manual.html#3.1

Saludos
6815  Programación / Programación General / Re: Alguien que me ayude a Ordenar este Código? en: 18 Septiembre 2014, 22:11 pm
¿Por "Organizarlo" te refieres a indentarlo, estructurarlo, simplificarlo?, lo primero sería una petición muy vaga.

Postea el código bien, porfavor, es ilegible.

Saludos!
6816  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Compartan aquí sus snippets) en: 18 Septiembre 2014, 21:57 pm
Un método alternativo (al p/invoking) para detectar un triple-click en WinForms (esto en WPF se puede detectar practicamente en una sola linea, pero en WinForms es más complicado)

Código
  1.    ''' <summary>
  2.    ''' Flag that determines whether the user made a single click.
  3.    ''' </summary>
  4.    Private DidSingleClick As Boolean = False
  5.  
  6.    ''' <summary>
  7.    ''' Flag that determines whether the user made a double click.
  8.    ''' </summary>
  9.    Private DidDoubleClick As Boolean = False
  10.  
  11.    ''' <summary>
  12.    ''' Flag that determines whether the user made a triple click.
  13.    ''' </summary>
  14.    Private DidTripleclick As Boolean = False
  15.  
  16.    ''' <summary>
  17.    ''' Timer that resets the click-count after an inactivity period.
  18.    ''' </summary>
  19.    Private WithEvents ClickInactivity_Timer As New Timer With
  20.    {
  21.        .Interval = SystemInformation.DoubleClickTime,
  22.        .Enabled = False
  23.    }
  24.  
  25.    ''' <summary>
  26.    ''' Handles the MouseClick event of the TextBox1 control.
  27.    ''' </summary>
  28.    ''' <param name="sender">The source of the event.</param>
  29.    ''' <param name="e">The <see cref="MouseEventArgs"/> instance containing the event data.</param>
  30.    Private Sub TextBox1_MouseClick(ByVal sender As Object, ByVal e As MouseEventArgs) _
  31.    Handles TextBox1.MouseClick
  32.  
  33.        If Me.ClickInactivity_Timer.Enabled Then
  34.            Me.ClickInactivity_Timer.Enabled = False
  35.        End If
  36.  
  37.        Me.DidSingleClick = True
  38.  
  39.    End Sub
  40.  
  41.    ''' <summary>
  42.    ''' Handles the MouseDoubleClick event of the TextBox1 control.
  43.    ''' </summary>
  44.    ''' <param name="sender">The source of the event.</param>
  45.    ''' <param name="e">The <see cref="MouseEventArgs"/> instance containing the event data.</param>
  46.    Private Sub TextBox1_MouseDoubleClick(ByVal sender As Object, ByVal e As MouseEventArgs) _
  47.    Handles TextBox1.MouseDoubleClick
  48.  
  49.        If Me.ClickInactivity_Timer.Enabled Then
  50.            Me.ClickInactivity_Timer.Enabled = False
  51.        End If
  52.  
  53.        Me.DidDoubleClick = True
  54.  
  55.    End Sub
  56.  
  57.    ''' <summary>
  58.    ''' Handles the MouseUp event of the TextBox1 control.
  59.    ''' </summary>
  60.    ''' <param name="sender">The source of the event.</param>
  61.    ''' <param name="e">The <see cref="MouseEventArgs"/> instance containing the event data.</param>
  62.    Private Sub TextBox1_MouseUp(ByVal sender As Object, ByVal e As MouseEventArgs) _
  63.    Handles TextBox1.MouseUp
  64.  
  65.        If Not Me.ClickInactivity_Timer.Enabled Then
  66.  
  67.            Me.ClickInactivity_Timer.Enabled = True
  68.            Me.ClickInactivity_Timer.Start()
  69.  
  70.        End If
  71.  
  72.    End Sub
  73.  
  74.    ''' <summary>
  75.    ''' Handles the MouseDown event of the TextBox1 control.
  76.    ''' </summary>
  77.    ''' <param name="sender">The source of the event.</param>
  78.    ''' <param name="e">The <see cref="MouseEventArgs"/> instance containing the event data.</param>
  79.    Private Sub TextBox1_MouseDown(ByVal sender As Object, ByVal e As MouseEventArgs) _
  80.    Handles TextBox1.MouseDown
  81.  
  82.        Me.DidTripleclick = (Me.DidDoubleClick AndAlso Me.DidSingleClick)
  83.  
  84.        If Me.DidTripleclick Then
  85.  
  86.            Me.DidSingleClick = False
  87.            Me.DidDoubleClick = False
  88.            Me.DidTripleclick = False
  89.  
  90.            sender.SelectAll()
  91.  
  92.        End If
  93.  
  94.    End Sub
  95.  
  96.    ''' <summary>
  97.    ''' Handles the Tick event of the ClickInactivity_Timer control.
  98.    ''' </summary>
  99.    ''' <param name="sender">The source of the event.</param>
  100.    ''' <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
  101.    Private Sub ClickInactivity_Timer_Tick(ByVal sender As Object, ByVal e As EventArgs) _
  102.    Handles ClickInactivity_Timer.Tick
  103.  
  104.        Me.DidSingleClick = False
  105.        Me.DidDoubleClick = False
  106.        Me.DidTripleclick = False
  107.  
  108.        sender.Enabled = False
  109.  
  110.    End Sub
6817  Foros Generales / Foro Libre / Re: ¿Que opinan? en: 18 Septiembre 2014, 21:52 pm
¿que opinan sobre esto?

FAKE '¬¬
6818  Programación / Scripting / Re: ejecutar un .bat en background en: 18 Septiembre 2014, 18:28 pm
Buenas.

Lo primero de todo es que las preguntas sobre Batch/VBS van en la sección de Scripting, si no formulas la pregunta en el subforo adecuado mira lo que pasa, casi 30 días sin obtener ninguna respuesta has estado (no se si ya lo habrás solucionado).

Si lo ejecuto de forma manual sin problema puedo realizar todo el proceso. Pero si le pido que se ejecute al finalizar la instalación no se me ejecuta.

Estás usando el método Run para iniciar un proceso pero no estás esperando a que el proceso finalice (y devuelva la llamada), por lo tanto finaliza el proceso del setup (ej: setup.exe) y automáticamente se cierran los procesos hijos (wscript.exe, cmd.exe, etc.)

Déjalo así:
Código
  1. WshShell.Run chr(34) & "iniciar.bat" & Chr(34), 0, True

Documentación:
http://msdn.microsoft.com/en-us/library/d5fk67ky%28v=vs.84%29.aspx

Saludos.
6819  Programación / Programación General / MOVIDO: ejecutar un .bat en background en: 18 Septiembre 2014, 18:22 pm
El tema ha sido movido a Scripting.

http://foro.elhacker.net/index.php?topic=420380.0
6820  Programación / Programación General / Re: Habrá concurso de aplicaciones este año? en: 18 Septiembre 2014, 18:18 pm
Gracias, staff. XD

Pues si, gracias a el-brujo y a todo el Staff, y a kub0x, y a todos vosotros.

Como ya se ha publicado el concurso y está a punto de iniciarse el plazo de entrega no veo motivo para seguir comentando este tema en este hilo, si tienen dudas acudan al Hilo de discusión (más abajo).

> [EHN-Dev 2014] Concurso de desarrollo de aplicaciones (Hilo oficial)

> [Ehn-Dev 2014] - Hilo de discusión / comentarios / dudas.

Tema cerrado.

Saludos!
Páginas: 1 ... 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 [682] 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 ... 1254
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines