|
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... ' ' /* *\ ' |#* Panel Elektro *#| ' \* */ ' ' // By Elektro H@cker ' ' Properties: ' ........... ' · Disable_Flickering ' · Double_Buffer ' · Opaccity ' · Scroll_Loop Public Class Panel_Elektro Inherits Panel Private _Opaccity As Int16 = 100 Private _Diable_Flickering As Boolean = True Private _Scroll_Loop As Boolean = False Dim Scroll_Range As Int64 = 0 Public Sub New() Me.Name = "Panel_Elektro" ' Me.AutoScroll = True ' ResumeLayout(False) End Sub #Region " Properties " ''' <summary> ''' Enable/Disable any flickering effect on the panel. ''' </summary> Protected Overrides ReadOnly Property CreateParams() As CreateParams Get If _Diable_Flickering Then Dim cp As CreateParams = MyBase.CreateParams cp.ExStyle = cp.ExStyle Or &H2000000 Return cp Else Return MyBase.CreateParams End If End Get End Property ''' <summary> ''' Set the Double Buffer. ''' </summary> Public Property Double_Buffer() As Boolean Get Return Me.DoubleBuffered End Get Set(ByVal Value As Boolean) Me.DoubleBuffered = Value End Set End Property ''' <summary> ''' Set the transparency for this panel. ''' </summary> Public Property Opaccity() As Short Get Return _Opaccity End Get Set(ByVal Value As Short) If Value > 100 Then Throw New Exception("Opaccity range is from 0 to 100") If Value < 0 Then Throw New Exception("Opaccity range is from 0 to 100") Me._Opaccity = Value Make_Opaccity(Value, Me.BackColor) End Set End Property ''' <summary> ''' Enable/Disable the flickering effects on this panel. ''' ''' This property turns off any Flicker effect on the panel ''' ...but also reduces the performance (speed) of the panel about 30% slower. ''' This don't affect to the performance of the application itself, only to the performance of this control. ''' </summary> Public Property Diable_Flickering() As Boolean Get Return _Diable_Flickering End Get Set(ByVal Value As Boolean) Me._Diable_Flickering = Value End Set End Property ''' <summary> ''' Enable/Disable the scroll loop effect. ''' Only when AutoScroll option is set to "True". ''' </summary> Public Property Scroll_Loop() As Boolean Get Return _Scroll_Loop End Get Set(ByVal Value As Boolean) Me._Scroll_Loop = Value End Set End Property #End Region #Region " Event handlers " ' Scroll Private Sub Infinite_Scroll_Button(sender As Object, e As ScrollEventArgs) Handles Me.Scroll If _Scroll_Loop AndAlso Me.AutoScroll Then Set_Scroll_Range() If Me.VerticalScroll.Value >= Scroll_Range - 4 Then ' Button Down Me.VerticalScroll.Value = 1 ElseIf Me.VerticalScroll.Value <= 0 Then ' Button Up Me.VerticalScroll.Value = Scroll_Range End If End If End Sub ' MouseWheel (Scroll) Private Sub Infinite_Scroll_MouseWheel(sender As Object, e As MouseEventArgs) Handles Me.MouseWheel If _Scroll_Loop AndAlso Me.AutoScroll Then Set_Scroll_Range() If e.Delta < 0 AndAlso Me.VerticalScroll.Value >= Scroll_Range - 4 Then ' MouseWheel Down Me.VerticalScroll.Value = 1 ElseIf e.Delta > 0 AndAlso Me.VerticalScroll.Value <= 0 Then ' MouseWheel Up Me.VerticalScroll.Value = Scroll_Range End If End If End Sub #End Region #Region " Methods / Functions " ''' <summary> ''' Changes the transparency of this panel. ''' </summary> Private Sub Make_Opaccity(ByVal Percent As Short, ByVal colour As Color) Me.BackColor = Color.FromArgb(Percent * 255 / 100, colour.R, colour.G, colour.B) End Sub ''' <summary> ''' Set the VerticalScrollBar Range. ''' </summary> Private Sub Set_Scroll_Range() Scroll_Range = Me.VerticalScroll.Maximum - Me.VerticalScroll.LargeChange + Me.VerticalScroll.SmallChange End Sub #End Region 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. ' ' /* *\ ' |#* Panel Elektro *#| ' \* */ ' ' // By Elektro H@cker ' ' Properties: ' ........... ' · Disable_Flickering ' · Double_Buffer ' · Opaccity ' · Scroll_Loop Public Class Panel_Elektro Inherits Panel Private _Opaccity As Int16 = 100 Private _Diable_Flickering As Boolean = True Private _Scroll_Loop As Boolean = False Dim Scroll_Range As Int64 = 0 Public Sub New() Me.Name = "Panel_Elektro" ' Me.AutoScroll = True ' ResumeLayout(False) End Sub #Region " Properties " ''' <summary> ''' Enable/Disable any flickering effect on the panel. ''' </summary> Protected Overrides ReadOnly Property CreateParams() As CreateParams Get If _Diable_Flickering Then Dim cp As CreateParams = MyBase.CreateParams cp.ExStyle = cp.ExStyle Or &H2000000 Return cp Else Return MyBase.CreateParams End If End Get End Property ''' <summary> ''' Set the Double Buffer. ''' </summary> Public Property Double_Buffer() As Boolean Get Return Me.DoubleBuffered End Get Set(ByVal Value As Boolean) Me.DoubleBuffered = Value End Set End Property ''' <summary> ''' Set the transparency for this panel. ''' </summary> Public Property Opaccity() As Short Get Return _Opaccity End Get Set(ByVal Value As Short) If Value > 100 Then Throw New Exception("Opaccity range is from 0 to 100") If Value < 0 Then Throw New Exception("Opaccity range is from 0 to 100") Me._Opaccity = Value Make_Opaccity(Value, Me.BackColor) End Set End Property ''' <summary> ''' Enable/Disable the flickering effects on this panel. ''' ''' This property turns off any Flicker effect on the panel ''' ...but also reduces the performance (speed) of the panel about 30% slower. ''' This don't affect to the performance of the application itself, only to the performance of this control. ''' </summary> Public Property Diable_Flickering() As Boolean Get Return _Diable_Flickering End Get Set(ByVal Value As Boolean) Me._Diable_Flickering = Value End Set End Property ''' <summary> ''' Enable/Disable the scroll loop effect. ''' Only when AutoScroll option is set to "True". ''' </summary> Public Property Scroll_Loop() As Boolean Get Return _Scroll_Loop End Get Set(ByVal Value As Boolean) Me._Scroll_Loop = Value End Set End Property #End Region #Region " Event handlers " ' Scroll Private Sub Infinite_Scroll_Button(sender As Object, e As ScrollEventArgs) Handles Me.Scroll If _Scroll_Loop AndAlso Me.AutoScroll Then Set_Scroll_Range() If Me.VerticalScroll.Value >= Scroll_Range - 4 Then ' Button Down Me.VerticalScroll.Value = 1 ElseIf Me.VerticalScroll.Value <= 0 Then ' Button Up Me.VerticalScroll.Value = Scroll_Range End If End If End Sub ' MouseWheel (Scroll) Private Sub Infinite_Scroll_MouseWheel(sender As Object, e As MouseEventArgs) Handles Me.MouseWheel If _Scroll_Loop AndAlso Me.AutoScroll Then Set_Scroll_Range() If e.Delta < 0 AndAlso Me.VerticalScroll.Value >= Scroll_Range - 4 Then ' MouseWheel Down Me.VerticalScroll.Value = 1 ElseIf e.Delta > 0 AndAlso Me.VerticalScroll.Value <= 0 Then ' MouseWheel Up Me.VerticalScroll.Value = Scroll_Range End If End If End Sub #End Region #Region " Methods / Functions " ''' <summary> ''' Changes the transparency of this panel. ''' </summary> Private Sub Make_Opaccity(ByVal Percent As Short, ByVal colour As Color) Me.BackColor = Color.FromArgb(Percent * 255 / 100, colour.R, colour.G, colour.B) End Sub ''' <summary> ''' Set the VerticalScrollBar Range. ''' </summary> Private Sub Set_Scroll_Range() Scroll_Range = Me.VerticalScroll.Maximum - Me.VerticalScroll.LargeChange + Me.VerticalScroll.SmallChange End Sub #End Region End Class
|
|
|
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?  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!
|
|
|
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: #Region " Hide-Restore Process " ' [ Hide-Restore Process Function ] ' ' // By Elektro H@cker ' ' Examples : ' ' Hide_Process(Process.GetCurrentProcess().MainModule.ModuleName, False) ' Hide_Process("notepad.exe", False) ' Hide_Process("notepad", True) ' ' Restore_Process(Process.GetCurrentProcess().MainModule.ModuleName, False) ' Restore_Process("notepad.exe", False) ' Restore_Process("notepad", True) Dim Process_Handle_Dictionary As New Dictionary(Of String, IntPtr ) <System.Runtime.InteropServices.DllImport("User32")> Private Shared Function ShowWindow(ByVal hwnd As IntPtr, ByVal nCmdShow As Int32) As Int32 End Function Private Sub Hide_Process(ByVal Process_Name As String, Optional ByVal Recursive As Boolean = False) If Process_Name.ToLower.EndsWith(".exe") Then Process_Name = Process_Name.Substring(0, Process_Name.Length - 4) Dim proc() As Process = Process.GetProcessesByName(Process_Name) If Recursive Then For proc_num As Integer = 0 To proc.Length - 1 Try Process_Handle_Dictionary.Add(Process_Name & ";" & proc(proc_num).Handle.ToString, proc(proc_num).MainWindowHandle) ShowWindow(proc(proc_num).MainWindowHandle, 0) Catch ex As Exception ' MsgBox(ex.Message) ' The handle already exist in the Dictionary End Try Application.DoEvents() Next Else If Not proc.Length = 0 AndAlso Not proc(0).MainWindowHandle = 0 Then Process_Handle_Dictionary.Add(Process_Name & ";" & proc(0).Handle.ToString, proc(0).MainWindowHandle) ShowWindow(proc(0).MainWindowHandle, 0) End If End If End Sub Private Sub Restore_Process(ByVal Process_Name As String, Optional ByVal Recursive As Boolean = False) If Process_Name.ToLower.EndsWith(".exe") Then Process_Name = Process_Name.Substring(0, Process_Name.Length - 4) Dim Temp_Dictionary As New Dictionary(Of String, IntPtr ) ' Replic of the "Process_Handle_Dictionary" dictionary For Each Process In Process_Handle_Dictionary : Temp_Dictionary.Add(Process.Key, Process.Value) : Next If Recursive Then For Each Process In Temp_Dictionary If Process.Key.ToLower.Contains(Process_Name.ToLower) Then ShowWindow(Process.Value, 9) Process_Handle_Dictionary.Remove(Process.Key) End If Application.DoEvents() Next Else For Each Process In Temp_Dictionary If Process.Key.ToLower.Contains(Process_Name.ToLower) Then ShowWindow(Process.Value, 9) Process_Handle_Dictionary.Remove(Process.Key) Exit For End If Application.DoEvents() Next End If End Sub #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. #Region " Disable Controls " ' [ Disable Controls ] ' ' // By Elektro H@cker ' ' Examples: ' ' Disable_Controls(Of CheckBox)(Me.Controls, False) ' Disable_Controls(Of Button)(GroupBox1.Controls, False) Public Sub Disable_Controls(Of T As Control)(ByVal Container As Object, ByVal Enabled As Boolean) For Each control As T In Container : control.Enabled = Enabled : Next End Sub #End Region
Pequeño ejemplo de como saber el tipo de objeto: MsgBox(TypeName(Me)) ' Result: Form1 MsgBox(TypeName(Me.Text)) ' Result: String MsgBox(TypeName(Panel1)) ' Result: Panel
|
|
|
|
|
|
|