Menú

Mostrar Mensajes

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

Mostrar Mensajes Menú

Mensajes - seba123neo

#1351
una pregunta que nunca se hizo en el foro creo...
#1352
te paso una clase con una api indocumentada llamada SetConsoleFont, igualmente no parece ser posible cambiarla a gusto, pero te la incrementa algo.

Clase:

Código (vbnet) [Seleccionar]
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text
Imports System.Runtime.InteropServices

Namespace ConsoleExtender
    <StructLayout(LayoutKind.Sequential, Pack:=1)> _
    Public Structure ConsoleFont
        Public Index As UInteger
        Public SizeX As Short, SizeY As Short
    End Structure

    Public NotInheritable Class ConsoleHelper
        <DllImport("kernel32")> _
        Private Shared Function SetConsoleFont(ByVal hOutput As IntPtr, ByVal index As UInteger) As Boolean
        End Function

        Private Enum StdHandle
            OutputHandle = -11
        End Enum

        <DllImport("kernel32")> _
        Private Shared Function GetStdHandle(ByVal index As StdHandle) As IntPtr
        End Function

        Public Shared Function SetConsoleFont(ByVal index As UInteger) As Boolean
            Return SetConsoleFont(GetStdHandle(StdHandle.OutputHandle), index)
        End Function

        <DllImport("kernel32")> _
        Private Shared Function GetConsoleFontInfo(ByVal hOutput As IntPtr, <MarshalAs(UnmanagedType.Bool)> ByVal bMaximize As Boolean, ByVal count As UInteger, <MarshalAs(UnmanagedType.LPArray), Out()> ByVal fonts As ConsoleFont()) As Boolean
        End Function

        <DllImport("kernel32")> _
        Private Shared Function GetNumberOfConsoleFonts() As UInteger
        End Function

        Public Shared ReadOnly Property ConsoleFontsCount() As UInteger
            Get
                Return GetNumberOfConsoleFonts()
            End Get
        End Property

        Public Shared ReadOnly Property ConsoleFonts() As ConsoleFont()
            Get
                Dim fonts As ConsoleFont() = New ConsoleFont(GetNumberOfConsoleFonts() - 1) {}
                If fonts.Length > 0 Then
                    GetConsoleFontInfo(GetStdHandle(StdHandle.OutputHandle), False, CUInt(fonts.Length), fonts)
                End If
                Return fonts
            End Get
        End Property
    End Class
End Namespace


Modulo:

Código (vbnet) [Seleccionar]
Module Module1
    Sub Main()
        Dim fonts = ConsoleExtender.ConsoleHelper.ConsoleFonts

        For f As Integer = 0 To fonts.Length - 1
            Console.WriteLine("{0}: X={1}, Y={2}", fonts(f).Index, fonts(f).SizeX, fonts(f).SizeY)
        Next

        ConsoleExtender.ConsoleHelper.SetConsoleFont(9)
        Console.ReadLine()
    End Sub
End Module


saludos.
#1353
si esto es asi, entonces me esta defraudando firefox, acaso quiere competir con microsoft por un simple numerito de version ? prefiero mil veces que sigan con las releases 4.2.4...etc.
#1354
Hola, proba leerlo asi:

Código (vbnet) [Seleccionar]
Dim A As Assembly = Assembly.Load(File.ReadAllBytes("C:\Ejemplo.exe"))

saludos.
#1355
perdona no sabia que era una interfaz, recien me bajo la libreria y lo vi, no estoy seguro pero creo que debes implementarla asi:

Código (vbnet) [Seleccionar]
Imports BBCFPCOMLib

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim ser As New Libreria
        ser.ConnectAnyUSB(50, 0)
    End Sub
End Class

Public Class Libreria

    Implements BBCFPCOMLib.CFPGRSCOM

    Public Event OnDebugMessage(ByVal nLogLevel As Integer, ByVal bstrMessage As String) Implements BBCFPCOMLib._ICFPEvents_Event.OnDebugMessage

    Public Event OnNeedPassword(ByVal nTriesRemaining As Integer, ByRef password As String) Implements BBCFPCOMLib._ICFPEvents_Event.OnNeedPassword

    Public Event OnProgress(ByVal bstrCode As String, ByVal nPercent As Integer, ByVal ulExtraInfo As UInteger) Implements BBCFPCOMLib._ICFPEvents_Event.OnProgress

    Public Sub Abort() Implements BBCFPCOMLib.ICFPGRSCOM.Abort

    End Sub

    Public Sub Connect(ByVal nComport As Integer, ByVal nConnectBaudRate As Integer, ByVal nMaxTimeoutMs As Integer, ByVal nResetTimeOusMs As Integer) Implements BBCFPCOMLib.ICFPGRSCOM.Connect

    End Sub

    Public Sub ConnectAnyUSB(ByVal nMaxTimeoutMs As Integer, ByVal nResetTimeOutMs As Integer) Implements BBCFPCOMLib.ICFPGRSCOM.ConnectAnyUSB

    End Sub

    Public Sub ConnectToBootImage() Implements BBCFPCOMLib.ICFPGRSCOM.ConnectToBootImage

    End Sub

    Public Sub ConnectToBootrom() Implements BBCFPCOMLib.ICFPGRSCOM.ConnectToBootrom

    End Sub

    Public Property ConnectType() As BBCFPCOMLib.CFP_TYPE Implements BBCFPCOMLib.ICFPGRSCOM.ConnectType
        Get

        End Get
        Set(ByVal value As BBCFPCOMLib.CFP_TYPE)

        End Set
    End Property

    Public Sub ConnectUSB(ByVal bstrProperty As String, ByVal bstrValue As String, ByVal nMaxTimeoutMs As Integer, ByVal nResetTimoeOutMs As Integer) Implements BBCFPCOMLib.ICFPGRSCOM.ConnectUSB

    End Sub

    Public Sub Disconnect1() Implements BBCFPCOMLib.ICFPGRSCOM.Disconnect

    End Sub

    Public Sub GetBootromInfo(ByRef pulBRver As UInteger, ByRef pbSecurityEnabled As Boolean) Implements BBCFPCOMLib.ICFPGRSCOM.GetBootromInfo

    End Sub

    Public Sub GetCFPVersion(ByRef pulCFPver As UInteger) Implements BBCFPCOMLib.ICFPGRSCOM.GetCFPVersion

    End Sub

    Public Function GetCOMBuildVersion() As String Implements BBCFPCOMLib.ICFPGRSCOM.GetCOMBuildVersion

    End Function

    Public Function GetCOMBuildVersionID() As UInteger Implements BBCFPCOMLib.ICFPGRSCOM.GetCOMBuildVersionID

    End Function

    Public Function GetFlashSizeInBytes() As UInteger Implements BBCFPCOMLib.ICFPGRSCOM.GetFlashSizeInBytes

    End Function

    Public Sub GetOSVersionOfSFI(ByVal bstrFileName As String, ByRef pulOSver As UInteger) Implements BBCFPCOMLib.ICFPGRSCOM.GetOSVersionOfSFI

    End Sub

    Public Sub GetOSVersionOfSFIEx(ByVal bstrFileName As String, ByRef pulOSver As UInteger, ByRef pbstrOSver As String) Implements BBCFPCOMLib.ICFPGRSCOM.GetOSVersionOfSFIEx

    End Sub

    Public Function GetPatriotVersion() As String Implements BBCFPCOMLib.ICFPGRSCOM.GetPatriotVersion

    End Function

    Public Sub GetPlatformID(ByRef pulPID As UInteger, ByRef pbstrDeviceString As String) Implements BBCFPCOMLib.ICFPGRSCOM.GetPlatformID

    End Sub

    Public Sub GetSFIOSVersionPlatID(ByVal bstrFileName As String, ByRef pulOSver As UInteger, ByRef pulPlatID As UInteger) Implements BBCFPCOMLib.ICFPGRSCOM.GetSFIOSVersionPlatID

    End Sub

    Public Function GetSupportedBands() As UInteger Implements BBCFPCOMLib.ICFPGRSCOM.GetSupportedBands

    End Function

    Public Function GetVendorID() As UShort Implements BBCFPCOMLib.ICFPGRSCOM.GetVendorID

    End Function

    Public Sub GetVersionOfAPPfile(ByVal bstrFileName As String, ByRef pbstrAPPversion As String, ByRef pbVersionValid As Boolean, ByRef pbstrAppNumber As String, ByRef pbNumberValid As Boolean) Implements BBCFPCOMLib.ICFPGRSCOM.GetVersionOfAPPfile

    End Sub

    Public Sub HeadInTheSandMode(ByVal bChangeMode As Boolean, ByRef pbHISMode As Boolean) Implements BBCFPCOMLib.ICFPGRSCOM.HeadInTheSandMode

    End Sub

    Public Sub InvokeMethod(ByVal bstrMethod As String, ByRef pulParam As UInteger, ByRef pbstrParam As String) Implements BBCFPCOMLib.ICFPGRSCOM.InvokeMethod

    End Sub

    Public Function IsDesktopRAMImage() As Boolean Implements BBCFPCOMLib.ICFPGRSCOM.IsDesktopRAMImage

    End Function

    Public Sub LoadBootrom(ByVal bstrFileName As String) Implements BBCFPCOMLib.ICFPGRSCOM.LoadBootrom

    End Sub

    Public Sub NukeDevice() Implements BBCFPCOMLib.ICFPGRSCOM.NukeDevice

    End Sub

    Public Sub PatriotConnectToTunnel() Implements BBCFPCOMLib.ICFPGRSCOM.PatriotConnectToTunnel

    End Sub

    Public Sub PatriotDisconnect() Implements BBCFPCOMLib.ICFPGRSCOM.PatriotDisconnect

    End Sub

    Public Sub PatriotGetInfo(ByRef pulPATver As UInteger, ByRef pulTunnelver As UInteger, ByRef pbBatteryVoltageOk As Boolean) Implements BBCFPCOMLib.ICFPGRSCOM.PatriotGetInfo

    End Sub

    Public Sub PatriotGetOSVersionOfFile(ByVal bstrFileName As String, ByRef pulOSver As UInteger) Implements BBCFPCOMLib.ICFPGRSCOM.PatriotGetOSVersionOfFile

    End Sub

    Public Function PatriotGetOSVersionOfFileStr(ByVal bstrFileName As String) As String Implements BBCFPCOMLib.ICFPGRSCOM.PatriotGetOSVersionOfFileStr

    End Function

    Public Function PatriotInBerbugMode() As Boolean Implements BBCFPCOMLib.ICFPGRSCOM.PatriotInBerbugMode

    End Function

    Public Sub PatriotLastLoadSuccessful(ByRef pbSuccess As Boolean) Implements BBCFPCOMLib.ICFPGRSCOM.PatriotLastLoadSuccessful

    End Sub

    Public Sub PatriotLoadImage(ByVal bstrFileName As String) Implements BBCFPCOMLib.ICFPGRSCOM.PatriotLoadImage

    End Sub

    Public Sub ReloadFileSystem(ByVal bstrFileName As String) Implements BBCFPCOMLib.ICFPGRSCOM.ReloadFileSystem

    End Sub

    Public Sub ReloadOS(ByVal bstrFileName As String) Implements BBCFPCOMLib.ICFPGRSCOM.ReloadOS

    End Sub

    Public Sub ReloadPlantImage(ByVal bstrFileName As String) Implements BBCFPCOMLib.ICFPGRSCOM.ReloadPlantImage

    End Sub

    Public Sub ReloadPlantImageWithPatriot(ByVal bstrFileName As String) Implements BBCFPCOMLib.ICFPGRSCOM.ReloadPlantImageWithPatriot

    End Sub

    Public Sub ResetPatriot() Implements BBCFPCOMLib.ICFPGRSCOM.ResetPatriot

    End Sub

    Public Sub SaveFileSystem(ByVal bstrFileName As String, ByVal bVerifyToAPP As Boolean) Implements BBCFPCOMLib.ICFPGRSCOM.SaveFileSystem

    End Sub

    Public Sub SetConnectValues(ByVal nMaxTimeoutMs As Integer, ByVal bIncremental As Boolean) Implements BBCFPCOMLib.ICFPGRSCOM.SetConnectValues

    End Sub

    Public Sub SetMassStorage(ByVal nOn As Integer) Implements BBCFPCOMLib.ICFPGRSCOM.SetMassStorage

    End Sub

    Public Sub SuperNukeDevice() Implements BBCFPCOMLib.ICFPGRSCOM.SuperNukeDevice

    End Sub

    Public Sub ToastDevice(ByVal bstrPassword As String) Implements BBCFPCOMLib.ICFPGRSCOM.ToastDevice

    End Sub

    Public Sub WhoAmI(ByVal bstrWhoAmI As String) Implements BBCFPCOMLib.ICFPGRSCOM.WhoAmI

    End Sub

    Public Sub Wipe(ByVal bWipeOS As Boolean) Implements BBCFPCOMLib.ICFPGRSCOM.Wipe

    End Sub
End Class


todas esas funciones son las que tiene la dll dentro, no las escribi yo, me las detecto y escribio automaticamente el visual studio cuando implemente de BBCFPCOMLib.CFPGRSCOM

saludos.
#1356
sera que te falta instanciar el objeto CFP con la palabra New, ahi solo la declaraste.

PD: esa api InitCommonControls no es necesaria en .NET
#1357
busca sobre el metodo POST y sockets.
#1358
haber si me queda claro lo que queres hacer, simplemente es un usercontrol que crea botones ? o sea yo le digo que me cree 10 botones y el usercontrol muestra eso ? y que cada uno tenga su evento no ?
#1359
mejor que no sea compatible, porque no pienso usarlo  :xD
#1360
Código (vbnet) [Seleccionar]
Module Module1

    Sub Main()

        Dim vParametro As String = Command()

        If vParametro <> String.Empty Then
            If vParametro = "hola" Then
                Console.WriteLine("me llamaste con el parametro 'hola'")
            Else
                Console.WriteLine("me llamaste con el parametro '" & vParametro & "'")
            End If
        Else
            Console.WriteLine("me llamaste sin parametros")
        End If
        Console.ReadLine()
    End Sub

End Module