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 ... 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 [674] 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 ... 1254
6731  Programación / .NET (C#, VB.NET, ASP) / Re: Cambiar posicion en inicio del programa en: 4 Octubre 2014, 22:28 pm
Postea un enlace para descargar la aplicación, para que pueda investigar cual es el problema.

Saludos!
6732  Sistemas Operativos / Windows / Re: Procesos y subprocesos windows 8 en: 4 Octubre 2014, 22:17 pm
por cierto

¿te parece mucho que mi sistema coja un 30%-45% de memoria ram?

Es que, sinceramente, haces una pregunta sobre tu PC sin dar información de tu PC. ¿como pretendes que te digamos si el consumo es mucho o poco si no especificas cuanta ram tienes instalada (eso, como mínimo)?, o el navegador que utilizas para ver videos de youtube, ya que por ejemplo el Firefox consume mucha, muchíiiiisima Ram cuando el plugincontainer entrá en acción, en fin, detalles que ayuden a diagnosticar un posible problema en tu PC, porque es absurdo decirte si lo considero mucho o poco consumo sin conocer esos y otros detalles, como los procesos que tienes en ejecución.

De todas formas en el administrador de tareas puedes hacerte una idea de lo que consume cada proceso, y con cualquier buen profiler puedes realizar un análisis/diagnostico de cualquier proceso para averiguar la RAM (la real) que está consumiendo proceso por proceso en cada momento, para averiguar posibles fugas de memoria en las aplicaciones. Como profiler te recomendaría el de Telerik (JustTrace) pero creo que solo soporta aplicaciónes .NET, y el de JetBrains (dotMemory) también, así que no se decirte un profiler de uso general xD.

Saludos!
6733  Programación / .NET (C#, VB.NET, ASP) / Re: ¿Alternativa al atributo RangeAttribute de ASP.NET? en: 4 Octubre 2014, 20:31 pm
Vaya, me alegra verte por aqui de nuevo NovLucker, y muchas gracias por la documentación, aunque no he sacado practicamente nada en claro.

Mi intención es transformar esto:

Código
  1. Public Class MyType
  2.  
  3. ''' <summary>
  4. ''' Gets or sets the value.
  5. ''' </summary>
  6. ''' <value>The value.</value>
  7. Public Property MyProperty As Integer
  8.    Get
  9.        Return Me._MyValue
  10.    End Get
  11.    Set(ByVal value As Integer)
  12.  
  13.        If value < Me._MyValueMin Then
  14.            If Me._MyValueThrowRangeException Then
  15.                Throw New ArgumentOutOfRangeException("MyValue", Me._MyValueExceptionMessage)
  16.            End If
  17.            Me._MyValue = Me._MyValueMin
  18.  
  19.        ElseIf value > Me._MyValueMax Then
  20.            If Me._MyValueThrowRangeException Then
  21.                Throw New ArgumentOutOfRangeException("MyValue", Me._MyValueExceptionMessage)
  22.            End If
  23.            Me._MyValue = Me._MyValueMax
  24.  
  25.        Else
  26.            Me._MyValue = value
  27.  
  28.        End If
  29.  
  30.    End Set
  31. End Property
  32. Private _MyValue As Integer = 0I
  33. Private _MyValueMin As Integer = 0I
  34. Private _MyValueMax As Integer = 10I
  35. Private _MyValueThrowRangeException As Boolean = True
  36. Private _MyValueExceptionMessage As String = String.Format("The valid range is beetwen {0} and {1}",
  37.                                                           Me._MyValueMin, Me._MyValueMax)
  38.  
  39. End Class


En algo más simplificado, y sobre todo rehusable, como esto:

Código
  1. Public NotInheritable Class MyType
  2.  
  3.    ''' <summary>
  4.    ''' Gets or sets the value.
  5.    ''' Valid range is between 0 and 10.
  6.    ''' </summary>
  7.    ''' <value>The value.</value>
  8.    <RangeAttribute(0, 10, ThrowRangeException:=False, ExceptionMessage:="")>
  9.    Public Property MyProperty As Integer
  10.  
  11. End Class


Pero no soy capaz de descubrir o entender como puedo hookear el getter/setter, apenas tengo información sobre ello, de todas formas intenté empezar a hacerlo y esto es lo que tengo, un código que no sirve para nada, porque no estoy evaluando nada, pero al menos sirve como idea inicial:

Código
  1. <AttributeUsage(AttributeTargets.Property, AllowMultiple:=False)>
  2. Public Class RangeAttribute : Inherits Attribute
  3.  
  4.    ''' <summary>
  5.    ''' Indicates the Minimum range value.
  6.    ''' </summary>
  7.    Public Minimum As Single
  8.  
  9.    ''' <summary>
  10.    ''' Indicates the Maximum range value.
  11.    ''' </summary>
  12.    Public Maximum As Single
  13.  
  14.    ''' <summary>
  15.    ''' Determines whether to throw an exception when the value is not in range.
  16.    ''' </summary>
  17.    Public ThrowRangeException As Boolean
  18.  
  19.    ''' <summary>
  20.    ''' Indicates the exception message to show when the value is not in range.
  21.    ''' </summary>
  22.    Public ExceptionMessage As String
  23.  
  24.    ''' <summary>
  25.    ''' Initializes a new instance of the <see cref="RangeAttribute"/> class.
  26.    ''' </summary>
  27.    ''' <param name="Minimum">The minimum range value.</param>
  28.    ''' <param name="Maximum">The maximum range value.</param>
  29.    Public Sub New(ByVal Minimum As Single,
  30.                   ByVal Maximum As Single)
  31.  
  32.        Me.New(Minimum, Maximum, ThrowRangeException:=False, ExceptionMessage:=String.Empty)
  33.  
  34.    End Sub
  35.  
  36.    ''' <summary>
  37.    ''' Initializes a new instance of the <see cref="RangeAttribute"/> class.
  38.    ''' </summary>
  39.    ''' <param name="Minimum">The minimum range value.</param>
  40.    ''' <param name="Maximum">The maximum range value.</param>
  41.    ''' <param name="ThrowRangeException">
  42.    ''' Determines whether to throw an exception when the value is not in range.
  43.    ''' </param>
  44.    Public Sub New(ByVal Minimum As Single,
  45.                   ByVal Maximum As Single,
  46.                   ByVal ThrowRangeException As Boolean,
  47.                   Optional ByVal ExceptionMessage As String = "")
  48.  
  49.        Me.Minimum = Minimum
  50.        Me.Maximum = Maximum
  51.        Me.ThrowRangeException = ThrowRangeException
  52.  
  53.        If Not String.IsNullOrEmpty(ExceptionMessage) Then
  54.            Me.ExceptionMessage = ExceptionMessage
  55.        Else
  56.            Me.ExceptionMessage = String.Format("The valid range is beetwen {0} and {1}", Minimum, Maximum)
  57.        End If
  58.  
  59.    End Sub
  60.  
  61. End Class

Cualquier información adicional se agradece.

Un saludo!
6734  Sistemas Operativos / Windows / Re: Procesos y subprocesos windows 8 en: 4 Octubre 2014, 20:11 pm
Otra cosa, existe alguna forma de quitar las aplicaciones de Windows 8? es decir cuando inicias windows 8 sale un fondo azul con muchas aplicaciones, tiene el skype,el excel etc etc..

¿Alguna manera de quitar todo eso?

Por supuesto, se puede :P, ese es el tipo de limpieza que te dije que deberías hacer una vez instalado windows 8/8.1.


Guía de personalización de imágenes de implementación de Windows (WIM) (Parte 5)

Nota: El tutorial está orientado para eliminar características ANTES de instalar Windows, pero la manera de hacerlo después de la instalación es la misma, y también sirve para eliminar las WindowsApps.

Saludos!
6735  Programación / Programación General / MOVIDO: ayuda con visual basic URGENTE!! en: 3 Octubre 2014, 23:09 pm
El tema ha sido movido a .NET.

http://foro.elhacker.net/index.php?topic=422435.0
6736  Programación / .NET (C#, VB.NET, ASP) / Re: ayuda con visual basic URGENTE!! en: 3 Octubre 2014, 22:59 pm
Además de lo comentado por el compañero @El Benjo:


1) los códigos deben ir en dentro de su respectiva etiqueta, debes respetar las normas del foro.

2) Los títulos deben ser descriptivos, está pohibido los títulos de tipo "Ayuda urgente"

3) Las dudas de VisualBasic.Net se deben publicar en la sección de programación .Net


En serio, ¿te parece correcto postear de la forma que lo has echo?, no suelo cerrar un post porque alguien se salte alguna norma, pero este post lo tiene todo, podrías haber editado un poco el formato de tu publicación para que se pueda leer y entender, como mínimo.



En los ejercicios te están explicando paso a paso lo que debes hacer, como hacerlo, y el código para hacerlo, literalmente te muestran las instrucciones que debes añadir al código, ¿que es lo que no entiendes?.

Además, donde realmente podrías requerir ayuda de algún tipo has escrito las frases cortadas, y no se entiende nada:

l. l.Mejore los siguientes aspectos:

iii. En las cajas de texto para notas sólo se deben permitir

vi. Implemente, en la clase alumno, un procedimiento que

ii.Todos los datos son obligatorios. No pueden haber datos en


Te invito a que publiques un nuevo post con el formato correcto, y para formular una duda concreta y específica o también para pedir orientación, ya que como han dicho aquí no le hacemos el trabajo sucio a nadie, te ayudamos y te indicamos los pasos a seguir para que puedas hacerlo por ti mismo.

Tema Cerrado

Saludos!
6737  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Compartan aquí sus snippets) en: 3 Octubre 2014, 03:11 am
Como implementar en menos de 5 segundos: un ComboBox para cambiar la prioridad del proceso actual.

Nota: Se puede hacer de manera más directa sin asignar los nombres, pero entonces perderiamos el orden de prioridad de menor a mayor.

Código
  1. Public Class PriorityList_TestForm
  2.  
  3.    ''' <summary>
  4.    ''' Contains the process priority items.  
  5.    ''' </summary>
  6.    Private ReadOnly PriorityList As String() =
  7.    {
  8.        ProcessPriorityClass.Idle.ToString,
  9.        ProcessPriorityClass.BelowNormal.ToString,
  10.        ProcessPriorityClass.Normal.ToString,
  11.        ProcessPriorityClass.AboveNormal.ToString,
  12.        ProcessPriorityClass.High.ToString,
  13.        ProcessPriorityClass.RealTime.ToString
  14.    }
  15.  
  16.    ''' <summary>
  17.    ''' Handles the Load event of the PriorityList_TestForm Form.
  18.    ''' </summary>
  19.    Private Shadows Sub Load() Handles MyBase.Load
  20.  
  21.        ' Add the priority items to list.
  22.        Me.ComboBox1.Items.AddRange(Me.PriorityList)
  23.  
  24.    End Sub
  25.  
  26.    ''' <summary>
  27.    ''' Handles the SelectedIndexChanged event of the ComboBox1 control.
  28.    ''' </summary>
  29.    ''' <param name="sender">The source of the event.</param>
  30.    ''' <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
  31.    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) _
  32.    Handles ComboBox1.SelectedIndexChanged
  33.  
  34.        ' Change thecurrent  process priority.
  35.        Process.GetCurrentProcess.PriorityClass =
  36.            [Enum].Parse(GetType(ProcessPriorityClass),
  37.                         DirectCast(sender, ComboBox).Text,
  38.                         ignoreCase:=True)
  39.  
  40.    End Sub
  41.  
  42. End Class




Lo mismo, pero usando Telerik:

Código
  1. Imports Telerik.WinControls.UI
  2. Imports Telerik.WinControls.UI.Data
  3.  
  4. Public Class PriorityList_RadTestForm
  5.  
  6.    ''' <summary>
  7.    ''' Contains the process priority items.  
  8.    ''' </summary>
  9.    Private ReadOnly PriorityList As New List(Of RadListDataItem) From
  10.    {
  11.        New RadListDataItem With {
  12.            .Text = ProcessPriorityClass.Idle.ToString,
  13.            .Value = ProcessPriorityClass.Idle
  14.        },
  15.        New RadListDataItem With {
  16.            .Text = ProcessPriorityClass.BelowNormal.ToString,
  17.            .Value = ProcessPriorityClass.BelowNormal
  18.        },
  19.        New RadListDataItem With {
  20.            .Text = ProcessPriorityClass.Normal.ToString,
  21.            .Value = ProcessPriorityClass.Normal
  22.        },
  23.        New RadListDataItem With {
  24.            .Text = ProcessPriorityClass.AboveNormal.ToString,
  25.            .Value = ProcessPriorityClass.AboveNormal
  26.        },
  27.        New RadListDataItem With {
  28.            .Text = ProcessPriorityClass.High.ToString,
  29.            .Value = ProcessPriorityClass.High
  30.        },
  31.        New RadListDataItem With {
  32.            .Text = ProcessPriorityClass.RealTime.ToString,
  33.            .Value = ProcessPriorityClass.RealTime
  34.        }
  35.    }
  36.  
  37.    ''' <summary>
  38.    ''' Handles the Initialized event of the RadDropDownList1 control.
  39.    ''' </summary>
  40.    ''' <param name="sender">The source of the event.</param>
  41.    ''' <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
  42.    Private Sub RadDropDownList1_Initialized(ByVal sender As Object, ByVal e As EventArgs) _
  43.    Handles RadDropDownList1.Initialized
  44.  
  45.        ' Add the priority items to list.
  46.        DirectCast(sender, RadDropDownList).Items.AddRange(PriorityList)
  47.  
  48.    End Sub
  49.  
  50.    ''' <summary>
  51.    ''' Handles the SelectedIndexChanged event of the RadDropDownList1 control.
  52.    ''' </summary>
  53.    ''' <param name="sender">The source of the event.</param>
  54.    ''' <param name="e">The <see cref="Telerik.WinControls.UI.Data.PositionChangedEventArgs"/> instance containing the event data.</param>
  55.    Private Sub RadDropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As PositionChangedEventArgs) _
  56.    Handles RadDropDownList1.SelectedIndexChanged
  57.  
  58.        ' Change thecurrent  process priority.
  59.        Process.GetCurrentProcess.PriorityClass =
  60.            DirectCast(DirectCast(sender, RadDropDownList).SelectedItem.Value, ProcessPriorityClass)
  61.  
  62.    End Sub
  63.  
  64. End Class
6738  Sistemas Operativos / Windows / Re: CAMBIAR POSICION EN INICIO DEL PROGRAMA en: 3 Octubre 2014, 01:58 am
1.- El codigo que dices que me has enviado ¿es en VB.NET o en VB6?
Está escrito en el lenguaje VisualBasic.Net

2.- Y no he recibido nada. Mi direccion de correo es:
Por "enviar" quisé decir "mostrar", en mi último comentario de arriba te puse un enlace actualizado a mediafire para que descargues el source y la aplicación xD (recuerda, carpeta bin\debug)

Saludos y de nada!
6739  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Compartan aquí sus snippets) en: 3 Octubre 2014, 01:48 am
Como obtener la ruta completa de los directorios de la barra de dirección de cada instancia de Windows Explorer (explorer.exe)

Código
  1.    ' ( By Elektro )
  2.    '
  3.    ' Instructions:
  4.    ' 1. Add a reference to 'Microsoft Shell Controls and Automation'
  5.    '
  6.    ' Usage Examples:
  7.    ' Dim paths As List(Of String) = GetWindowsExplorerPaths()
  8.    '
  9.    ''' <summary>
  10.    ''' Gets the full-path in the adressbar of each Windows Explorer instance.
  11.    ''' MSDN Shell Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/bb776890%28v=vs.85%29.aspx
  12.    ''' </summary>
  13.    ''' <returns>A list containing the paths.</returns>
  14.    Friend Shared Function GetWindowsExplorerPaths() As List(Of String)
  15.  
  16.        Dim exShell As New Shell32.Shell
  17.        Dim folder As Shell32.Folder
  18.        Dim path As String
  19.        Dim pathList As New List(Of String)
  20.  
  21.        For Each Window As SHDocVw.ShellBrowserWindow In DirectCast(exShell.Windows, SHDocVw.IShellWindows)
  22.  
  23.            folder = DirectCast(Window.Document, Shell32.ShellFolderView).Folder
  24.            path = DirectCast(folder, Shell32.Folder2).Self.Path
  25.            pathList.Add(path)
  26.  
  27.        Next Window
  28.  
  29.        Return pathList
  30.  
  31.    End Function

PD: Lo mismo quizás se pueda llevar a cabo con la librería WindowsAPICodePack de Microsoft, le echaré un ojo...
6740  Foros Generales / Foro Libre / Re: ¿Vais a participar en el EHN-Dev 2014? en: 3 Octubre 2014, 01:23 am
El plazo de entrega comenzará el día 20 de Septiembre de 2014 y terminará el día 20 de Octubre de 2014, horario Español.

¿A que estais esperando?, ¿lo estais dejando para el final?, ¡quiero veros participar!

Recordad que en el concurso hay premios por gentileza de el-brujo, aunque la finalidad no es competir, pero el premio puede ser una buena motivación, ¿no? :P.

Saludos!
Páginas: 1 ... 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 [674] 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 ... 1254
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines