• Jueves 9 de Mayo de 2024, 02:28

Mostrar Mensajes

Esta sección te permite ver todos los posts escritos por este usuario. Ten en cuenta que sólo puedes ver los posts escritos en zonas a las que tienes acceso en este momento.


Temas - tux2003

Páginas: [1]
1
VB .NET / Problema con Privilegios de acceso - RESTRICCIONES DE ACCESO
« en: Martes 26 de Octubre de 2010, 23:41 »
Hola que tal!!!!

Aqui dando lata y esperando que mi amigo croketingdahouse no este molesto conmigo y si sabe pueda ayudarme un poquito o algun otro colega....
Estoy haciendo mi sistema aquel que les comenté estaba haciendo llego el momento de hacer las restricciones de usuario! Hasta el momento venia haciendo todo con potencias de base dos (BINARIOS) realizo mi arbol de opciones del sistema (treeview con checks) y el usuario clickeando dice acorde al perfil y al usuario a donde tendra acceso o no en nuestra aplicacion (El nodo que selecciona en la propiedad TAG tiene la potencia 2 que le corresponde segun sea el caso) y al final guarda el valor de potencia 2 que selecciono y esos son sus privilegios.
Todo funcionaba de maravilla en proyectos pasados pero en este "tengo 77 Accesos que debo restringir" y SOPAS se me truena realizo una validacion de este tipo:

Código: vb.net
  1.  
  2. Nodo.Checked = ((Privilegio  AND CDbl(Nodo.Tag)) = CDbl(Nodo.Tag) * -1
  3.  
  4.  

con esa instruccion reviso que los privilegios del usuario contengan la seccion X (recordemos que todo son binarios) por ello realizo un AND que debe devolver True or False dependiendo si se encuentra la opcion o no....
El punto que al llegar a la potencia numero 2^62 y validarla con un AND algo parecido a:

Privilegio = 0 (o cualquier numero mayor)
Nodo.Tag = 2^62(o cualquier numero mayor a 62)

Privilegio AND Nodo.Tag

me marca el error: LA OPERACION ARITMETICA HA PROVOCADO UN DESBORDAMIENTO

ahora cabe decir que Privilegio es un DOUBLE y Nodo.Tag pues la potencia dos queda como double pero lo que se truena ES EL AND si yo tomo los valores por separado los puedo manipular hasta la potencia 2^76 pero cuando hago mi AND se truena y no puedo hacer nada... Sugerencia de que puede pasar? que sucede?? como solucionar el problema??? Ojala alguien pueda asesorarme y/o hecharme una manita saludos cordiales.

PD: Propuestas bien recibidas

2
VB .NET / Es posible inhabilitar columnas de un datagridview?
« en: Miércoles 29 de Septiembre de 2010, 16:10 »
Hola comunidad:

tengo un problema con un contro datagridview. El datagridview tiene 7 columnas y quiero deshabilitar 6 y dejar una disponible es decir que el usuario no pueda dar siquiera clic en las otras columnas y que no se seleccionen los elementos de esas columnas ya estableci su propiedad ReadOnly en true y la propiedad SelectionMode en CellSelect para que solo pueda seleccionar por celda y no por filas pero como puedo bloquearlas en su totalidad? si alguien tiene alguna sugerencia o tuvo un problema similar agradeceria mucho la colaboracion gracias y saludos cordiales

3
VB .NET / se ejecuta rutina en el diseñador.....
« en: Lunes 27 de Septiembre de 2010, 16:54 »
Hola comunidad:

Tengo un nuevo problema ahora resulta que tengo un formulario templete que tiene varias rutinas que se repiten a lo largo del software que estoy haciendo y para mejorar mi aplicacion la cree y solo la heredo a los demás formularios. PEEEERO resulta que tengo una rutina en el load del formulario templete y cuando le doy doble clic en modo diseño mi rutina se ejecuta asi que quiero ver si existe alguna manera de filtrar y saber que quien ejecuta el load es el diseñador de VB .Net y no la aplicacion corriendo no se si me explico ojala puedan asesorarme saludos

4
VB .NET / Solicito Asesoria con GDI y problema de calculo :S
« en: Martes 21 de Septiembre de 2010, 23:52 »
Hola que tal:

Estoy haciendo una aplicación en .Net para una empresa, el módulo que estoy haciendo grafica con GDI un pliego de papel de dimensiones W, H crea las reglas verticales, horizontales, dibuja las medidas, y lo hace en base a una escala predefinida. Al momento todo chévere hace el pliego y lo que necesito pero a ese pliego de papel se le van a realizar cortes de dimensión A, B ahora el sistema dice cuantos cortes caben en el pliego y cuanto de material se desperdicia pero lo que no he conseguido es que me grafique o dibuje los cortes en el pliego de papel.... seguramente es algo muy sencillo pero la verdad ya estoy desesperado y no logro concentrarme ojala alguien pueda asesorarme, guiarme o decirme como puedo resolver el problema debe hacer lo mismo que la siguiente pagina calcu pero en .Net

Dejo mi código... PD Esta es una versión previa a la que tengo completa ojala puedan ayudarme gracias de antemano

Imports System.Drawing.Printing
Imports System.Drawing.Drawing2D
Imports System.Windows

Public Class frmCortes

#Region "Variables"

#Region "Privadas"
    Private WithEvents prdDoc As New PrintDocument
    Private MedidaPapel As Size
    Private MedidaTrabajo As Size
    Dim bmpGrafico As New Bitmap(884, 540)
    Private CustomColors() As Integer
#End Region
#End Region

#Region "Constructor"
    Public Sub New(ByVal Medida_Papel As Size, ByVal Medida_Trabajo As Size)
        InitializeComponent()
        MedidaPapel = Medida_Papel
        MedidaTrabajo = Medida_Trabajo
    End Sub
#End Region

#Region "Eventos"
    Private Sub tsbCortes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbCortes.Click
        CambiaColor(My.Settings.colCortes)
    End Sub

    Private Sub tsbGuardar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbGuardar.Click
        GuardaImagen()
    End Sub

    Private Sub tsbHoja_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles tsbHoja.Click
        CambiaColor(My.Settings.colHoja)
    End Sub

    Private Sub tsbImprimir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbImprimir.Click
        ImprimeImagen()
    End Sub

    Private Sub tsbRegla_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles tsbRegla.Click
        CambiaColor(My.Settings.colRegla)
    End Sub

    Private Sub tsbTextos_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles tsbTextos.Click
        CambiaColor(My.Settings.colTexto)
    End Sub

    Private Sub tsbSalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tsbSalir.Click
        Me.Close()
    End Sub

    Private Sub frmCortes_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
        If e.Control And e.KeyCode = Keys.Q Then
            Me.Close()
        ElseIf e.Control And e.KeyCode = Keys.P Then
            ImprimeImagen()
        ElseIf e.Control And e.KeyCode = Keys.G Then
            GuardaImagen()
        End If
    End Sub

    Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
        MyBase.OnPaint(e)
        DibujaAreaPapel()
    End Sub

    Private Sub prdDoc_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles prdDoc.PrintPage
        e.Graphics.DrawImage(picDraw.Image, 0, 0)
    End Sub
#End Region

#Region "Métodos"
    Private Sub CambiaColor(ByRef colColor As Color)
        Try
            With cdlgColor
                .Color = colColor
                .CustomColors = CustomColors
                .AllowFullOpen = True
                .AnyColor = True
                .FullOpen = True
                .SolidColorOnly = True
                If .ShowDialog() = Windows.Forms.DialogResult.OK Then
                    colColor = .Color
                    CustomColors = .CustomColors
                End If
                DibujaAreaPapel()
            End With
        Catch ex As Exception
            MsgBox(ex.Message, MsgBoxStyle.Exclamation, Me.Text)
        End Try
    End Sub

    Private Sub DibujaAreaPapel()
        'Calcula numero de cortes que caben en el pliego
        Dim AreaPapel As Double = (MedidaPapel.Width * MedidaPapel.Height)
        Dim AreaTrabajo As Double = (MedidaTrabajo.Width * MedidaTrabajo.Height)
        Dim Unidades As Integer = AreaPapel / AreaTrabajo
        Me.Text = "Unidades por pliego: " & Unidades
        Me.Text = Me.Text & " | Desperdicio de Papel: " & CInt(100 - ((AreaTrabajo * 100) / AreaPapel) * Unidades) & " %"

        If (MedidaPapel.Height > MedidaPapel.Width) Then
            Dim aux As Double
            aux = MedidaPapel.Width
            MedidaPapel.Width = MedidaPapel.Height
            MedidaPapel.Height = aux
        End If

        'Iniciamos variables GDI Para Dibujo
        Dim g As Graphics = Graphics.FromImage(bmpGrafico)
        Dim Fuente As New Font("Segoe UI", 13, GraphicsUnit.Point)
        Dim MyBrush As Brush = New SolidBrush(My.Settings.colTexto)

        '->LIENZO
        g.FillRectangle(New SolidBrush(Color.White), 0, 0, picDraw.Width, picDraw.Height)

        '->REGLA VERTICAL
        g.DrawLine(New Pen(My.Settings.colRegla, 1), 9, 10, 25, 10)
        g.DrawLine(New Pen(My.Settings.colRegla, 1), 17, 10, 17, 500)
        g.DrawLine(New Pen(My.Settings.colRegla, 1), 9, 500, 25, 500)
        g.DrawLine(New Pen(Color.White, 22), 0, 258, 35, 258)


        '->REGLA HORIZONTAL
        g.DrawLine(New Pen(My.Settings.colRegla, 1), 40, 515, 40, 531)
        g.DrawLine(New Pen(My.Settings.colRegla, 1), 40, 523, 850, 523)
        g.DrawLine(New Pen(My.Settings.colRegla, 1), 850, 515, 850, 531)
        g.DrawLine(New Pen(Color.White, 13), 425, 522, 460, 522)

        '->MEDIDAS DE PAPEL
        If Len(MedidaPapel.Height.ToString) = 2 Then
            g.DrawString(MedidaPapel.Height.ToString, Fuente, MyBrush, 5, 245)
        Else
            g.DrawString(MedidaPapel.Height.ToString, Fuente, MyBrush, 1, 245)
        End If
        If Len(MedidaPapel.Width.ToString) = 2 Then
            g.DrawString(MedidaPapel.Width.ToString, Fuente, MyBrush, 430, 510)
        Else
            g.DrawString(MedidaPapel.Width.ToString, Fuente, MyBrush, 426, 510)
        End If

        '---------------------------------------------------------------------------------
        Dim lapiz As New Pen(My.Settings.colCortes)
        'Crea una linea punteada
        lapiz.DashStyle = DashStyle.Dash
        Dim coordenadas As Point() = {New Point(60, 20), New Point(60, 200), New Point(400, 200), New Point(400, 20), New Point(60, 20)}
        g.DrawLines(lapiz, coordenadas)
        '---------------------------------------------------------------------------------

        '->MARCO DE PAPEL
        Dim points As Point() = {New Point(40, 9), New Point(40, 500), New Point(850, 500), New Point(850, 9), New Point(40, 9)}
        g.DrawLines(New Pen(My.Settings.colHoja, 3), points)
        picDraw.Image = bmpGrafico
    End Sub

    Private Sub GuardaImagen()
        Dim cdlgGuardar As New SaveFileDialog
        cdlgGuardar.Filter = "PNG (*.png)| *.png"
        cdlgGuardar.ShowDialog()
        If DialogResult = DialogResult.Cancel Then Exit Sub
        Try
            bmpGrafico.Save(cdlgGuardar.FileName)
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
        cdlgGuardar.Dispose()
    End Sub

    Private Sub ImprimeImagen()
        Dim PrintDialog As New PrintDialog
        PrintDialog.Document = prdDoc
        If PrintDialog.ShowDialog = Windows.Forms.DialogResult.OK Then prdDoc.Print()
    End Sub
#End Region
End Class

5
VB .NET / Problemas con mi Textbox Personalizado.... evento Keyup
« en: Jueves 20 de Mayo de 2010, 17:53 »
Hola Comunidad:

Estoy haciendo un textbox personalizado simulando los textbox que podemos crear con CSS poniendolo un color de contorno a nuestro gusto y ancho del mismo. En fin ya logre hacerlo chambea bien pero ahora tengo un problema que siento no es muy complicado de hacer pero estoy iniciando en .Net y me falta muchisimo por aprender. Quiero que los eventos de mi textbox respondan adecuadamente para los eventos keyup, keydown o keypress ya que no responden cuando los inserto en un form.

Les dejo mi codigo pruebenlo y ojala puedan asesorarme saludos.

Imports System
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms

Namespace MiDSINCTextbox
Public Class clsDSINCTextbox
Inherits UserControl

#Region "Variables"
Dim colBorde As Color = Color.SteelBlue
Private Components As IContainer
Private intBorderSize As Integer = 1
Private intLeftpad As Integer = 2
Private intToppad As Integer = 2
Private WithEvents picBoth As New PictureBox()
Private WithEvents picLeft As New PictureBox()
Private WithEvents picRight As New PictureBox()
Private WithEvents picTop As New PictureBox()
Private WithEvents txtTextbox As New TextBox()
#End Region

#Region "Constructor"
Public Sub New()
MyBase.New()
IniciaComponentes()
colBorde = Color.DeepSkyBlue
End Sub
#End Region

#Region "Funciones"
Private Sub IniciaComponentes()
Me.SuspendLayout()
'Establecemos los parametros del textbox del control
With Me.txtTextbox
'Indicamos el tipo de borde
.BorderStyle = Windows.Forms.BorderStyle.None
'El tipo de fuente y estilo
.Font = New Font("Tahoma", 8.25!, FontStyle.Regular, GraphicsUnit.Point, CType(0, Byte))
'Establecemos una ubicacion
.Location = New Point(8, 5)
'La longitud máxima
.MaxLength = 0
'El nombre
.Name = "TextBox1"
'Un tamaño
.Size = New Size(176, 14)
'Texto por default
.Text = "TextBox"
End With
'Establecemos los parametros de la linea que dibuaremos del lado izquierdo
With Me.picLeft
'Color de fondo
.BackColor = colBorde ' Color.DeepSkyBlue
.Dock = DockStyle.Left
'establecemos una ubicacion
.Location = New Point(0, 1)
'el nombre
.Name = "picLeft"
'un tamaño
.Size = New Size(1, 22)
.TabStop = False
End With
'Establecemos los parametros de la linea que dibuaremos del lado derecho
With Me.picRight
'Establecemos el color de fondo
.BackColor = colBorde 'Color.DeepSkyBlue
.Dock = DockStyle.Right
'una ubicacion
.Location = New Point(191, 1)
'el nombre
.Name = "picRight"
'un tamaño
.Size = New Size(1, 22)
.TabStop = False
End With
'Establecemos los parametros de la linea que dibuaremos en la parte superior
With Me.picTop
'establecemos el color de fondo
.BackColor = colBorde 'Color.DodgerBlue
.Dock = DockStyle.Top
'el nombre
.Name = "picTop"
'un tamaño
.Size = New Size(192, 1)
.TabStop = False
End With
'Establecemos los parametros de la linea que dibuaremos en la parte inferior
With Me.picBoth
'establecemos el color de fondo
.BackColor = colBorde 'Color.DodgerBlue
.Dock = DockStyle.Bottom
'una ubicacion
.Location = New Point(0, 23)
'un nombre
.Name = "picBoth"
'un tamaño
.Size = New Size(192, 1)
.TabStop = False
End With
With Me
'establecemos el color de fondo
.BackColor = Color.White
.Controls.AddRange(New Control() {Me.txtTextbox, Me.picRight, Me.picLeft, Me.picBoth, Me.picTop})
'el nombre del control
.Name = "TextBox"
'un tamaño
.Size = New Size(192, 24)
.ResumeLayout(False)
End With
End Sub
#End Region

#Region "Métodos"
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (Components Is Nothing) Then Components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub

Private Sub TextBox_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Resize
picTop.Width = Me.Width
picLeft.Height = Me.Height
picRight.Height = Me.Height
picBoth.Width = Me.Width

txtTextbox.Location = New Point(intLeftpad, intToppad)
txtTextbox.Width = Me.Width - (intBorderSize * 2) - intLeftpad
txtTextbox.Height = Me.Height - (intBorderSize * 2) - intToppad
End Sub

Private Sub txtTextbox_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtTextbox.KeyUp
If e.KeyData = Keys.Enter Then MsgBox("Chingon")
End Sub
#End Region

#Region "Propiedades"
<Category("CustomProperties"), Description("Establece el color de fondo del control")>
Public Property BackGroudColor() As Color
Get
Return Me.BackColor
End Get
Set(ByVal value As Color)
Me.BackColor = value
txtTextbox.BackColor = value
End Set
End Property

<Category("CustomProperties"), Description("Establece el color de borde del control")>
Public Property BorderColor() As Color
Get
Return colBorde
End Get
Set(ByVal value As Color)
colBorde = value
picBoth.BackColor = value
picLeft.BackColor = value
picRight.BackColor = value
picTop.BackColor = value
End Set
End Property

<Category("CustomProperties"), Description("Establece el tamaño del borde del control")>
Public Property BorderSize() As Integer
Get
Return intBorderSize
End Get
Set(ByVal value As Integer)
intBorderSize = value
Me.Refresh()
End Set
End Property

'JE Propiedad bastante logica no XD
Public NotOverridable Overrides Property Font() As Font
Get
Return txtTextbox.Font
End Get
Set(ByVal Value As Font)
txtTextbox.Font = Value
Me.Refresh()
End Set
End Property

<Category("CustomProperties"), Description("Establece el color de la fuente del control")>
Public Overrides Property ForeColor() As Color
Get
Return txtTextbox.ForeColor
End Get
Set(ByVal value As Color)
txtTextbox.ForeColor = value
End Set
End Property

<Category("CustomProperties"), Description("Indica si el control sera multilinea")>
Public Property Multiline() As Boolean
Get
Return txtTextbox.Multiline
End Get
Set(ByVal value As Boolean)
txtTextbox.Multiline = value
Me.Refresh()
End Set
End Property

Public Property PaddingLeft() As Integer
Get
Return intLeftpad
End Get

Set(ByVal Value As Integer)
intLeftpad = Value
Me.Refresh()
End Set
End Property

Public Property PaddingTop() As Integer
Get
Return intToppad
End Get

Set(ByVal Value As Integer)
intToppad = Value
End Set
End Property

<Category("CustomProperties"), Description("Establece el caracter a utilizar para encriptar un password")>
Public Property PasswordChar() As String
Get
Return txtTextbox.PasswordChar
End Get
Set(ByVal value As String)
txtTextbox.PasswordChar = value
Me.Refresh()
End Set
End Property

<Category("CustomProperties"), Description("Indica si el control tendra scrolls y que tipo sera")>
Public Property ScrollBars() As ScrollBars
Get
Return txtTextbox.ScrollBars
End Get
Set(ByVal value As ScrollBars)
txtTextbox.ScrollBars = value
End Set
End Property

<Category("CustomProperties"), Description("Establece la alineacion del texto del control")>
Public Property TextAlign() As HorizontalAlignment
Get
Return txtTextbox.TextAlign
End Get
Set(ByVal value As HorizontalAlignment)
txtTextbox.TextAlign = value
Me.Refresh()
End Set
End Property

<Category("CustomProperties"), Description("Establece el texto que sera mostrado en el control")>
Public Property TextControl As String
Get
Return txtTextbox.Text
End Get
Set(ByVal Value As String)
txtTextbox.Text = Value
End Set
End Property

Public Property WordWrap() As Boolean
Get
Return txtTextbox.WordWrap
End Get
Set(ByVal value As Boolean)
txtTextbox.WordWrap = value
Me.Refresh()
End Set
End Property
#End Region
End Class
End Namespace

6
VB .NET / Problemas con un boton personalizado
« en: Lunes 12 de Abril de 2010, 21:01 »
Hola amigos programadores:

Llevo poco tiempo en el maravilloso y fascinante entorno de desarrollo .Net y pretendo hacer un boton personalizado para una aplicacion que estoy desarrollando pero resulta que no puedo anexar mi control al ToolBox (donde se encuentran todos los controles del VS .NEt para ser agregados en los proyectos) y menos al Formulario. Trato de crear el boton mediante codigo pero no veo ninguna de las propiedades y metodos que tiene mi control mas que los de la clase Button pues de ahi se hereda anexo mi codigo y espero puedan ayudarme a corregirlo y orientarme y decirme donde esta mi error saludos

Imports System
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms

Namespace DSINCButton
Partial Public Class clsDSINCButton
Inherits Button

#Region "Variables"
Private imgPress As Image
Private imgOver As Image
Private imgNormal As Image
Private imgDeshabilitado As Image
Private totTooltip As New ToolTip()
Private strMensaje As String = ""
#End Region

#Region "Propiedades"
<Category("DSINC Propiedades")>
<Description("Tooltip que del Control")>
Public Property DSINCTooltip As String
Get
Return strMensaje
End Get
Set(ByVal value As String)
strMensaje = value
End Set
End Property

<Category("DSINC Propiedades")>
<Description("Imagen evento OnClick ó MouseDown")>
Public Property DSINCImgPress As Image
Get
Return imgPress
End Get
Set(ByVal value As Image)
imgPress = value
End Set
End Property

<Category("DSINC Propiedades")>
<Description("Imagen evento OnMouseOver")>
Public Property DSINCImgOver As Image
Get
Return imgOver
End Get
Set(ByVal value As Image)
imgOver = value
End Set
End Property

<Category("DSINC Propiedades")>
<Description("Imagen evento OnMouseLeave o estado normal del control")>
Public Property DSINCImgNormal As Image
Get
Return imgNormal
End Get
Set(ByVal value As Image)
imgNormal = value
End Set
End Property

<Category("DSINC Propiedades")>
<Description("Imagen estado Deshabilitado")>
Public Property DSINCImgDeshabilitado As Image
Get
Return imgDeshabilitado
End Get
Set(ByVal value As Image)
imgDeshabilitado = value
End Set
End Property
#End Region

#Region "Constructor"
Sub New()
MyBase.New()
End Sub
#End Region

#Region "Eventos y Métodos"
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
MyBase.OnPaint(e)

'Add your custom paint code here
End Sub

Protected Overrides Sub OnClick(ByVal e As System.EventArgs)
MyBase.Image = imgPress
MyBase.OnClick(e)
End Sub

Protected Overrides Sub OnMouseHover(ByVal e As System.EventArgs)
MyBase.Image = imgOver
If Trim(strMensaje) <> "" Then totTooltip.SetToolTip(Me, strMensaje)
MyBase.OnMouseHover(e)
End Sub

Protected Overrides Sub OnMouseLeave(ByVal e As System.EventArgs)
MyBase.Image = imgOver
MyBase.OnMouseLeave(e)
End Sub

Protected Overrides Sub OnMouseDown(ByVal mevent As System.Windows.Forms.MouseEventArgs)
MyBase.Image = imgPress
MyBase.OnMouseDown(mevent)
End Sub

Protected Overrides Sub OnCreateControl()
MyBase.OnCreateControl()
MyBase.Image = imgNormal
MyBase.FlatStyle = Windows.Forms.FlatStyle.Flat
MyBase.FlatAppearance.MouseDownBackColor = Color.Transparent
MyBase.FlatAppearance.MouseOverBackColor = Color.Transparent
MyBase.FlatAppearance.BorderSize = 0
MyBase.Width = imgNormal.Width
MyBase.Height = imgNormal.Height
End Sub

Protected Overrides Sub OnEnabledChanged(ByVal e As System.EventArgs)
MyBase.OnEnabledChanged(e)
If MyBase.Enabled Then
MyBase.Image = imgNormal
Else
MyBase.Image = imgDeshabilitado
End If
End Sub
#End Region
End Class
End Namespace  ^_^

7
VB .NET / Necesito asesoria sobre .Net Framework 4
« en: Sábado 6 de Marzo de 2010, 17:54 »
Hola, estoy trabajando con un control que me econtre en la web, se me hizo muy interesante bonito y funcional se llama MACTrackBar. Tengo VS 2010 y al intentar integrarlo a mis aplicaciones me arroja un error segun lo que puedo ver es porque no es compatible con el .Net Framework que ocupo (version 4) ya que el control esta diseñado para .Net Framework 2..... Pues nada que no me rendi y empece a migrarlo a la version 4 (segun yo) pero me tope con un problema pues al usar la instruccion:

Inherits System.Windows.Forms.Design.ControlDesign

me dice: Type 'Inherits System.Windows.Forms.Design.ControlDesign' is not Defined.
importe System.Windows.Forms.Design y segun todo esta bien pero parece que el .Net Framework 4 ya no esta ControlDesign alguien puede ayudarme o asesorarme sobre como corregir el problema porque por esa instruccion me marca cuando se ocupa:

Me.Control
SelectionRules
PostFilterProperties
PostFilterEvents

el codigo que estoy modificando lo subi a la red pero no puedo publicar la url ojala puedan ayudarme.

Páginas: [1]