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

 

 


Tema destacado: Introducción a Git (Primera Parte)


  Mostrar Mensajes
Páginas: 1 ... 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 [63] 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 ... 356
621  Comunicaciones / Android / Re: ayuda Rootear samsung galaxy S i9000T??? en: 14 Mayo 2012, 17:00 pm
una cosa es rootear, eso lo podes hacer facil, con el programa superoneclick, podes rootear casi cualquir telefonocon android. pero el otro tema de flashear e instalarle ROMs de terceros, eso la verdad lo detesto, no se porque la gnete hace eso, si no hay nada mejor que una ROM oficial, aparte esas ROMs estan llenas de bugs y anda a saber que tienen, hay gente que vive haciendo eso, siempre lo comparo con los famosos windows UE o los windows modificados, son horribles le sacan todo y no te anda nada despues, esa es mi opinion. si tenes la 2.3.3 yo no lo cambiaria, yo tengo el samsung galaxy S2 con la version 2.3.4 y podria flashearlo e instalarle un monton de ROMS, pero no lo hago porque ya estan por liberar para mi pais la version 4.0.3 ICS.
622  Programación / .NET (C#, VB.NET, ASP) / Re: Ayuda con un Label en C# en: 14 Mayo 2012, 15:59 pm
podes hacerlo con saltos de lineas entre cada letra, pero queda horrible el codigo, es mejor crearte un control que maneje por si solo el texto, aca tenes una clase sacada de internet, la cual dibuja el texto:

Código
  1. Imports System
  2. Imports System.Collections.Generic
  3. Imports System.Text
  4. Imports System.Windows.Forms
  5. Imports System.Drawing
  6.  
  7. Public Class VerticalLabel
  8.    Inherits Label
  9.  
  10.    Public Sub New()
  11.        SetStyle(ControlStyles.UserPaint, True)
  12.        SetStyle(ControlStyles.AllPaintingInWmPaint, True)
  13.        SetStyle(ControlStyles.DoubleBuffer, True)
  14.  
  15.        Me.AutoSize = False
  16.    End Sub
  17.  
  18.    Private Sub CalculateSize(ByVal value As String)
  19.        Me.AutoSize = False
  20.  
  21.        Dim height As Integer = 0
  22.        Dim width As Integer = 0
  23.        Dim sizeTemp As New Size()
  24.  
  25.        For Each c As Char In value
  26.            sizeTemp = TextRenderer.MeasureText(c.ToString(), Me.Font)
  27.            height += sizeTemp.Height
  28.  
  29.            If sizeTemp.Width > width Then
  30.                width = sizeTemp.Width
  31.            End If
  32.        Next
  33.  
  34.        Me.Height = height
  35.        Me.Width = width
  36.    End Sub
  37.  
  38.    Public Overrides Property Text() As String
  39.        Get
  40.            Return MyBase.Text
  41.        End Get
  42.        Set(ByVal value As String)
  43.            MyBase.Text = value
  44.            CalculateSize(value)
  45.        End Set
  46.    End Property
  47.  
  48.    Public Overrides Property Font() As Font
  49.        Get
  50.            Return MyBase.Font
  51.        End Get
  52.        Set(ByVal value As Font)
  53.            MyBase.Font = value
  54.            CalculateSize(MyBase.Text)
  55.        End Set
  56.    End Property
  57.  
  58.    Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
  59.        Dim br As New SolidBrush(Me.ForeColor)
  60.        Dim smt As New StringFormat()
  61.  
  62.        smt.Alignment = StringAlignment.Center
  63.  
  64.        Dim sizeTemp As New Size()
  65.        Dim i As Integer = 0
  66.        For Each c As Char In Text
  67.            sizeTemp = TextRenderer.MeasureText(c.ToString(), Me.Font)
  68.            Dim rc As New Rectangle(0, sizeTemp.Height * i, sizeTemp.Width, sizeTemp.Height)
  69.            e.Graphics.DrawString(c.ToString(), Font, br, rc, smt)
  70.            i += 1
  71.        Next
  72.  
  73.        br.Dispose()
  74.    End Sub
  75. End Class
  76.  

eso lo pones en una clase y despues te va a aparecer el control en la barra de herramientas como si fuera un control, lo unico que tenes que hacer es arrastrarlo al formulario, y cambiarle el texto que quieras y se va a mostrar vertical.

saludos.
623  Foros Generales / Foro Libre / Re: Una aguja con hilo para saber cuantos hijos tendras xDD en: 14 Mayo 2012, 06:00 am
es mas viejo esto...mira si un aguja te va a decir eso, esta bien en creer en fenomenos sin explicacion y todo lo que quieras, pero creer en esto ya es de tonto  :xD
624  Programación / Programación Visual Basic / Re: Borrar última línea de un textbox en: 12 Mayo 2012, 19:59 pm
para hacer todas estas cosas con el textbox, por ejemplo saber la cantidad de lineas, contar palabras, etc..podes usar la api SendMessage, que te ofrece un monton de funciones para poder trabajar con los textbox y manipularlos a tu antojo.

aca hay una implementacion de lo que seria borrar la linea que vos quieras con esta api.

aparte con apis es muhco mas rapido si tenes miles de lineas.

Código
  1. Option Explicit
  2.  
  3. Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
  4. Private Declare Function LockWindowUpdate Lib "user32" (ByVal hwndLock As Long) As Long
  5.  
  6. Private Const EM_SETSEL = &HB1
  7. Private Const EM_GETLINECOUNT = &HBA
  8. Private Const EM_LINEINDEX = &HBB
  9.  
  10. Private Sub BorrarLinea(ByVal pNumeroLinea As Long)
  11.    Dim vComienzo As Long, vFin As Long, vCantLineas As Long
  12.  
  13.    With Text1
  14.        vCantLineas = SendMessage(.hwnd, EM_GETLINECOUNT, 0, ByVal 0&)
  15.  
  16.        Select Case True
  17.            Case pNumeroLinea > vCantLineas - 1
  18.            Exit Sub
  19.        Case pNumeroLinea = 0 And vCantLineas = 1
  20.            vComienzo = 0
  21.            vFin = Len(.Text)
  22.        Case pNumeroLinea = vCantLineas - 1
  23.            vComienzo = SendMessage(.hwnd, EM_LINEINDEX, pNumeroLinea, ByVal 0&) - 1
  24.            vFin = Len(.Text) - vComienzo + 1
  25.        Case Else
  26.            vComienzo = SendMessage(.hwnd, EM_LINEINDEX, pNumeroLinea, ByVal 0&)
  27.            vFin = SendMessage(.hwnd, EM_LINEINDEX, pNumeroLinea + 1, ByVal 0&) - vComienzo
  28.        End Select
  29.  
  30.        .SetFocus
  31.        Call SendMessage(.hwnd, EM_SETSEL, vComienzo, ByVal vFin)
  32.  
  33.        LockWindowUpdate .hwnd
  34.        .SelStart = vComienzo
  35.        .SelLength = vFin
  36.        .SelText = vbNullString
  37.        LockWindowUpdate False
  38.    End With
  39. End Sub
  40.  
  41. Private Sub Command1_Click()
  42.    Call BorrarLinea(2) ' Borra la tercera linea del textbox
  43. End Sub

saludos.

625  Foros Generales / Foro Libre / Re: marihuana en: 12 Mayo 2012, 19:44 pm
yo no fumaria, por mas que no haga nada, prefiero comerme un helado.
626  Foros Generales / Foro Libre / Re: El juego del numero con imagenes en: 12 Mayo 2012, 19:42 pm
627  Media / Multimedia / Re: Grabar entrada HDMI de monitor en: 12 Mayo 2012, 19:40 pm
claro, me parecia que no se podia, si deberia ser con una tarjeta externa, listo, cerrado el tema, gracias.

saludos.
628  Foros Generales / Noticias / Re: Mozilla consigue reducir el consumo de memoria de los componentes del navegador en: 12 Mayo 2012, 06:33 am
12GB de RAM DDR3 Problem ?  :D
629  Media / Multimedia / Grabar entrada HDMI de monitor en: 12 Mayo 2012, 04:36 am
Hola, tengo un monitor samsung que es TV tambien, que tiene entradas HDMI para conectar playstation 3 o direc tv HD...etc, me pregunto si se puede grabar lo que hay en la pantalla cuando cambio al modo HDMI, es posible ? algun programa ?

saludos.
630  Programación / .NET (C#, VB.NET, ASP) / Re: Ayuda: Subir archivos a un ftp desde c# en: 11 Mayo 2012, 04:32 am
hace poco respondi como se hace, si buscas mis post en esta categoria lo encontras.
Páginas: 1 ... 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 [63] 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 ... 356
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines