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


Tema destacado:


  Mostrar Mensajes
Páginas: 1 ... 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 [909] 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 ... 1254
9081  Programación / Scripting / Re: [BATCH] [ANDROID] A ver si se podria hacer esto... :D en: 6 Junio 2013, 02:37 am
La primera parte ya esta clara pero la segunda? eso lo hará cada vez con cada archivo? Osea, cada vez que se haga el la primera parte se hará la segunda parte seguidamente?
Al igual que borrar classes.dex, lo borrara cada vez?

What?

De verdad no he entendido nada,
lo que está entre parentesis se realiza cada vez, con cada archivo, la línea del final ...No.

solo me falta saber como copiar el classes.dex dentro de la apk y el jar ;)

He leido tu MP, pero ni manejo Java ni manejo Android, esto ya no pertenece a Batch, pregúntalo en la sección correspondiente.

Saludos!
9082  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 6 Junio 2013, 02:19 am
Un panel extendido con varias propiedades nuevas e interesantes...

Código
  1. '
  2. '  /*               *\
  3. ' |#* Panel Elektro *#|
  4. '  \*               */
  5. '
  6. ' // By Elektro H@cker
  7. '
  8. '   Properties:
  9. '   ...........
  10. ' · Disable_Flickering
  11. ' · Double_Buffer
  12. ' · Opaccity
  13. ' · Scroll_Loop
  14.  
  15. Public Class Panel_Elektro
  16.    Inherits Panel
  17.  
  18.    Private _Opaccity As Int16 = 100
  19.    Private _Diable_Flickering As Boolean = True
  20.    Private _Scroll_Loop As Boolean = False
  21.  
  22.    Dim Scroll_Range As Int64 = 0
  23.  
  24.    Public Sub New()
  25.        Me.Name = "Panel_Elektro"
  26.        ' Me.AutoScroll = True
  27.        ' ResumeLayout(False)
  28.    End Sub
  29.  
  30. #Region " Properties "
  31.  
  32.    ''' <summary>
  33.    ''' Enable/Disable any flickering effect on the panel.
  34.    ''' </summary>
  35.    Protected Overrides ReadOnly Property CreateParams() As CreateParams
  36.        Get
  37.            If _Diable_Flickering Then
  38.                Dim cp As CreateParams = MyBase.CreateParams
  39.                cp.ExStyle = cp.ExStyle Or &H2000000
  40.                Return cp
  41.            Else
  42.                Return MyBase.CreateParams
  43.            End If
  44.        End Get
  45.    End Property
  46.  
  47.    ''' <summary>
  48.    ''' Set the Double Buffer.
  49.    ''' </summary>
  50.    Public Property Double_Buffer() As Boolean
  51.        Get
  52.            Return Me.DoubleBuffered
  53.        End Get
  54.        Set(ByVal Value As Boolean)
  55.            Me.DoubleBuffered = Value
  56.        End Set
  57.    End Property
  58.  
  59.    ''' <summary>
  60.    ''' Set the transparency for this panel.
  61.    ''' </summary>
  62.    Public Property Opaccity() As Short
  63.        Get
  64.            Return _Opaccity
  65.        End Get
  66.        Set(ByVal Value As Short)
  67.            If Value > 100 Then Throw New Exception("Opaccity range is from 0 to 100")
  68.            If Value < 0 Then Throw New Exception("Opaccity range is from 0 to 100")
  69.            Me._Opaccity = Value
  70.            Make_Opaccity(Value, Me.BackColor)
  71.        End Set
  72.    End Property
  73.  
  74.    ''' <summary>
  75.    ''' Enable/Disable the flickering effects on this panel.
  76.    '''
  77.    ''' This property turns off any Flicker effect on the panel
  78.    ''' ...but also reduces the performance (speed) of the panel about 30% slower.
  79.    ''' This don't affect to the performance of the application itself, only to the performance of this control.
  80.    ''' </summary>
  81.    Public Property Diable_Flickering() As Boolean
  82.        Get
  83.            Return _Diable_Flickering
  84.        End Get
  85.        Set(ByVal Value As Boolean)
  86.            Me._Diable_Flickering = Value
  87.        End Set
  88.    End Property
  89.  
  90.    ''' <summary>
  91.    ''' Enable/Disable the scroll loop effect.
  92.    ''' Only when AutoScroll option is set to "True".
  93.    ''' </summary>
  94.    Public Property Scroll_Loop() As Boolean
  95.        Get
  96.            Return _Scroll_Loop
  97.        End Get
  98.        Set(ByVal Value As Boolean)
  99.            Me._Scroll_Loop = Value
  100.        End Set
  101.    End Property
  102.  
  103. #End Region
  104.  
  105. #Region " Event handlers "
  106.  
  107.    ' Scroll
  108.    Private Sub Infinite_Scroll_Button(sender As Object, e As ScrollEventArgs) Handles Me.Scroll
  109.  
  110.        If _Scroll_Loop AndAlso Me.AutoScroll Then
  111.  
  112.            Set_Scroll_Range()
  113.  
  114.            If Me.VerticalScroll.Value >= Scroll_Range - 4 Then ' Button Down
  115.                Me.VerticalScroll.Value = 1
  116.            ElseIf Me.VerticalScroll.Value <= 0 Then ' Button Up
  117.                Me.VerticalScroll.Value = Scroll_Range
  118.            End If
  119.  
  120.        End If
  121.  
  122.    End Sub
  123.  
  124.    ' MouseWheel (Scroll)
  125.    Private Sub Infinite_Scroll_MouseWheel(sender As Object, e As MouseEventArgs) Handles Me.MouseWheel
  126.  
  127.        If _Scroll_Loop AndAlso Me.AutoScroll Then
  128.  
  129.            Set_Scroll_Range()
  130.  
  131.            If e.Delta < 0 AndAlso Me.VerticalScroll.Value >= Scroll_Range - 4 Then ' MouseWheel Down
  132.                Me.VerticalScroll.Value = 1
  133.            ElseIf e.Delta > 0 AndAlso Me.VerticalScroll.Value <= 0 Then ' MouseWheel Up
  134.                Me.VerticalScroll.Value = Scroll_Range
  135.            End If
  136.  
  137.        End If
  138.  
  139.    End Sub
  140.  
  141. #End Region
  142.  
  143. #Region " Methods / Functions "
  144.  
  145.    ''' <summary>
  146.    ''' Changes the transparency of this panel.
  147.    ''' </summary>
  148.    Private Sub Make_Opaccity(ByVal Percent As Short, ByVal colour As Color)
  149.        Me.BackColor = Color.FromArgb(Percent * 255 / 100, colour.R, colour.G, colour.B)
  150.    End Sub
  151.  
  152.    ''' <summary>
  153.    ''' Set the VerticalScrollBar Range.
  154.    ''' </summary>
  155.    Private Sub Set_Scroll_Range()
  156.        Scroll_Range = Me.VerticalScroll.Maximum - Me.VerticalScroll.LargeChange + Me.VerticalScroll.SmallChange
  157.    End Sub
  158.  
  159. #End Region
  160.  
  161. End Class
