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

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


  Mostrar Mensajes
Páginas: 1 ... 961 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 ... 1235
9751  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!
9752  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
9753  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!
9754  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!
9755  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.
9756  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.

9757  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.
9758  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 :(
9759  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!
9760  Programación / .NET (C#, VB.NET, ASP) / Re: [APORTE] Snippets !! (Posteen aquí sus snippets) en: 15 Enero 2013, 07:33 am
He añadido, ordenado, y mejorado bastantes snippets del pack de snippets, el nuevo enlace está en el comentario principal.

 
Función para eliminar atributos de un archivo, preservando el resto de atributos.

Código
  1. #Region " File Remove Attribute Function "
  2.  
  3.    ' [ File Remove Attribute Function ]
  4.    '
  5.    ' Examples :
  6.    '
  7.    ' MsgBox(File_Remove_Attribute("C:\Test.txt", FileAttribute.ReadOnly))
  8.    ' MsgBox(File_Remove_Attribute("C:\Test.txt", FileAttribute.ReadOnly + FileAttribute.Hidden))
  9.  
  10.    Public Function File_Remove_Attribute(ByVal File As String, ByVal Remove_Attribute As FileAttribute) As Boolean
  11.        Try
  12.            Dim FileAttributes As FileAttribute = IO.File.GetAttributes(File)
  13.            IO.File.SetAttributes(File, FileAttributes And Not Remove_Attribute)
  14.            Return True
  15.        Catch ex As Exception
  16.            Return False
  17.        End Try
  18.    End Function
  19.  
  20. #End Region


Función para añadir atributos a un archivo, preservando el resto de atributos.

Código
  1. #Region " File Add Attribute Function "
  2.  
  3.    ' [ File Add Attribute Function ]
  4.    '
  5.    ' Examples :
  6.    '
  7.    ' MsgBox(File_Add_Attribute("C:\Test.txt", FileAttribute.ReadOnly))
  8.    ' MsgBox(File_Add_Attribute("C:\Test.txt", FileAttribute.ReadOnly + FileAttribute.Hidden))
  9.  
  10.    Public Function File_Add_Attribute(ByVal File As String, ByVal Add_Attribute As FileAttribute) As Boolean
  11.        Try
  12.            Dim FileAttributes As FileAttribute = IO.File.GetAttributes(File)
  13.            IO.File.SetAttributes(File, FileAttributes Or Add_Attribute)
  14.            Return True
  15.        Catch ex As Exception
  16.            Return False
  17.        End Try
  18.    End Function
  19.  
  20. #End Region

Función que comprueba si un archivo tiene un atributo

Código
  1. #Region " File Have Attribute Function "
  2.  
  3.    ' [ File Have Attribute Function ]
  4.    '
  5.    ' Examples :
  6.    '
  7.    ' MsgBox(File_Have_Attribute("C:\Test.txt", FileAttribute.ReadOnly))
  8.    ' MsgBox(File_Have_Attribute("C:\Test.txt", FileAttribute.ReadOnly + FileAttribute.Hidden))
  9.  
  10.    Public Function File_Have_Attribute(ByVal File As String, ByVal CheckAttribute As FileAttribute) As Boolean
  11.        Try
  12.            Dim FileAttributes As FileAttribute = IO.File.GetAttributes(File)
  13.            If (FileAttributes And CheckAttribute) = CheckAttribute Then Return True Else Return False
  14.        Catch ex As Exception
  15.            Return Nothing
  16.        End Try
  17.  
  18.    End Function
  19.  
  20. #End Region
Páginas: 1 ... 961 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 ... 1235
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines