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 ... 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 [1003] 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 ... 1254
10021  Programación / Python / Re: >>>>>>>>>>>>>>Convertir binarios en python<<<<<<<<<<<<<<< en: 7 Enero 2013, 15:03 pm
googleando 1 Minuto conseguí este código.  :silbar:

Idem.

Este es un poco distinto.

Código
  1. def ascii_to_bin(char):
  2. ascii = ord(char)
  3. bin = []
  4. while (ascii > 0):
  5. if (ascii & 1) == 1:
  6. bin.append("1")
  7. else:
  8. bin.append("0")
  9. ascii = ascii >> 1
  10. bin.reverse()
  11. binary = "".join(bin)
  12. zerofix = (8 - len(binary)) * '0'
  13. return zerofix + binary
  14.  
  15.  
  16. # Ejemplo:
  17.  
  18. String = 'hello'
  19.  
  20. binary = []
  21. for char in String:
  22. binary.append(ascii_to_bin(char))
  23.  
  24. print binary
  25. print " ".join(binary) # 01101000 01100101 01101100 01101100 01101111

Saludos
10022  Informática / Software / VisualStudio 2012 U. (Instalador+Plantillas+Snippets+Libs+Controles+Tools) en: 7 Enero 2013, 14:37 pm
MEGA-PACK DE VISUAL STUDIO 2012
Contiene un instalador personalizado + Recursos de todo tipo



¡ Llegó la nueva versión actualizada del instalador !

He corregido un error que sufrieron algunas personas con la carpeta de instalación del VS en la version antigua de este instalador...
Además lo he optimizado tanto en el sistema de la instalación de los componentes, como en su desinstalación... ...Y contiene más librerías, más controles, y más snippets!



El instalador contiene todo lo necesario para empezar a programar en .NET, aunque está ligéramente orientado al desarrollo para VB.NET.


La instalación completa y la instalación por defecto han sido testeadas en Windows 7 de 32 y 64 Bits, en Windows XP tampoco debería haber problemas.



Imágenes:

   

   

   



   