9083  Programación / .NET (C#, VB.NET, ASP) / Re: Scroll de Imagenes? en: 5 Junio 2013, 23:46 pm
Mi panel extendido tiene una propiedad para activar el "Scroll Loop" (el cual solo funciona con la propiedad AutoScroll activada).

Para hacer un "Scroll Loop" inteligente sin AutoScroll, ya te lo he dicho, resetea los valores del "Me.VerticalScroll.Value" al sobrepasar "X" valor, hazlo como quieras.

Código
  1. '
  2. '  /*               *\
  3. ' |#* Panel Elektro *#|
  4. '  \*               */
  5. '
  6. ' // By Elektro H@cker
  7. '
  8. '   Properties:
  9. '   ...........
  10. ' · Disable_Flickering
  11. ' · Double_Buffer
  12. ' · Opaccity
  13. ' · Scroll_Loop
  14.  
  15. Public Class Panel_Elektro
  16.    Inherits Panel
  17.  
  18.    Private _Opaccity As Int16 = 100
  19.    Private _Diable_Flickering As Boolean = True
  20.    Private _Scroll_Loop As Boolean = False
  21.  
  22.    Dim Scroll_Range As Int64 = 0
  23.  
  24.    Public Sub New()
  25.        Me.Name = "Panel_Elektro"
  26.        ' Me.AutoScroll = True
  27.        ' ResumeLayout(False)
  28.    End Sub
  29.  
  30. #Region " Properties "
  31.  
  32.    ''' <summary>
  33.    ''' Enable/Disable any flickering effect on the panel.
  34.    ''' </summary>
  35.    Protected Overrides ReadOnly Property CreateParams() As CreateParams
  36.        Get
  37.            If _Diable_Flickering Then
  38.                Dim cp As CreateParams = MyBase.CreateParams
  39.                cp.ExStyle = cp.ExStyle Or &H2000000
  40.                Return cp
  41.            Else
  42.                Return MyBase.CreateParams
  43.            End If
  44.        End Get
  45.    End Property
  46.  
  47.    ''' <summary>
  48.    ''' Set the Double Buffer.
  49.    ''' </summary>
  50.    Public Property Double_Buffer() As Boolean
  51.        Get
  52.            Return Me.DoubleBuffered
  53.        End Get
  54.        Set(ByVal Value As Boolean)
  55.            Me.DoubleBuffered = Value
  56.        End Set
  57.    End Property
  58.  
  59.    ''' <summary>
  60.    ''' Set the transparency for this panel.
  61.    ''' </summary>
  62.    Public Property Opaccity() As Short
  63.        Get
  64.            Return _Opaccity
  65.        End Get
  66.        Set(ByVal Value As Short)
  67.            If Value > 100 Then Throw New Exception("Opaccity range is from 0 to 100")
  68.            If Value < 0 Then Throw New Exception("Opaccity range is from 0 to 100")
  69.            Me._Opaccity = Value
  70.            Make_Opaccity(Value, Me.BackColor)
  71.        End Set
  72.    End Property
  73.  
  74.    ''' <summary>
  75.    ''' Enable/Disable the flickering effects on this panel.
  76.    '''
  77.    ''' This property turns off any Flicker effect on the panel
  78.    ''' ...but also reduces the performance (speed) of the panel about 30% slower.
  79.    ''' This don't affect to the performance of the application itself, only to the performance of this control.
  80.    ''' </summary>
  81.    Public Property Diable_Flickering() As Boolean
  82.        Get
  83.            Return _Diable_Flickering
  84.        End Get
  85.        Set(ByVal Value As Boolean)
  86.            Me._Diable_Flickering = Value
  87.        End Set
  88.    End Property
  89.  
  90.    ''' <summary>
  91.    ''' Enable/Disable the scroll loop effect.
  92.    ''' Only when AutoScroll option is set to "True".
  93.    ''' </summary>
  94.    Public Property Scroll_Loop() As Boolean
  95.        Get
  96.            Return _Scroll_Loop
  97.        End Get
  98.        Set(ByVal Value As Boolean)
  99.            Me._Scroll_Loop = Value
  100.        End Set
  101.    End Property
  102.  
  103. #End Region
  104.  
  105. #Region " Event handlers "
  106.  
  107.    ' Scroll
  108.    Private Sub Infinite_Scroll_Button(sender As Object, e As ScrollEventArgs) Handles Me.Scroll
  109.  
  110.        If _Scroll_Loop AndAlso Me.AutoScroll Then
  111.  
  112.            Set_Scroll_Range()
  113.  
  114.            If Me.VerticalScroll.Value >= Scroll_Range - 4 Then ' Button Down
  115.                Me.VerticalScroll.Value = 1
  116.            ElseIf Me.VerticalScroll.Value <= 0 Then ' Button Up
  117.                Me.VerticalScroll.Value = Scroll_Range
  118.            End If
  119.  
  120.        End If
  121.  
  122.    End Sub
  123.  
  124.    ' MouseWheel (Scroll)
  125.    Private Sub Infinite_Scroll_MouseWheel(sender As Object, e As MouseEventArgs) Handles Me.MouseWheel
  126.  
  127.        If _Scroll_Loop AndAlso Me.AutoScroll Then
  128.  
  129.            Set_Scroll_Range()
  130.  
  131.            If e.Delta < 0 AndAlso Me.VerticalScroll.Value >= Scroll_Range - 4 Then ' MouseWheel Down
  132.                Me.VerticalScroll.Value = 1
  133.            ElseIf e.Delta > 0 AndAlso Me.VerticalScroll.Value <= 0 Then ' MouseWheel Up
  134.                Me.VerticalScroll.Value = Scroll_Range
  135.            End If
  136.  
  137.        End If
  138.  
  139.    End Sub
  140.  
  141. #End Region
  142.  
  143. #Region " Methods / Functions "
  144.  
  145.    ''' <summary>
  146.    ''' Changes the transparency of this panel.
  147.    ''' </summary>
  148.    Private Sub Make_Opaccity(ByVal Percent As Short, ByVal colour As Color)
  149.        Me.BackColor = Color.FromArgb(Percent * 255 / 100, colour.R, colour.G, colour.B)
  150.    End Sub
  151.  
  152.    ''' <summary>
  153.    ''' Set the VerticalScrollBar Range.
  154.    ''' </summary>
  155.    Private Sub Set_Scroll_Range()
  156.        Scroll_Range = Me.VerticalScroll.Maximum - Me.VerticalScroll.LargeChange + Me.VerticalScroll.SmallChange
  157.    End Sub
  158.  
  159. #End Region
  160.  
  161. End Class
9084  Sistemas Operativos / Windows / Re: Duda con un Escritorio remoto en: 5 Junio 2013, 23:43 pm
Todos intentando entender a Seazoux como siempre xD.

¿Pero para que necesitas usar no-ip?, si lo hostea tu primo con su no-ip (supongo).

Saludos
9085  Programación / .NET (C#, VB.NET, ASP) / Re: Scroll de Imagenes? en: 5 Junio 2013, 21:23 pm
Con pulir a que te refieres?

Me refería a que no está sin bugs, da un pequeño problema al sobrepasar el tope del margen del scroll hacia arriba o hacia abajo, solo me he preocupado en perfeccionar el scroll progresivo, porque es como a mi me gusta xD.

Por cierto, necesito una ultima cosa si no es mucho pedir... Un loop infinito, es decir cuando termine las imagenes vuelve a mostrarse el inicio... Se puede hacer? :silbar:

Mira, iba a mandarte a la ***** por tanto pedir y que te lo hicieras tu solo, sincéramente xD,
pero me ha gustado la idea del loop infinito, creo que voy a desarrollar un panel heredado desde 0 con lo que ya llevo hecho y le añadiré una propiedad pública que se llame "Loop" para habilitar/deshabilitar el loop del scroll.

Poder, se puede hacer, solo hay que reiniciar los valores del scroll... lo podrías hacer tu mismo.

Salu2!
9086  Foros Generales / Dudas Generales / Re: Instalo el ".iso" i no me funciona en: 5 Junio 2013, 18:00 pm
En uno de los pasos de un "setup" deberías poder elegir la ruta de instalación (y ahí es donde se instalarán los archivos), a no ser que sea un installer cutre y sin casi opciones hecho por una tercera persona.

En el caso de seguir sin tener ni idea de donde están los archivos, puedes monitorizar la instalación para saber donde se crean esos archivos:

http://www.moo0.com/software/FileMonitor/download/free2/



Saludos.
9087  Foros Generales / Dudas Generales / Re: Cuantos Sistemas Operativos hay??? en: 5 Junio 2013, 17:49 pm
Que el usuario que ha formulado la pregunta no haya buscado en la Wikipedia ni en Google...pase,
Pero en serio, tios, 5 respuestas, y en ninguna...

-> List of operating systems

Un saludo


9088  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 5 Junio 2013, 17:38 pm
Hide-Restore Process

Para ocultar o reestablecer la visibilidad de un proceso,
Esto solo oculta la ventana del proceso, no lo oculta del administrador de tareas,
la función "Restore" no está muy pulida, para perfeccionarlo habría que guardar cada handle de los procesos escondidos en un tipo de diccionario si se quiere usar con más de un proceso simultáneamente, ya que cuando ocultas una ventana, el handle se vuelve "0".

EDITO: Código mejorado:

Código
  1. #Region " Hide-Restore Process "
  2.  
  3.    ' [ Hide-Restore Process Function ]
  4.    '
  5.    ' // By Elektro H@cker
  6.    '
  7.    ' Examples :
  8.    '
  9.    ' Hide_Process(Process.GetCurrentProcess().MainModule.ModuleName, False)
  10.    ' Hide_Process("notepad.exe", False)
  11.    ' Hide_Process("notepad", True)
  12.    '
  13.    ' Restore_Process(Process.GetCurrentProcess().MainModule.ModuleName, False)
  14.    ' Restore_Process("notepad.exe", False)
  15.    ' Restore_Process("notepad", True)
  16.  
  17.    Dim Process_Handle_Dictionary As New Dictionary(Of String, IntPtr)
  18.  
  19.    <System.Runtime.InteropServices.DllImport("User32")> Private Shared Function ShowWindow(ByVal hwnd As IntPtr, ByVal nCmdShow As Int32) As Int32
  20.    End Function
  21.  
  22.    Private Sub Hide_Process(ByVal Process_Name As String, Optional ByVal Recursive As Boolean = False)
  23.  
  24.        If Process_Name.ToLower.EndsWith(".exe") Then Process_Name = Process_Name.Substring(0, Process_Name.Length - 4)
  25.  
  26.        Dim proc() As Process = Process.GetProcessesByName(Process_Name)
  27.  
  28.        If Recursive Then
  29.            For proc_num As Integer = 0 To proc.Length - 1
  30.                Try
  31.                    Process_Handle_Dictionary.Add(Process_Name & ";" & proc(proc_num).Handle.ToString, proc(proc_num).MainWindowHandle)
  32.                    ShowWindow(proc(proc_num).MainWindowHandle, 0)
  33.                Catch ex As Exception
  34.                    ' MsgBox(ex.Message) ' The handle already exist in the Dictionary
  35.                End Try
  36.                Application.DoEvents()
  37.            Next
  38.        Else
  39.            If Not proc.Length = 0 AndAlso Not proc(0).MainWindowHandle = 0 Then
  40.                Process_Handle_Dictionary.Add(Process_Name & ";" & proc(0).Handle.ToString, proc(0).MainWindowHandle)
  41.                ShowWindow(proc(0).MainWindowHandle, 0)
  42.            End If
  43.        End If
  44.  
  45.    End Sub
  46.  
  47.    Private Sub Restore_Process(ByVal Process_Name As String, Optional ByVal Recursive As Boolean = False)
  48.  
  49.        If Process_Name.ToLower.EndsWith(".exe") Then Process_Name = Process_Name.Substring(0, Process_Name.Length - 4)
  50.  
  51.        Dim Temp_Dictionary As New Dictionary(Of String, IntPtr) ' Replic of the "Process_Handle_Dictionary" dictionary
  52.        For Each Process In Process_Handle_Dictionary : Temp_Dictionary.Add(Process.Key, Process.Value) : Next
  53.  
  54.        If Recursive Then
  55.            For Each Process In Temp_Dictionary
  56.                If Process.Key.ToLower.Contains(Process_Name.ToLower) Then
  57.                    ShowWindow(Process.Value, 9)
  58.                    Process_Handle_Dictionary.Remove(Process.Key)
  59.                End If
  60.                Application.DoEvents()
  61.            Next
  62.        Else
  63.            For Each Process In Temp_Dictionary
  64.                If Process.Key.ToLower.Contains(Process_Name.ToLower) Then
  65.                    ShowWindow(Process.Value, 9)
  66.                    Process_Handle_Dictionary.Remove(Process.Key)
  67.                    Exit For
  68.                End If
  69.                Application.DoEvents()
  70.            Next
  71.        End If
  72.  
  73.    End Sub
  74.  
  75. #End Region
9089  Programación / .NET (C#, VB.NET, ASP) / Re: [APORTE] Ocultar Aplicación en Administrador de Tareas en: 5 Junio 2013, 17:35 pm
No me puedo creer que nadie haya agradecido esto en 1 año.

¡ Gracias por el aporte KuBox !

¿Alguna instrucción de como usarlo? :-/

¿Por ejemplo si quiero ocultar el proceso "notepad.exe", como se haría?

Según tenia entendido el TMListView no funcionaba para Windows 7, me gustaría saber usar esta class para comprobarlo, pero ni idea.

Un saludo!
9090  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets) en: 5 Junio 2013, 17:05 pm
Recorre todos los controles de "X" tipo en un container.

Código
  1. #Region " Disable Controls "
  2.  
  3.    ' [ Disable Controls ]
  4.    '
  5.    ' // By Elektro H@cker
  6.    '
  7.    ' Examples:
  8.    '
  9.    ' Disable_Controls(Of CheckBox)(Me.Controls, False)
  10.    ' Disable_Controls(Of Button)(GroupBox1.Controls, False)
  11.  
  12.    Public Sub Disable_Controls(Of T As Control)(ByVal Container As Object, ByVal Enabled As Boolean)
  13.        For Each control As T In Container : control.Enabled = Enabled : Next
  14.    End Sub
  15.  
  16. #End Region





Pequeño ejemplo de como saber el tipo de objeto:

Código
  1. MsgBox(TypeName(Me))      ' Result: Form1
  2. MsgBox(TypeName(Me.Text)) ' Result: String
  3. MsgBox(TypeName(Panel1))  ' Result: Panel
Páginas: 1 ... 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 [909] 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 ... 1254
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines