| |
|
9132
|
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!
|
|
|
|
|
9135
|
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
|
|
|
|
|
9136
|
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!
|
|
|
|
|
9137
|
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
|
|
|
|
|
9140
|
Sistemas Operativos / Windows / Re: Archivo Host Modificarlo
|
en: 5 Junio 2013, 16:24 pm
|
He cogido el block de notas y lo he abierto como administrador pero como el archivo esta en modo lectura no he podido modificarlo.
¿Alguna otra forma de quitar el modo lectura de ese archivo?
Click derecho sobre el archivo "hosts", y pinchas en la casilla "Solo lectura" para desactivarlo... Attrib -r "hosts"
Salu2!
|
|
|
|
|
|
| |
|