Contenido:


  • Componentes originales opcionales de VS2012 (Paquetes offline):
    .NET FX 4
    .NET FX 4.5
    Bliss
    Report Viewer
    IntelliTrace
    SDK Tools 3
    SDK Tools 4
    WCF Data Services


  • Componentes originales opcionales de VS2012 (Paquetes descargables):
    Blend
    Microsoft Foundation Class For C++
    Microsoft Help Viewer 2.0
    Microsoft LightSwitch
    Microsoft office developer tools
    Microsoft portable library multi-targeting pack
    Microsoft report viewer add-on
    Microsoft sharepoint developer tools
    Microsoft silverlight 5 SDK
    Microsoft SQL DAC
    Microsoft SQL DOM
    Microsoft SQL Server 2012 Express LocalDB
    Microsoft SQL Server 2012 management objects
    Microsoft SQL Server 2012 system clr types
    Microsoft SQL Server 2012 transact-SQL
    Microsoft SQL Server Compact Edition
    Microsoft SQL Server Compact edition tools
    Microsoft SQL Server Data tools
    Microsoft Visual c++ 2012 Compilers
    Microsoft Visual c++ 2012 core libraries
    Microsoft Visual c++ 2012 debug runtime
    Microsoft Visual c++ 2012 desingtime
    Microsoft Visual c++ 2012 extended libraries
    Microsoft Visual Studio team foundation server 2012 storyboarding
    Microsoft web deploy dsqlpackage provider
    Microsoft web developer tools
    Silverlight developer kit
    Visual Studio Analytics
    Visual Studio Dotfuscator
    Visual Studio extensions for windows library for javascript
    Visual Studio profiler
    WCF RIA Services 1.0 SP2
    Windows Software development kit


  • Idiomas para la IDE:
    Castellano


  • Extensiones para la IDE:
    Auto Scroll
    Batch Format
    Code Jumper
    Image optimizer
    Language convert
    Middle click to definition
    Piczard
    Progressive Scrool
    Regular expression tester
    Sticky highlight
    Toogle tabs
    Translator
    Trout Zoom
    XAML Styler


  • Librerías:
    DotNetZip
    EASendMail
    MediaInfo
    SevenZipSharp
    VistaCoreAudioApi


  • Controles (Suites y Toolkits):
    Ai Controls
    Cloud Toolkit
    DotNetBar
    Extended Dot Net
    Krypton
    ObjectListView
    WindowsFormsToolkit


  • Controles de terceros):
    [ Buttons ] AdvButton
    [ Buttons ] ArrowButton
    [ Buttons ] ButtonBarsControl
    [ Buttons ] CButtonLib
    [ Buttons ] DOAShape
    [ Buttons ] GlowButton
    [ Buttons ] Iconits
    [ Buttons ] ImageButton
    [ Buttons ] OfficeButton
    [ Buttons ] PulseButton
    [ Buttons ] SplitButton
    [ Buttons ] TripleButton
    [ CheckBoxes ] DontShowAgainCheckbox
    [ ColorPickers ] ColorPickerLib
    [ ColorPickers ] gColorBlender
    [ ComboBoxes ] CheckedCombobox
    [ ComboBoxes ] ImageComboBox
    [ Date-Time ] DateAndTimeControls
    [ GroupBoxes ] CodeVendor.Controls
    [ GroupBoxes ] Owf.Controls.OutlookGroupBox
    [ GroupBoxes ] UIToolbox.CheckGroupBox
    [ GroupBoxes ] UIToolbox.RadioGroupBox
    [ Knobs ] KnobControl
    [ Labels ] BorderLabel
    [ Labels ] DOATransparentLabel
    [ Labels ] dzzControls
    [ Labels ] gLabel
    [ Labels ] GradientLabel
    [ Labels ] iGreen.Controls.uControls.uLabelX
    [ Labels ] Owf.Controls.OwfProgressControl
    [ Labels ] TransparentLabel
    [ Labels ] VerticalLabel
    [ ListBoxes ] ColorListBox
    [ Listviews ] gCursor
    [ Listviews ] gListviewControl
    [ Listviews ] TransparentListView
    [ Menus ] CustomizableStrips
    [ Menus ] CustomToolStrip
    [ Miscellaneous ] Animator
    [ Miscellaneous ] AwesomeShapeControl
    [ Miscellaneous ] CG.Animation
    [ Miscellaneous ] CoolBlinkies
    [ Miscellaneous ] CountDownTimer
    [ Miscellaneous ] DriveComboBox
    [ Miscellaneous ] ErrorControls
    [ Miscellaneous ] Owf.Controls.DigitalDisplayControl
    [ Miscellaneous ] ShaperRater
    [ Miscellaneous ] StarRateControl
    [ Miscellaneous ] StarRating
    [ Miscellaneous ] Vista GUI
    [ Miscellaneous ] VistaMenuControl
    [ Miscellaneous ] WizardControl
    [ NumberPickers ] CoolSoft.NumericUpDownEx.VB
    [ NumberPickers ] GLUI.NET
    [ Ookii Dialogs ] Ookii.Dialogs
    [ Ookii Dialogs ] Ookii.Dialogs.Wpf
    [ Panels ] AlphaGradientPanel
    [ Panels ] gGlowBox
    [ Panels ] GradientPanel
    [ Panels ] KISControls
    [ Panels ] MBPanel
    [ Panels ] OVT.CustomControls
    [ Panels ] Owf.Controls.A1Panel
    [ Panels ] Owf.Controls.OutlookPanelEx
    [ Panels ] UI.Glass.Panel
    [ Panels ] VS2008Panel
    [ PictureBoxes ] Imagecontrol
    [ ProgressBars ] AmazingProgressBar
    [ ProgressBars ] BusyBarLib
    [ ProgressBars ] Deltares.Controls
    [ ProgressBars ] EasyProgressBarPacket
    [ ProgressBars ] JCS.Components.NeroBar
    [ ProgressBars ] MRG.Controls.UI
    [ ProgressBars ] Owf.Controls.VistaProgressBar
    [ ProgressBars ] ProgBar
    [ ProgressBars ] ProgressBarGoogleChrome
    [ ProgressBars ] ProgressBars
    [ ProgressBars ] SPB
    [ ProgressBars ] Windows7ProgressBar
    [ RichTextBoxes ] CodeTextBox
    [ RichTextBoxes ] FastColoredTextBox
    [ RichTextBoxes ] RicherTextBox
    [ RichTextBoxes ] RichTextBoxLinks
    [ ScrollBars ] CustomScrollBar
    [ Tabs ] JacksonSoft.CustomTabControl
    [ Tabs ] KRBTabControl
    [ Tabs ] TDHTabCtl
    [ Tabs ] UxTabControl
    [ Tabs ] VSTabControl
    [ Tabs ] XPTabControl
    [ Textboxes ] AlphaBlendTextBox
    [ Textboxes ] Blinkertextbox
    [ Textboxes ] ChreneLib
    [ Textboxes ] Custom Featured MessageBox
    [ Textboxes ] DropDownContainer
    [ Textboxes ] ExtendedTextBox
    [ Textboxes ] iptb
    [ Textboxes ] NCI.Windows.Controls
    [ Textboxes ] TextBoxHint
    [ TimePickers ] gTimePickerControl
    [ TitleBars ] gTitleBarLib
    [ TitleBars ] TitleBarControl
    [ TitleBars ] window control box
    [ ToolBoxes ] Guifreaks.Common
    [ ToolBoxes ] Guifreaks.NavigationBar
    [ ToolBoxes ] MozBar
    [ ToolBoxes ] pplStuff.Controls.ToolBox
    [ ToolBoxes ] ToolBox
    [ ToolBoxes ] XPControlLib
    [ Tooltips ] iToolTip
    [ Tooltips ] NotificationWindow
    [ TrackBars ] gTrackBar
    [ TrackBars ] MACTrackBarLib
    [ TreeViews ] MBTreeViewExplorer
    [ Vista ] VistaControls
    [ WebBrowsers ] WebBrowserEx
    [ Windows API Code Pack ] Microsoft.WindowsAPICodePack


  • Menú de snippets predefinidos (Para VB.NET):
    [ Application ] Add controls in real-time
    [ Application ] Add controls with events in real-time
    [ Application ] Append text to control
    [ Application ] Center Form
    [ Application ] Change Language
    [ Application ] Click a control to move it
    [ Application ] Context Menu
    [ Application ] Fade IN-OUT
    [ Application ] For each checkbox in...
    [ Application ] For each control in...
    [ Application ] Form Docking
    [ Application ] FullScreen
    [ Application ] Get Current APP Name
    [ Application ] Get Current APP Path
    [ Application ] Get User Config - copia
    [ Application ] Get User Config
    [ Application ] GlobalHotkeys
    [ Application ] Hotkeys
    [ Application ] Ignore Exceptions
    [ Application ] InputBox
    [ Application ] Load INI Settings
    [ Application ] Load Resource To Disk
    [ Application ] Minimize to systray
    [ Application ] Move Control
    [ Application ] Move Form
    [ Application ] Round Borders
    [ Application ] Select all checkboxes
    [ Application ] Set Control Border Color
    [ Application ] Set Control Hint
    [ Application ] Show or hide form in NotifyIcon
    [ Application ] Trial Period
    [ Audio ] Play WAV LOOP
    [ Audio ] Play WAV
    [ Audio ] Rec Sound
    [ Audio ] Stop sound
    [ Colors ] Get Random QB Color
    [ Colors ] Get Random RGB Color
    [ Console ] Hide or show console
    [ Console ] Join Arguments
    [ Console ] Menu with arrows
    [ Console ] Parse arguments
    [ Controls ] [LinkLabel] - New LinkLabel
    [ Controls ] [ListView] - ItemChecked Event
    [ Controls ] [ListView] - ListView Sort Column event
    [ Controls ] [MessageBox] Centered MessageBox
    [ Controls ] [MessageBox] Question - Cancel operation
    [ Controls ] [MessageBox] Question - Exit application
    [ Controls ] [OpenFileDialog] - New dialog
    [ Controls ] [RichTextBox] Load TextFile in RichTextbox
    [ Controls ] [SaveFileDialog] - New dialog
    [ Controls ] [Textbox] Allow only letters
    [ Controls ] [Textbox] Allow only numbers
    [ Controls ] [Textbox] Drag-Drop a file
    [ Controls ] [Textbox] Drag-Drop a folder
    [ Controls ] [Textbox] wait for ENTER key
    [ Controls ] [WebBrowser] Wait for webpage to be loaded
    [ Cryptography ] AES Decrypt
    [ Cryptography ] AES Encrypt
    [ Cryptography ] Base64 To String
    [ Cryptography ] Encrypt-Decrypt string (Method 1)
    [ Cryptography ] Encrypt-Decrypt string (Method 2)
    [ Cryptography ] String To Base64
    [ Custom APIS ] MediaInfo Examples
    [ Custom APIS ] MediaInfo [CLASS]
    [ Custom APIS ] SevenZipSharp Compress
    [ Custom APIS ] SevenZipSharp Extract
    [ Custom APIS ] SevenZipSharp FileInfo
    [ Custom APIS ] [VistaCoreAudioAPI] - Fade Master Volume
    [ Custom APIS ] [VistaCoreAudioAPI] - Get Master Volume
    [ Custom APIS ] [VistaCoreAudioAPI] - Mute Master Volume
    [ Custom APIS ] [VistaCoreAudioAPI] - Set Master Volume
    [ Custom APIS ] [Windows API Code Pack] - Set TaskBar Status
    [ Custom APIS ] [Windows API Code Pack] - Set TaskBar Value
    [ Custom Controls ] PopCursor example
    [ Custom Controls ] PopCursor [CLASS]
    [ Custom Controls ] [Ooki VistaFolderBrowserDialog] - New dialog
    [ Custom Controls ] [RichTextBoxEx] - Insert FileLink
    [ Directories ] Can Access To Folder
    [ Directories ] Directory Exist
    [ Directories ] Get Directory Size
    [ Directories ] Make Dir
    [ Directories ] Set Folder Access
    [ Files ] Can Access To File
    [ Files ] Change File Attributes
    [ Files ] Compare Files
    [ Files ] Copy File With Cancel
    [ Files ] Copy File
    [ Files ] Create ShortCut (.lnk)
    [ Files ] Delete File
    [ Files ] File Add Attribute
    [ Files ] File Exist
    [ Files ] File Have Attribute
    [ Files ] File Remove Attribute
    [ Files ] Get All Files
    [ Files ] Get File Info [FUNCTION]
    [ Files ] Get File Info
    [ Files ] Get Files By FileExtensions
    [ Files ] Move File
    [ Files ] Rename File
    [ Files ] Resolve shortcuts (.lnk)
    [ Files ] Set File Access
    [ Files ] Validate Windows FileName
    [ Fonts ] Font Is Installed
    [ Fonts ] Get Installed Fonts
    [ Fonts ] Use Custom Text-Font
    [ Hardware ] Get Connected Drives
    [ Hardware ] Get CPU ID
    [ Hardware ] Get Drives Info
    [ Hardware ] Get Free Disk Space
    [ Hardware ] Get Motherboard ID
    [ Hardware ] Get Printers
    [ Hardware ] Monitorize Drives
    [ Hashes ] Get CRC32
    [ Hashes ] Get MD5 Of File
    [ Hashes ] Get MD5 Of String
    [ Hashes ] Get SHA1 Of File
    [ Hashes ] Get SHA1 Of String
    [ Image ] Desktop ScreenShot
    [ Image ] Drag-Drop a image
    [ Image ] For each Image in My.Resources
    [ Image ] Form ScreenShot
    [ Image ] Get Image Sector
    [ Image ] GrayScale Image
    [ Image ] Resize Image File
    [ Image ] Resize Image Resource
    [ Image ] Save ImageFile
    [ Internet ] Download URL
    [ Internet ] FTP Upload
    [ Internet ] Get IP Adress
    [ Internet ] Get URL SourceCode
    [ Internet ] GMail Sender
    [ Internet ] Hotmail Sender
    [ Internet ] Is Internet Avaliable
    [ Internet ] Send POST PHP
    [ Internet ] URL Decode
    [ Internet ] URL Encode
    [ Internet ] Validate URL
    [ Miscellaneous ] Byte To Char
    [ Miscellaneous ] Captcha Generator
    [ Miscellaneous ] Char To Byte
    [ Miscellaneous ] Convert Time
    [ Miscellaneous ] Elapsed Time [FUNCTION]
    [ Miscellaneous ] Elapsed Time
    [ Miscellaneous ] Get Enum Name
    [ Miscellaneous ] Get Enum Value
    [ Miscellaneous ] Get FrameWork Of File
    [ Miscellaneous ] Get Percentage
    [ Miscellaneous ] Get Random Number
    [ Miscellaneous ] Get Random Password
    [ Miscellaneous ] Hex to Byte-Array
    [ Miscellaneous ] Minimize VS IDE when APP is in execution
    [ Miscellaneous ] Number Is In Range
    [ Miscellaneous ] Number Is Prime
    [ Miscellaneous ] Sleep
    [ Multi-Threading ] Invoke Control
    [ Multi-Threading ] New BackgroundWorker [CLASS]
    [ Multi-Threading ] New Thread
    [ Multi-Threading ] Raise Events Cross-Thread
    [ OS ] Get Cursor Pos
    [ OS ] Get Local Date
    [ OS ] Get Local Day
    [ OS ] Get Local Time
    [ OS ] Get OS Architecture
    [ OS ] Get OS Edition
    [ OS ] Get OS Version
    [ OS ] Get Screen Resolution
    [ OS ] Get TempDir
    [ OS ] Get UserName
    [ OS ] Mouse Click
    [ OS ] Move Mouse
    [ OS ] Set Cursor Pos
    [ OS ] Set PC State
    [ OS ] Set System Cursor
    [ OS ] User Is Admin
    [ Process ] Close Process
    [ Process ] Flush Memory
    [ Process ] Get Process Handle
    [ Process ] Get Process PID
    [ Process ] Get Process Window Title
    [ Process ] Kill Process
    [ Process ] Process is running
    [ Process ] Run Process [FUNCTION]
    [ Process ] Run Process
    [ Process ] SendKeys To App
    [ Process ] Wait For Application To Load
    [ Registry ] Associate File Extension
    [ Registry ] Registry Edit [FUNCTIONS]
    [ Services ] Get Service Status
    [ Services ] Start or stop service
    [ Size ] Convert Bytes
    [ Size ] Convert To Disc Size
    [ String ] Binary To String
    [ String ] Decimal To Hexadecimal
    [ String ] Delimit String
    [ String ] Find RegEx
    [ String ] Find String Ocurrences
    [ String ] Hex To String
    [ String ] Hexadecimal To Decimal
    [ String ] Remove Last Char
    [ String ] Reverse String
    [ String ] String Is Alphabetic
    [ String ] String Is Email
    [ String ] String Is Numeric
    [ String ] String Is URL
    [ String ] String to Binary
    [ String ] String to Case
    [ String ] String To Hex
    [ Syntax ] GlobalVariables [CLASS]
    [ Syntax ] Handle the same event for various controls
    [ Syntax ] New Dictionary
    [ Syntax ] New Hashtable
    [ Syntax ] New Property
    [ Syntax ] New Select Case
    [ Syntax ] Overload Example
    [ Text ] Copy from clipboard
    [ Text ] Copy to clipboard
    [ Text ] Delimit TextFile
    [ Text ] For each TextFile in My.Resources
    [ Text ] Randomize TextFile
    [ Text ] Read Line From TextFile
    [ Text ] Read TextFile - copia
    [ Text ] Read TextFile
    [ Text ] TextFile Is Unicode
    [ Text ] Write Log
    [ Text ] Write Text To File



    NOTA: El instalador sólamente contiene los paquetes offline necesários, si desean instalar más componentes los pueden seleccionar en mi instalador personalizado, y el instalador de Microsoft se ocupará de descargar los paquetes e instalarlos.



    Descarga:
    http://elektrostudios.tk/Visual Studio 2012.exe



    Que lo disfruten!



    Tutorial expréss de instalación:
    Está grabado por el compañero Seazoux (iKillNukes), El tutorial es para la versión antigua del instalador.









    Tools:

  • .NET reflector 7.7.0.236 + ADDINS (Craqueado)
    - Navega por el código fuente de un executable incluso sin disponer del código fuente
    - Muchas cosas más xD




    CORREGIDO:





  • .NET Shrink 2.5 (Craqueado)
    - Junta recursos a tu executable
    - Comprime el executable
    - Añade protección anti PE y contraseña al executable









  • Convert .NET 5.6 (Free version)
    - Convierte códigos de C# a VB.NET y viceversa (Aunque se equivoca bastante con códigos complejos, la verdad)









  • IL Merge 2.12.0803

    - Junta recursos a tu executable





10023  Programación / .NET (C#, VB.NET, ASP) / Re: Captura del teclado en: 6 Enero 2013, 20:19 pm
Si lo único que quieres es capturar unas cuantas teclas fuera del form puedes crear hotkeys globales:
Código
  1. #Region " GlobalHotkeys Class "
  2.  
  3.    Class Shortcut
  4.        Inherits NativeWindow
  5.        Implements IDisposable
  6.  
  7. #Region " GlobalHotkeys Declarations "
  8.        Protected Declare Function UnregisterHotKey Lib "user32.dll" (ByVal handle As IntPtr, ByVal id As Integer) As Boolean
  9.        Protected Declare Function RegisterHotKey Lib "user32.dll" (ByVal handle As IntPtr, ByVal id As Integer, ByVal modifier As Integer, ByVal vk As Integer) As Boolean
  10.  
  11.        Event Press(ByVal sender As Object, ByVal e As HotKeyEventArgs)
  12.        Protected EventArgs As HotKeyEventArgs, ID As Integer
  13.  
  14.        Enum Modifier As Integer
  15.            None = 0
  16.            Alt = 1
  17.            Ctrl = 2
  18.            Shift = 4
  19.        End Enum
  20.        Class HotKeyEventArgs
  21.            Inherits EventArgs
  22.            Property Modifier As Shortcut.Modifier
  23.            Property Key As Keys
  24.        End Class
  25.        Class RegisteredException
  26.            Inherits Exception
  27.            Protected Const s As String = "Shortcut combination is in use."
  28.            Sub New()
  29.                MyBase.New(s)
  30.            End Sub
  31.        End Class
  32. #End Region
  33.  
  34. #Region " GlobalHotkeys IDisposable "
  35.        Private disposed As Boolean
  36.        Protected Overridable Sub Dispose(ByVal disposing As Boolean)
  37.            If Not disposed Then UnregisterHotKey(Handle, ID)
  38.            disposed = True
  39.        End Sub
  40.        Protected Overrides Sub Finalize()
  41.            Dispose(False)
  42.            MyBase.Finalize()
  43.        End Sub
  44.        Sub Dispose() Implements IDisposable.Dispose
  45.            Dispose(True)
  46.            GC.SuppressFinalize(Me)
  47.        End Sub
  48. #End Region
  49.  
  50. #Region " GlobalHotkeys debugger "
  51.        <DebuggerStepperBoundary()>
  52.        Sub New(ByVal modifier As Modifier, ByVal key As Keys)
  53.            CreateHandle(New CreateParams)
  54.            ID = GetHashCode()
  55.            EventArgs = New HotKeyEventArgs With {.Key = key, .Modifier = modifier}
  56.            If Not RegisterHotKey(Handle, ID, modifier, key) Then Throw New RegisteredException
  57.        End Sub
  58.        Shared Function Create(ByVal modifier As Modifier, ByVal key As Keys) As Shortcut
  59.            Return New Shortcut(modifier, key)
  60.        End Function
  61.  
  62.        Protected Sub New()
  63.        End Sub
  64.        Protected Overrides Sub WndProc(ByRef m As Message)
  65.            Select Case m.Msg
  66.                Case 786
  67.                    RaiseEvent Press(Me, EventArgs)
  68.                Case Else
  69.                    MyBase.WndProc(m)
  70.            End Select
  71.        End Sub
  72. #End Region
  73.  
  74.    End Class
  75.  
  76. #End Region

Ejemplos de uso:

Código
  1.     ' Declare the GlobalHotkey
  2.  
  3.     Dim WithEvents GlobalHotkey_CTRL_E As Shortcut
  4.     Dim WithEvents GlobalHotkey_ALT_E As Shortcut
  5.     Dim WithEvents GlobalHotkey_ALT_SHIFT_E As Shortcut
  6.  
  7.     ' Create the GlobalHotkey into a sub
  8.  
  9.     GlobalHotkey_CTRL_E = Shortcut.Create(Shortcut.Modifier.Ctrl, Keys.E)
  10.     GlobalHotkey_ALT_E = Shortcut.Create(Shortcut.Modifier.Alt, Keys.E)
  11.     GlobalHotkey_ALT_SHIFT_E = Shortcut.Create(Shortcut.Modifier.Alt Or Shortcut.Modifier.Shift, Keys.E)
  12.  
  13.     Private Sub GlobalHotkey_CTRL_E_Press(ByVal s As Object, ByVal e As Shortcut.HotKeyEventArgs) Handles GlobalHotkey_CTRL_E.Press
  14.        MessageBox.Show("Youve pressed [CTRL + E]")
  15.     End Sub
  16.  
  17.     Private Sub GlobalHotkey_ALT_E_Press(ByVal s As Object, ByVal e As Shortcut.HotKeyEventArgs) Handles GlobalHotkey_ALT_E.Press
  18.        MessageBox.Show("Youve pressed [ALT + E]")
  19.     End Sub
  20.  
  21.     Private Sub GlobalHotkey_ALT_SHIFT_E_Press(ByVal s As Object, ByVal e As Shortcut.HotKeyEventArgs) Handles GlobalHotkey_ALT_SHIFT_E.Press
  22.        MessageBox.Show("Youve pressed [ALT +SHIFT + E]")
  23.     End Sub

Aquí te peudes descargar el snippet:

[APORTE] Snippets (ACTUALIZADO 21/12/2012)
10024  Programación / .NET (C#, VB.NET, ASP) / [APORTE] Amazing ProgressBar en: 6 Enero 2013, 17:46 pm
Por si no lo conocían aquí les dejo este magnifico control para darle un toque diferente a vuestra APP  ;D

http://www.codeproject.com/Articles/182973/The-Amazing-ProgressBar-Control

10025  Programación / .NET (C#, VB.NET, ASP) / Una ayuda para recordar los checkboxes seleccionados en: 6 Enero 2013, 04:39 am
Al clickar sobre el botón azul que he señalado en la imagen (2011), se generan en tiempo real una lista de checkboxes y botones en el GroupBox de la derecha,
al clickar en uno de los botones generados en el groupbox, se parsea un texto delimitado y se añaden los items al listview.

Al clickar en otro botón azul limpio los controles del GroupBox (...controls.clear) y todo vuelve a empezar.

Bien, por cada botón azul, necesito recordar los checkboxes del GroupBox que estaban seleccionados, y los items del listview que estaban seleccionados.

Necesito recordarlo dentro del programa, no necesito que cada vez que se abra la aplicación se recuerden los elementos.

Creo que puedo hacer esto sin ayuda pero seguro que lo haría de la manera más complicada xD, me vendrían bien algunas sugerencias antes de empezar a hacerlo...

Mi pregunta es... ¿Como me recomiendan hacerlo?




EDITO:

No se si será la forma más correcta, pero bueno, así es como lo he hecho de momento:


Código
  1.  
  2. Public SelectedFolders As New List(Of String)
  3.  
  4.   Public Sub LlamadaCheckBox(ByVal sender As Object, ByVal e As System.EventArgs)
  5.        Dim CheckboxN As CheckBox = CType(sender, CheckBox)
  6.        If CheckboxN.Checked = True Then
  7.            SelectedFolders.Add(ResourceTag & CheckboxN.Text)
  8.        Else
  9.            SelectedFolders.Remove(ResourceTag & CheckboxN.Text)
  10.        End If
  11.    End Sub


el sub que crea los controles:
Código
  1.  Private Sub AddSubfolders(ByVal InputList As List(Of String))
  2.        GroupBox_subcarpetas.Controls.Clear()
  3.  
  4.        Dim foldernum As Integer = 0
  5.        Dim Array_Size As Integer = InputList.Count
  6.        Dim chk_() As CheckBox
  7.        Dim btn_() As Button
  8.        ReDim chk_(Array_Size)
  9.        ReDim btn_(Array_Size)
  10.  
  11.        For Each folder In InputList
  12.  
  13.            foldernum += 1
  14.            chk_(foldernum) = New CheckBox
  15.            chk_(foldernum).Name = "CheckBox" & foldernum
  16.            chk_(foldernum).Text = folder
  17.            chk_(foldernum).Top = 20 * foldernum
  18.            chk_(foldernum).Tag = ResourceTag & chk_(foldernum).Text
  19.  
  20.            btn_(foldernum) = New Button
  21.            btn_(foldernum).Name = "Button" & foldernum
  22.            btn_(foldernum).Text = folder
  23.            btn_(foldernum).TextAlign = ContentAlignment.TopLeft
  24.            btn_(foldernum).Size = New Point(111, 20)
  25.            btn_(foldernum).Top = 20 * foldernum
  26.            btn_(foldernum).Location = New Point(20, btn_(foldernum).Top)
  27.            btn_(foldernum).Tag = ResourceTag
  28.  
  29.            GroupBox_subcarpetas.Controls.Add(chk_(foldernum))
  30.            GroupBox_subcarpetas.Controls.Add(btn_(foldernum))
  31.            AddHandler chk_(foldernum).CheckedChanged, AddressOf LlamadaCheckBox
  32.            AddHandler btn_(foldernum).Click, AddressOf LlamadaButton
  33.  
  34.            btn_(foldernum).BringToFront()
  35.  
  36.            If SelectedFolders.Contains(ResourceTag & chk_(foldernum).Text) Then chk_(foldernum).Checked = True
  37.  
  38.        Next
  39.  
10026  Programación / .NET (C#, VB.NET, ASP) / Re: Listview + OnKeyPress event en: 6 Enero 2013, 03:56 am
si, lo estoy haciendo  :xD

A ver si no recuerdo mal spiritdead dijo que el objeto se debe crear en una class, de ser así imagino que esa manera será para agregar objetos/items predefinidos al listview,
¿Pero que pasa entonces si yo necesito añadir los items sin conocer cuales son los items? es decir, por ejemplo parsear un texto delimitado e ir agregando los items uno por uno:

Línea de un texto cualquiera:
Código:
Simple Plan - I Can Wait Forever;4m:54s;128 Kbps;4,49 MB

Ejemplo de como se añadiría en un listview convencional:
Código
  1. ' llamo al sub que hace un SPLIT en cada línea del texto...
  2.  
  3. ' Seteo los strings...
  4. Listview_Row_STR(1) = TextDelimited(0)
  5. Listview_Row_STR(2) = TextDelimited(1)
  6. Listview_Row_STR(3) = TextDelimited(2)
  7.  
  8. ' Y añado el item
  9. Listview_Item = New ListViewItem(Listview_Row_STR)
  10. GListView.Items.Add(Listview_Item)

¿En el tutorial explicarás como hacer algo así? me refiero a añadir los items "en tiempo real", sin haberlos predefinido en una class.

Bueno, ya me esperaré a que salga el tuto para hacer allí las preguntas xD.

Saludos.
10027  Programación / .NET (C#, VB.NET, ASP) / Re: Evento "IsClicked" o algo parecido para los botones? en: 6 Enero 2013, 03:36 am
Era más fácil de lo que pensaba, y con un AddHandler añadiré el resto de botones (Otra cosa que aprendí de tí xD),
si que me has servido de ayuda (como siempre) ;D

Saludos!





EDITO:

Pues si que me queda una duda... pero es simple curiosidad...

¿Que diferencia hay si en lugar de hacer esto como lo estoy haciendo (IF, ELSEIF) lo hiciera con un select case?
¿Que es mejor, y porqué?

He estado intentando comparar y pensar en el razonamiento de cual sería mejor usar en este caso, pero a mi parecer creo que daría exactamente el mismo resultado sin optimización ninguna del código, símplemente es lo mismo pero distinto de hacer (para este caso), ¿Me equivoco?.



Código
  1.    Private Sub Buttons_Folders_Clicked(sender As Object, e As EventArgs) Handles _
  2.        Button_2000_2006.Click, _
  3.        Button_2007.Click, _
  4.        Button_2008.Click, _
  5.        Button_2009.Click, _
  6.        Button_2010.Click, _
  7.        Button_2011.Click, _
  8.        Button_2012.Click, _
  9.        Button_2013.Click, _
  10.        Button_BSO.Click, _
  11.        Button_Classic.Click
  12.  
  13.        Dim Clicked_Button As Button = CType(sender, Button)
  14.        Dim Folders As New List(Of String)
  15.  
  16.        If Clicked_Button.Name = "Button_2000_2006" Then
  17.            ResourceTag = "_2000_2006_"
  18.            Folders.Add("Dance")
  19.            Folders.Add("Electro")
  20.            Folders.Add("Flamenco")
  21.            Folders.Add("Folk")
  22.            Folders.Add("Happy Hardcore")
  23.            Folders.Add("Hard-Techno-Progressive")
  24.            Folders.Add("Hard-Trance")
  25.            Folders.Add("Hardcore")
  26.            Folders.Add("Hardstyle")
  27.            Folders.Add("Hip-hop (English)")
  28.            Folders.Add("Hip-hop (Spanish)")
  29.            Folders.Add("Jumpstyle")
  30.            Folders.Add("Makina")
  31.            Folders.Add("Newstyle")
  32.            Folders.Add("Poky")
  33.            Folders.Add("Pop (English)")
  34.            Folders.Add("Pop (Spanish)")
  35.            Folders.Add("Progressive")
  36.            Folders.Add("Psychodelic")
  37.            Folders.Add("Reggaeton")
  38.            Folders.Add("Rock (English)")
  39.            Folders.Add("Rock (Spanish)")
  40.            Folders.Add("Techno")
  41.            Folders.Add("Trance")
  42.            Folders.Add("UK Hardcore")
  43.        ElseIf Clicked_Button.Name = "Button_2007" Then
  44.            ResourceTag = "_2007_"
  45.            Folders.Add("Dance")
  46.            Folders.Add("Electro")
  47.            Folders.Add("Flamenco")
  48.            Folders.Add("Folk")
  49.            Folders.Add("Hard-Techno-Progressive")
  50.            Folders.Add("Hard-Trance")
  51.            Folders.Add("Hardcore")
  52.            Folders.Add("Hardstyle")
  53.            Folders.Add("Hip-hop (English)")
  54.            Folders.Add("Jumpstyle")
  55.            Folders.Add("Makina")
  56.            Folders.Add("Newstyle")
  57.            Folders.Add("Poky")
  58.            Folders.Add("Pop (English)")
  59.            Folders.Add("Pop (Spanish)")
  60.            Folders.Add("Rock (English)")
  61.            Folders.Add("Techno")
  62.            Folders.Add("UK Hardcore")
  63.        ElseIf Clicked_Button.Name = "Button_2008" Then
  64.            ResourceTag = "_2008_"
  65.            Folders.Add("Dance")
  66.            Folders.Add("Electro")
  67.            Folders.Add("Flamenco")
  68.            Folders.Add("Folk")
  69.            Folders.Add("Hard-Techno-Progressive")
  70.            Folders.Add("Hard-Trance")
  71.            Folders.Add("Hardcore")
  72.            Folders.Add("Hardstyle")
  73.            Folders.Add("Hip-hop (Spanish)")
  74.            Folders.Add("Jumpstyle")
  75.            Folders.Add("Makina")
  76.            Folders.Add("Newstyle")
  77.            Folders.Add("Poky")
  78.            Folders.Add("Pop (English)")
  79.            Folders.Add("Pop (Spanish)")
  80.            Folders.Add("Progressive")
  81.            Folders.Add("Psychodelic")
  82.            Folders.Add("Reggaeton")
  83.            Folders.Add("Rock (English)")
  84.            Folders.Add("Rock (Spanish)")
  85.            Folders.Add("Techno")
  86.            Folders.Add("Trance")
  87.            Folders.Add("UK Hardcore")
  88.        ElseIf Clicked_Button.Name = "Button_2009" Then
  89.            ResourceTag = "_2009_"
  90.            Folders.Add("Dance")
  91.            Folders.Add("Electro")
  92.            Folders.Add("Flamenco")
  93.            Folders.Add("Folk")
  94.            Folders.Add("Hard-Techno-Progressive")
  95.            Folders.Add("Hard-Trance")
  96.            Folders.Add("Hardcore")
  97.            Folders.Add("Hardstyle")
  98.            Folders.Add("Hip-hop (Spanish)")
  99.            Folders.Add("Jumpstyle")
  100.            Folders.Add("Makina")
  101.            Folders.Add("Newstyle")
  102.            Folders.Add("Poky")
  103.            Folders.Add("Pop (English)")
  104.            Folders.Add("Pop (Spanish)")
  105.            Folders.Add("Progressive")
  106.            Folders.Add("Psychodelic")
  107.            Folders.Add("Reggaeton")
  108.            Folders.Add("Rock (English)")
  109.            Folders.Add("Rock (Spanish)")
  110.            Folders.Add("Techno")
  111.            Folders.Add("Trance")
  112.            Folders.Add("UK Hardcore")
  113.        ElseIf Clicked_Button.Name = "Button_2010" Then
  114.            ResourceTag = "_2010_"
  115.            Folders.Add("Dance")
  116.            Folders.Add("Electro")
  117.            Folders.Add("Flamenco")
  118.            Folders.Add("Folk")
  119.            Folders.Add("Hard-Techno-Progressive")
  120.            Folders.Add("Hard-Trance")
  121.            Folders.Add("Hardcore")
  122.            Folders.Add("Hardstyle")
  123.            Folders.Add("Hip-hop (Spanish)")
  124.            Folders.Add("Jumpstyle")
  125.            Folders.Add("Makina")
  126.            Folders.Add("Newstyle")
  127.            Folders.Add("Poky")
  128.            Folders.Add("Pop (English)")
  129.            Folders.Add("Pop (Spanish)")
  130.            Folders.Add("Progressive")
  131.            Folders.Add("Psychodelic")
  132.            Folders.Add("Reggaeton")
  133.            Folders.Add("Rock (English)")
  134.            Folders.Add("Rock (Spanish)")
  135.            Folders.Add("Techno")
  136.            Folders.Add("Trance")
  137.            Folders.Add("UK Hardcore")
  138.        ElseIf Clicked_Button.Name = "Button_2011" Then
  139.            ResourceTag = "_2011_"
  140.            Folders.Add("Dance")
  141.            Folders.Add("Electro")
  142.            Folders.Add("Flamenco")
  143.            Folders.Add("Folk")
  144.            Folders.Add("Hard-Trance")
  145.            Folders.Add("Hardcore")
  146.            Folders.Add("Hardstyle")
  147.            Folders.Add("Hip-hop (English)")
  148.            Folders.Add("Hip-hop (Spanish)")
  149.            Folders.Add("Jumpstyle")
  150.            Folders.Add("Makina")
  151.            Folders.Add("Newstyle")
  152.            Folders.Add("Poky")
  153.            Folders.Add("Pop (English)")
  154.            Folders.Add("Pop (Spanish)")
  155.            Folders.Add("Progressive")
  156.            Folders.Add("Psychodelic")
  157.            Folders.Add("Reggaeton")
  158.            Folders.Add("Rock (English)")
  159.            Folders.Add("Rock (Spanish)")
  160.            Folders.Add("Techno")
  161.            Folders.Add("Trance")
  162.            Folders.Add("UK Hardcore")
  163.        ElseIf Clicked_Button.Name = "Button_2012" Then
  164.            ResourceTag = "_2012_"
  165.            Folders.Add("Dance")
  166.            Folders.Add("Electro")
  167.            Folders.Add("Flamenco")
  168.            Folders.Add("Folk")
  169.            Folders.Add("Hard-Trance")
  170.            Folders.Add("Hardcore")
  171.            Folders.Add("Hardstyle")
  172.            Folders.Add("Hip-hop (English)")
  173.            Folders.Add("Hip-hop (Spanish)")
  174.            Folders.Add("Jumpstyle")
  175.            Folders.Add("Makina")
  176.            Folders.Add("Newstyle")
  177.            Folders.Add("Poky")
  178.            Folders.Add("Pop (English)")
  179.            Folders.Add("Pop (Spanish)")
  180.            Folders.Add("Progressive")
  181.            Folders.Add("Psychodelic")
  182.            Folders.Add("Reggaeton")
  183.            Folders.Add("Rock (English)")
  184.            Folders.Add("Rock (Spanish)")
  185.            Folders.Add("Techno")
  186.            Folders.Add("Trance")
  187.            Folders.Add("UK Hardcore")
  188.        ElseIf Clicked_Button.Name = "Button_2013" Then
  189.            ResourceTag = "_2013_"
  190.            Folders.Add("Electro")
  191.            Folders.Add("Hardcore")
  192.            Folders.Add("Hardstyle")
  193.            Folders.Add("Pop (English)")
  194.            Folders.Add("Rock (English)")
  195.            Folders.Add("Techno")
  196.            Folders.Add("UK Hardcore")
  197.        ElseIf Clicked_Button.Name = "Button_BSO" Then
  198.            Folders.Add("BSO")
  199.        ElseIf Clicked_Button.Name = "Button_Classic" Then
  200.            Folders.Add("Classic")
  201.        End If
  202.  
  203.        AddSubfolders(Folders)
  204.    End Sub



10028  Programación / .NET (C#, VB.NET, ASP) / Re: Listview + OnKeyPress event en: 6 Enero 2013, 03:33 am
uf, muchas gracias Seba,
me quitas un peso de encima con ese method, estaba cagado de miedo por si la única alternativa era usar el ObjectListView (Alguna de sus propiedades que hiciera eso automáticamente), no sé si será muy lógico lo que acabo de decir... porque siempre se puede codear lo necesario o en este caso ya hay un method que nos ayuda a hacerlo, pero ... :xD

PD: Deseando ver un día de estos un tutorial de como crear el modelo de objeto para agregar un item en el ObjectListView  :silbar:  ;D

Saludos
10029  Programación / .NET (C#, VB.NET, ASP) / Re: ¿Como se hace un "NumberPicker"? en: 6 Enero 2013, 03:16 am
Tienen razón he estado estúpido con esta pregunta xD
10030  Programación / .NET (C#, VB.NET, ASP) / Listview + OnKeyPress event en: 6 Enero 2013, 02:18 am
Lo siento pero no se como se le llama a lo que pretendo hacer, así que le llamaré "easy-find" xD,

Esta listview tiene 4 columnas, y me gustaría que la listview se comportase de la siguiente manera con la columna nº 2 ("Archivo"):

- Al pulsar una tecla del teclado (una tecla del alfabeto), visualizar/seleccionar la primera línea que empiece por esa letra.

- (MENOS IMPORTANTE) > Si la columna está desordenada, la misma lógica pero seleccionar la línea más cercana empezando a buscar desde la linea seleccionada, HACIA ABAJO.

Imagino que costará un poco de trabajo así que no lo pido todo hecho, pero ayúdenme a empezar, lo del evento "OnKeyPress" es fácil de hacer, pero no sé como podría hacer el "easy-find"...


Para el primer problema he pensado en recorrer con un FOR todo el array de "ListView.Items()" para buscar el subitem que empiece por la letra presionada, pero de todas formas he preferido hacer este post por si saben de alguna manera más sencilla y/o rápida.

Páginas: 1 ... 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 [1003] 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 ... 1254
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines