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

 

 


Tema destacado: Recuerda que debes registrarte en el foro para poder participar (preguntar y responder)


  Mostrar Mensajes
Páginas: 1 ... 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 [977] 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 ... 1236
9761  Programación / .NET (C#, VB.NET, ASP) / [SOLUCIONADO] Problema con Application.DoEvents() en: 16 Enero 2013, 14:19 pm
Estoy teniendo problemas con esto:
Código
  1.  Thread_Split.Start()
  2.        While Not Thread_is_completed = True
  3.            Application.DoEvents()
  4.        End While

Cuando inicio el thread por segunda vez, me salta este error:
Código:
Arithmetic operation resulted in an overflow.

¿Porqué?
9762  Programación / .NET (C#, VB.NET, ASP) / Re: [APORTE] Splitty v1.0 [Source code] en: 16 Enero 2013, 09:59 am
Yo si que me lo puedo descargar de mediafire ;./

Bueno, ya lo he resubido a un multiserver, ahora si lo podrán descargar para testearlo

http://exoshare.com/download.php?uid=1SWEKAJS

PD: Dentro de poco actualizaré a la versión 1.2 para generar ISOS automáticamente.

Un saludo!
9763  Programación / .NET (C#, VB.NET, ASP) / Re: [APORTE] Snippets !! (Posteen aquí sus snippets) en: 15 Enero 2013, 20:48 pm
Oscurecer una imagen a escala de grises (Disable image)

PD: He retocado la función original para añadirle opción de elegir distintos tonos de gris, me ha quedado bastante bien.

Código
  1. #Region " GrayScale Image Function "
  2.  
  3.    ' [ GrayScale Image Function ]
  4.    '
  5.    ' Examples:
  6.    '
  7.    ' PictureBox1.Image = GrayScale_Image(PictureBox1.Image, GrayScale.Light_Gray)
  8.    ' PictureBox1.Image = GrayScale_Image(PictureBox1.Image, GrayScale.Mid_Gray)
  9.    ' PictureBox1.Image = GrayScale_Image(PictureBox1.Image, GrayScale.Dark_Gray)
  10.  
  11.    Enum GrayScale
  12.        Light_Gray
  13.        Mid_Gray
  14.        Dark_Gray
  15.    End Enum
  16.  
  17.    Private Function GrayScale_Image(ByVal Image As Image, ByVal Gray_Tone As GrayScale) As Bitmap
  18.        Dim Image_Bitmap As Bitmap = New Bitmap(Image.Width, Image.Height)
  19.        Dim Image_Graphic As Graphics = Graphics.FromImage(Image_Bitmap)
  20.        Dim Color_Matrix As System.Drawing.Imaging.ColorMatrix = Nothing
  21.        Select Case Gray_Tone
  22.            Case GrayScale.Light_Gray : Color_Matrix = New System.Drawing.Imaging.ColorMatrix(New Single()() {New Single() {0.2, 0.2, 0.2, 0, 0}, New Single() {0.2, 0.2, 0.2, 0, 0}, New Single() {0.5, 0.5, 0.5, 0, 0}, New Single() {0, 0, 0, 1, 0}, New Single() {0, 0, 0, 0, 1}})
  23.            Case GrayScale.Mid_Gray : Color_Matrix = New System.Drawing.Imaging.ColorMatrix(New Single()() {New Single() {0, 0, 0, 0, 0}, New Single() {0, 0, 0, 0, 0}, New Single() {0.5, 0.5, 0.5, 0, 0}, New Single() {0, 0, 0, 1, 0}, New Single() {0, 0, 0, 0, 1}})
  24.            Case GrayScale.Dark_Gray : Color_Matrix = New System.Drawing.Imaging.ColorMatrix(New Single()() {New Single() {0, 0, 0, 0, 0}, New Single() {0, 0, 0, 0, 0}, New Single() {0.2, 0.2, 0.2, 0, 0}, New Single() {0, 0, 0, 1, 0}, New Single() {0, 0, 0, 0, 1}})
  25.        End Select
  26.        Dim Image_Attributes As System.Drawing.Imaging.ImageAttributes = New System.Drawing.Imaging.ImageAttributes()
  27.        Image_Attributes.SetColorMatrix(Color_Matrix)
  28.        Image_Graphic.DrawImage(Image, New Rectangle(0, 0, Image.Width, Image.Height), 0, 0, Image.Width, Image.Height, GraphicsUnit.Pixel, Image_Attributes)
  29.        Image_Graphic.Dispose()
  30.        Return Image_Bitmap
  31.    End Function
  32.  
  33. #End Region
9764  Programación / .NET (C#, VB.NET, ASP) / Re: Error: programa no corre en window7 64 bits en: 15 Enero 2013, 20:16 pm
Ingresen a este link para ver el error que me sale:
http://subefotos.com/ver/?8fd0763e0ef424ac39fc3d1e939dd435o.jpg

No estoy seguro del todo pero yo diría que te falta la dll de ese control (En el equipo), MS powerpacks. debes distribuir todas las DLL necesarias junto a tu exe...

http://msdn.microsoft.com/en-us/vstudio//bb735936

Saludos!
9765  Programación / .NET (C#, VB.NET, ASP) / Re: [APORTE] Splitty v1.0 [Source code] en: 15 Enero 2013, 20:11 pm
:-\

Que extraño, acabo de revisar el enlace y funciona perfecto!

PD: Espero tus buenas críticas constructivas!



Citar
Excelente trabajo sigue así. saludos y gracias

Gracias a tí por comentar, y por la pequeña ayuda con el textbox para poder acabarlo xD.

Saludos!
9766  Foros Generales / Sugerencias y dudas sobre el Foro / Re: Elhacker.net ¿Doble moral o preferencias? en: 15 Enero 2013, 19:42 pm
Es como si entras a un foro de robótica y pides ayuda para que tu robot pueda matar...

x'D  Que bueno.
9767  Programación / .NET (C#, VB.NET, ASP) / [APORTE] Splitty v1.6 [Source code] en: 15 Enero 2013, 19:21 pm
Splitty
By Elektro H@cker


Esta utilidad se encarga de organizar un directorio separando el directorio en varias carpetas de un tamaño específico (tamaño de la capacidad de disco) para grabarlo posteriormente.


Para que lo entiendan mejor, pongámonos en situación,
imaginemos que tenemos una carpeta con subcarpetas, llenas de archivos, y la carpeta pesa 100 GB,
si por necesidad queremos grabar la carpeta a DVD's tenemos que organizarlo todo (Cortar y medir) manualmente, lo cual es una tarea muy agobiante xD... Pues para eso hice este programa.

versión 1.6:

     

El código fuente:

>  http://www.mediafire.com/download/pn69i21t9nja5xm/Splitty.rar

* Está desarrollado en VB.NET (VS2012), Es un WinForm y requiere Framework 4.0.

9768  Programación / .NET (C#, VB.NET, ASP) / Re: Permitir solo una coma en un textbox en: 15 Enero 2013, 16:48 pm
Ups, acabo de copiar tu code tál cual y si que funciona, algo habré puesto mal en mi code xD

Solucionado, gracias de nuevo.
9769  Programación / .NET (C#, VB.NET, ASP) / Re: Permitir solo una coma en un textbox en: 15 Enero 2013, 16:39 pm
Creo que así funcionaria.

Gracias, pero no :(
9770  Programación / .NET (C#, VB.NET, ASP) / [SOLUCIONADO] Permitir solo una coma en un textbox en: 15 Enero 2013, 15:38 pm
Estoy intentando que el textbox sólamente acepte números, y una coma (sólamente una coma),
No se que estoy haciendo mal (Acepta más de una coma).

Código
  1.    Private Sub TextBox_Custom_Size_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox_Custom_Size.KeyPress
  2.        e.Handled = NumericOnly(e.KeyChar)
  3.    End Sub
  4.  
  5.    Public Function NumericOnly(ByVal eChar As Char) As Boolean
  6.        Dim chkStr As String = "0123456789,"
  7.        If chkStr.IndexOf(eChar) > -1 OrElse eChar = vbBack Then
  8.            If eChar = Keys.Oemcomma & TextBox_Custom_Size.Text.Contains(",") Then Return True
  9.            Return False
  10.        Else
  11.            Return True
  12.        End If
  13.    End Function

Saludos!
Páginas: 1 ... 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 [977] 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 ... 1236
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines