|
Páginas: 1 2 3 4 5 6 7 8 9 [ 10]
91
en: 20 Abril 2024, 10:08 am
|
Iniciado por balordo - Último mensaje por Mr.Byte
|
Si tienes vinculado tu Android TVBOX con tu cuenta de Google. Desde un navegador web de windows 10, accede a https://play.google.comIngresa a tu cuenta Google, busca la aplicacion que quieres instalar, al instalar te preguntara en donde quieres instalar, indica a tu TVBOX. Si no es compatible no lo vas a poder instalar (aparece en gris). Otra opcion seria instalar AnyDesk Remote Destop, tanto en windows 10 como en la TVbox(en mi caso es compatible)
|
92
en: 20 Abril 2024, 09:56 am
|
Iniciado por Tachikomaia - Último mensaje por Tachikomaia
|
Muy bueno. No tenía idea, verdad, lo más parecido era haber usado DOS pero ahí sólo se abren exes o se ponía dir, etc, nunca había visto que un programa se use de ahí sin interfase. En mi caso si entendí bien la 1era vez tardó 1 minuto y 16 segundos, probando 157 C/s. Con incremental 1 segundo probando 53.66 C/s. No me deja expandir hacia los costados la pantalla del cmd y no puedo ver el texto que está en líneas muy largas. A ver que algo falló: - Puse mi archivo en run. - Puse rar2john archivo.rar > rar.hashes Me aparecieron los nombres de las cosas que no puedo extraer. - Luego... ¿Será porque puse 4 y 4? Es para ir descartando, así la próxima inicio desde 5 ¿no es buena idea?
|
93
en: 20 Abril 2024, 01:14 am
|
Iniciado por schoolcyberuser - Último mensaje por EdePC
|
Estás escribiendo los comandos o los estás copiando y pegando? porque ese –p 1700 no es lo mismo que un -p 1700, doy por echo de que pasó lo mismo con con el -D, si copias y pegas de un Word o PDF pueden tener su propio formato o caracteres similares pero no iguales, como esos guiones, las comillas, etc
|
94
en: 19 Abril 2024, 20:27 pm
|
Iniciado por balordo - Último mensaje por Songoku
|
Para instalar APKs no necesitas ni win10 ni ningún S.O, solo mete dichas APKs en un pendrive y conectalo al TV Box e instalalas desde allí. Saludos...
Songoku
|
95
en: 19 Abril 2024, 19:59 pm
|
Iniciado por balordo - Último mensaje por balordo
|
buenas tardes, alguien sabe como puedo conectar un android tvbox a windows 10 y que el pc lo reconozca y poder agregar o quitar apks desde el mismo windows ??
muchas gracias de antemano...saludos
|
96
en: 19 Abril 2024, 19:36 pm
|
Iniciado por schoolcyberuser - Último mensaje por schoolcyberuser
|
Gracias por el anterior apunte para solucionar. El caso es que me paso algo raro que al escribir comando con -D no ejecutaba, por eso intenté de todo (con -d, etc). De repente el -D cambió de color en una prueba a azul y ahí funcionó.
Ahora me encuetro con otro problema estoy intentando volcar lo indicado en la zona 1700 pero cuando ejecuto no solo busca ahí sino en el resto de procesos también con lo cual se llena la memoria de disco con el volcado y no consigo volcar el contenido del 1700 que es lo referente a Acrobat reader
Este es el enunciado He mirado el comando memdump -p y en principio debería de centrarse solo en esa referencia, no lo hace
Este es el enunciado: El fichero objetivo fue abierto con Acrobat Reader, por lo que se tendrá que realizar un volcado de dicho proceso. Versión 2.6 # volatility --f “/path/to/file” --profile=Win7SP1x64 memdump –p 1700 –D “/path/to/dir” Versión 3.0 # vol --f “/path/to/file” –o “/path/to/dir” windows.memmap –dump –pid <PID> Una vez se haya terminado de generar el fichero, extraeremos la información mediante el programa Foremost.
Está es mi ejecución: (usuario㉿kali)-[~/Downloads/memoriaforenseok/02-Descargables] └─$ volatility -f dump.mem --profile=Win7SP1x64 memdump –p 1700 -D /home/usuario/Desktop Volatility Foundation Volatility Framework 2.6 ************************************************************************ Writing System [ 4] to 4.dmp ************************************************************************ Writing smss.exe [ 260] to 260.dmp ************************************************************************ Writing csrss.exe [ 344] to 344.dmp ...//muchas líneas . ... ...
Writing chrome.exe [ 2872] to 2872.dmp Traceback (most recent call last): File "vol.py", line 192, in <module> File "vol.py", line 183, in main File "volatility/commands.py", line 147, in execute File "volatility/plugins/taskmods.py", line 378, in render_text IOError: [Errno 28] No space left on device Failed to execute script vol
¿Alguna idea? He ampliado capacidad de disco, pero no es suficiente ...
en principio debería ir directamente a por el 1700 y volcarlo,
|
97
en: 19 Abril 2024, 18:48 pm
|
Iniciado por Eleкtro - Último mensaje por Eleкtro
|
El siguiente código es un módulo por nombre ' Wildcard' que representa un algoritmo de coincidencia de cadenas con uso de comodines * ( wildcards). Sirve como alternativa al operador Like de VB.NET. Ejemplo de uso: Dim input As String = "Hello World!" Dim pattern As String = "*e*l*o *!" Console.WriteLine($"{NameOf(Wildcard.IsMatch)} {Wildcard.IsMatch(input, pattern)}")
El código lo he extraído del código fuente de la aplicación "RomyView" escrita en C#: Lo he convertido a VB.NET de forma automática, y lo comparto tal cual, sin modificaciones ni adiciones. Lo he probado con varias cadenas y combinaciones de patrones de comodines, y parece funcionar a la perfección. Wildcard.vb''' <summary>The IsMatch function below was downloaded from: ''' <a href="https://www.c-sharpcorner.com/uploadfile/b81385/efficient-string-matching-algorithm-with-use-of-wildcard-characters/"> ''' Efficient String Matching Algorithm with Use of Wildcard Characters</a></summary> Public Module Wildcard ''' <summary>Tests whether specified string can be matched against provided pattern string, where ''' the pattern string may contain wildcards as follows: ? to replace any single character, and * ''' to replace any string.</summary> ''' <param name="input">String which is matched against the pattern.</param> ''' <param name="pattern">Pattern against which string is matched.</param> ''' <returns>true if <paramref name="pattern"/> matches the string <paramref name="input"/>; otherwise false.</returns> Public Function IsMatch(input As String, pattern As String) As Boolean Return IsMatch(input, pattern, "?"c, "*"c) End Function ''' <summary>Tests whether specified string can be matched against provided pattern string. ''' Pattern may contain single- and multiple-replacing wildcard characters.</summary> ''' <param name="input">String which is matched against the pattern.</param> ''' <param name="pattern">Pattern against which string is matched.</param> ''' <param name="singleWildcard">Character which can be used to replace any single character in input string.</param> ''' <param name="multipleWildcard">Character which can be used to replace zero or more characters in input string.</param> ''' <returns>true if <paramref name="pattern"/> matches the string <paramref name="input"/>; otherwise false.</returns> Public Function IsMatch(input As String, pattern As String, singleWildcard As Char, multipleWildcard As Char) As Boolean Dim inputPosStack(((input.Length + 1) * (pattern.Length + 1)) - 1) As Integer ' Stack containing input positions that should be tested for further matching Dim patternPosStack(inputPosStack.Length - 1) As Integer ' Stack containing pattern positions that should be tested for further matching Dim stackPos As Integer = -1 ' Points to last occupied entry in stack; -1 indicates that stack is empty Dim pointTested()() As Boolean = { New Boolean(input.Length) {}, New Boolean(pattern.Length) {} } Dim inputPos As Integer = 0 ' Position in input matched up to the first multiple wildcard in pattern Dim patternPos As Integer = 0 ' Position in pattern matched up to the first multiple wildcard in pattern ' Match beginning of the string until first multiple wildcard in pattern Do While inputPos < input.Length AndAlso patternPos < pattern.Length AndAlso pattern.Chars(patternPos) <> multipleWildcard AndAlso (input.Chars(inputPos) = pattern.Chars(patternPos) OrElse pattern.Chars(patternPos) = singleWildcard) inputPos += 1 patternPos += 1 Loop ' Push this position to stack if it points to end of pattern or to a general wildcard If patternPos = pattern.Length OrElse pattern.Chars(patternPos) = multipleWildcard Then pointTested(0)(inputPos) = True pointTested(1)(patternPos) = True stackPos += 1 inputPosStack(stackPos) = inputPos patternPosStack(stackPos) = patternPos End If Dim matched As Boolean = False ' Repeat matching until either string is matched against the pattern or no more parts remain on stack to test Do While stackPos >= 0 AndAlso Not matched inputPos = inputPosStack(stackPos) ' Pop input and pattern positions from stack patternPos = patternPosStack(stackPos) ' Matching will succeed if rest of the input string matches rest of the pattern stackPos -= 1 If inputPos = input.Length AndAlso patternPos = pattern.Length Then matched = True ' Reached end of both pattern and input string, hence matching is successful Else ' First character in next pattern block is guaranteed to be multiple wildcard ' So skip it and search for all matches in value string until next multiple wildcard character is reached in pattern For curInputStart As Integer = inputPos To input.Length - 1 Dim curInputPos As Integer = curInputStart Dim curPatternPos As Integer = patternPos + 1 If curPatternPos = pattern.Length Then ' Pattern ends with multiple wildcard, hence rest of the input string is matched with that character curInputPos = input.Length Else Do While curInputPos < input.Length AndAlso curPatternPos < pattern.Length AndAlso pattern.Chars(curPatternPos) <> multipleWildcard AndAlso (input.Chars(curInputPos) = pattern.Chars(curPatternPos) OrElse pattern.Chars(curPatternPos) = singleWildcard) curInputPos += 1 curPatternPos += 1 Loop End If ' If we have reached next multiple wildcard character in pattern without breaking the matching sequence, then we have another candidate for full match ' This candidate should be pushed to stack for further processing ' At the same time, pair (input position, pattern position) will be marked as tested, so that it will not be pushed to stack later again If ((curPatternPos = pattern.Length AndAlso curInputPos = input.Length) OrElse (curPatternPos < pattern.Length AndAlso pattern.Chars(curPatternPos) = multipleWildcard)) AndAlso Not pointTested(0)(curInputPos) AndAlso Not pointTested(1)(curPatternPos) Then pointTested(0)(curInputPos) = True pointTested(1)(curPatternPos) = True stackPos += 1 inputPosStack(stackPos) = curInputPos patternPosStack(stackPos) = curPatternPos End If Next curInputStart End If Loop Return matched End Function End Module
|
98
en: 19 Abril 2024, 18:37 pm
|
Iniciado por Eleкtro - Último mensaje por Eleкtro
|
El siguiente código es un ejemplo oficial de Microsoft que sirve para modificar el fondo de pantalla (wallpaper) del escritorio. El código está escrito originalmente en C#, lo he convertido a VB.NET, pero no lo he refactorizado, lo comparto tal cual. Modo de empleo: Dim supportJpgAsWallpaper As Boolean = Wallpaper.SupportJpgAsWallpaper Dim supportFitFillWallpaperStyles As Boolean = Wallpaper.SupportFitFillWallpaperStyles Debug. WriteLine($ "{NameOf(supportJpgAsWallpaper)}: {supportJpgAsWallpaper}") Debug. WriteLine($ "{NameOf(supportFitFillWallpaperStyles)}: {supportFitFillWallpaperStyles}") ' If supportJpgAsWallpaper AndAlso supportFitFillWallpaperStyles Then Wallpaper.SetDesktopWallpaper("C:\wallpaper.jpg", WallpaperStyle.Fill) ' Else ' ... ' End If
Wallpaper.vbImports Microsoft.Win32 Imports System.ComponentModel Imports System.Drawing Imports System.Drawing.Imaging Imports System.IO Imports System.Runtime.InteropServices '''********************************* Module Header ***********************************\ '''Module Name: Wallpaper.cs '''Project: CSSetDesktopWallpaper '''Copyright (c) Microsoft Corporation. ''' '''The file defines a wallpaper helper class. ''' ''' Wallpaper.SetDesktopWallpaper(string fileName, WallpaperStyle style) ''' '''This is the key method that sets the desktop wallpaper. The method body is composed of '''configuring the wallpaper style in the registry and setting the wallpaper with '''SystemParametersInfo. ''' '''This source is subject to the Microsoft Public License. '''See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL. '''All other rights reserved. ''' '''THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER '''EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF '''MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. '''\************************************************************************************ Public Module Wallpaper ''' <summary> ''' Determine if the fit and fill wallpaper styles are supported in ''' the current operating system. The styles are not supported before ''' Windows 7. ''' </summary> Public ReadOnly Property SupportFitFillWallpaperStyles As Boolean Get Return (Environment.OSVersion.Version >= New Version(6, 1)) End Get End Property ''' <summary> ''' Determine if .jpg files are supported as wallpaper in the current ''' operating system. The .jpg wallpapers are not supported before ''' Windows Vista. ''' </summary> Public ReadOnly Property SupportJpgAsWallpaper As Boolean Get Return (Environment.OSVersion.Version >= New Version(6, 0)) End Get End Property ''' <summary> ''' Set the desktop wallpaper. ''' </summary> ''' <param name="fileName">Path of the wallpaper</param> ''' <param name="style">Wallpaper style</param> Public Sub SetDesktopWallpaper(path As String, style As WallpaperStyle) ' Set the wallpaper style and tile. ' Two registry values are set in the Control Panel\Desktop key. ' TileWallpaper ' 0: The wallpaper picture should not be tiled ' 1: The wallpaper picture should be tiled ' WallpaperStyle ' 0: The image is centered if TileWallpaper=0 or tiled if TileWallpaper=1 ' 2: The image is stretched to fill the screen ' 6: The image is resized to fit the screen while maintaining the aspect ' ratio. (Windows 7 and later) ' 10: The image is resized and cropped to fill the screen while ' maintaining the aspect ratio. (Windows 7 and later) Dim key As RegistryKey = Registry.CurrentUser.OpenSubKey("Control Panel\Desktop", True) Select Case style Case WallpaperStyle.Tile key.SetValue("WallpaperStyle", "0") key.SetValue("TileWallpaper", "1") Case WallpaperStyle.Center key.SetValue("WallpaperStyle", "0") key.SetValue("TileWallpaper", "0") Case WallpaperStyle.Stretch key.SetValue("WallpaperStyle", "2") key.SetValue("TileWallpaper", "0") Case WallpaperStyle.Fit ' (Windows 7 and later) key.SetValue("WallpaperStyle", "6") key.SetValue("TileWallpaper", "0") Case WallpaperStyle.Fill ' (Windows 7 and later) key.SetValue("WallpaperStyle", "10") key.SetValue("TileWallpaper", "0") End Select key.Close() ' If the specified image file is neither .bmp nor .jpg, - or - ' if the image is a .jpg file but the operating system is Windows Server ' 2003 or Windows XP/2000 that does not support .jpg as the desktop ' wallpaper, convert the image file to .bmp and save it to the ' %appdata%\Microsoft\Windows\Themes folder. Dim ext As String = System.IO.Path.GetExtension(path) If (Not ext.Equals(".bmp", StringComparison.OrdinalIgnoreCase) AndAlso Not ext.Equals(".jpg", StringComparison.OrdinalIgnoreCase)) OrElse (ext.Equals(".jpg", StringComparison.OrdinalIgnoreCase) AndAlso Not SupportJpgAsWallpaper) Then Using image As Image = System.Drawing.Image.FromFile(path) path = String.Format("{0}\Microsoft\Windows\Themes\{1}.bmp", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), System.IO.Path.GetFileNameWithoutExtension(path)) image.Save(path, ImageFormat.Bmp) End Using End If ' Set the desktop wallpapaer by calling the NativeMethods API SystemParametersInfo ' with the SPI_SETDESKWALLPAPER desktop parameter. The changes should ' persist, and also be immediately visible. If Not SafeNativeMethods.SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, path, SPIF_UPDATEINIFILE Or SPIF_SENDWININICHANGE) Then Throw New Win32Exception() End If End Sub Friend NotInheritable Class SafeNativeMethods <DllImport("user32.dll", CharSet:=CharSet.Unicode, SetLastError:=True)> Public Shared Function SystemParametersInfo(uiAction As UInteger, uiParam As UInteger, pvParam As String, fWinIni As UInteger) As <MarshalAs(UnmanagedType.Bool)> Boolean End Function End Class Private Const SPI_SETDESKWALLPAPER As UInteger = 20 Private Const SPIF_UPDATEINIFILE As UInteger = &H1 Private Const SPIF_SENDWININICHANGE As UInteger = &H2 End Module Public Enum WallpaperStyle Tile Center Stretch Fit Fill End Enum
|
99
en: 19 Abril 2024, 18:16 pm
|
Iniciado por Eleкtro - Último mensaje por Eleкtro
|
En esta ocasión comparto el código fuente de un control de tipo NumericUpDown para poder usarlo en una barra ToolStrip o StatusStrip, y también un control de tipo TrackBar con la misma finalidad. ToolStripNumericUpDown.vb' *********************************************************************** ' Author : ElektroStudios ' Modified : 19-April-2024 ' *********************************************************************** #Region " Option Statements " Option Strict On Option Explicit On Option Infer Off #End Region #Region " Imports " Imports System.ComponentModel Imports System.Drawing Imports System.Runtime.InteropServices Imports System.Windows.Forms Imports System.Windows.Forms.Design #End Region #Region " ToolStripNumericUpDown " ' ReSharper disable once CheckNamespace Namespace DevCase.UI.Components ''' <summary> ''' Represents a selectable Windows spin box <see cref="ToolStripItem"/> that displays numeric values. ''' </summary> ''' <seealso cref="ToolStripControlHost"/> < ComVisible(True), DebuggerStepThrough, DefaultEvent(NameOf(ToolStripNumericUpDown.ValueChanged)), DefaultProperty(NameOf(ToolStripNumericUpDown.Value)), DefaultBindingProperty(NameOf(ToolStripNumericUpDown.Value)), Description("Represents a selectable Windows spin box ToolStripItem that displays numeric values."), Designer("System.Windows.Forms.Design.ToolStripItemDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory(NameOf(DesignerCategoryAttribute.Generic)), DesignTimeVisible(False), DisplayName(NameOf(ToolStripNumericUpDown)), Localizable(True), ToolboxBitmap(GetType(NumericUpDown), "NumericUpDown.bmp"), ToolboxItem(False), ToolboxItemFilter("System.Windows.Forms", ToolboxItemFilterType.Allow), ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip Or ToolStripItemDesignerAvailability.StatusStrip) > Public Class ToolStripNumericUpDown : Inherits ToolStripControlHost #Region " Properties " ''' <summary> ''' Gets the <see cref="NumericUpDown"/> control that is hosted by this <see cref="ToolStripNumericUpDown"/>. ''' </summary> < Browsable(True), EditorBrowsable(EditorBrowsableState.Advanced), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Category("Components"), Description("The NumericUpDown control that is hosted by this control.") > Public Shadows ReadOnly Property Control As NumericUpDown Get Return DirectCast(MyBase.Control, NumericUpDown) End Get End Property ''' <summary> ''' Gets or sets the numeric value assigned to this <see cref="ToolStripNumericUpDown"/>. ''' </summary> ''' ''' <value> ''' The numeric value assigned to this <see cref="ToolStripNumericUpDown"/>. ''' </value> < Bindable(True), DefaultValue(0D), Category("Appearance"), Description("The numeric value assigned to this control.") > Public Property Value As Decimal Get Return Me.Control.Value End Get Set(value As Decimal) Me.Control.Value = value End Set End Property ''' <summary> ''' Gets or sets the text to be displayed in this <see cref="ToolStripNumericUpDown"/>. ''' </summary> ''' ''' <value> ''' The text to be displayed in this <see cref="ToolStripNumericUpDown"/>. ''' </value> < Browsable(False), EditorBrowsable(EditorBrowsableState.Never), Bindable(False), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Category("Behavior"), Description("The text to be displayed in this control.") > Public Overrides Property Text As String Get Return Me.Control.Text End Get Set(value As String) Me.Control.Text = value End Set End Property ''' <summary> ''' This property is not applicable for this control. ''' </summary> < Browsable(False), EditorBrowsable(EditorBrowsableState.Never), Category("Not Applicable"), Description("This property is not applicable for this control.") > Public Overrides Property BackgroundImage As Image Get Return Nothing End Get Set(value As Image) MyBase.BackgroundImage = Nothing End Set End Property ''' <summary> ''' This property is not applicable for this control. ''' </summary> < Browsable(False), EditorBrowsable(EditorBrowsableState.Never), Category("Not Applicable"), Description("This property is not applicable for this control.") > Public Overrides Property BackgroundImageLayout As ImageLayout Get Return MyBase.BackgroundImageLayout End Get Set(value As ImageLayout) MyBase.BackgroundImageLayout = value End Set End Property ''' <summary> ''' This property is not applicable for this control. ''' </summary> < Browsable(False), EditorBrowsable(EditorBrowsableState.Never), Category("Not Applicable"), Description("This property is not applicable for this control.") > Public Overrides Property Image As Image Get Return Nothing End Get Set(value As Image) MyBase.Image = Nothing End Set End Property #End Region #Region " Events " ''' <summary> ''' Occurs whenever the <see cref="ToolStripNumericUpDown.Value"/> property is changed. ''' </summary> < Category("Action"), Description("Occurs whenever the Value property is changed.") > Public Event ValueChanged As EventHandler #End Region #Region " Constructors " ''' <summary> ''' Initializes a new instance of the <see cref="ToolStripNumericUpDown"/> class. ''' </summary> Public Sub New() MyBase.New(ToolStripNumericUpDown.CreateControlInstance()) End Sub #End Region #Region " Event Invocators " ''' <summary> ''' Raises the <see cref="ToolStripNumericUpDown.ValueChanged"/> event. ''' </summary> ''' ''' <param name="sender"> ''' The source of the event. ''' </param> ''' ''' <param name="e"> ''' The <see cref="EventArgs"/> instance containing the event data. ''' </param> Private Sub OnValueChanged(sender As Object, e As EventArgs) If Me.ValueChangedEvent IsNot Nothing Then RaiseEvent ValueChanged(Me, e) End If End Sub #End Region #Region " Event Invocators (Overriden) " ''' <summary> ''' Subscribes events from the hosted control ''' </summary> ''' ''' <param name="control"> ''' The control from which to subscribe events. ''' </param> Protected Overrides Sub OnSubscribeControlEvents(control As Control) MyBase.OnSubscribeControlEvents(control) AddHandler DirectCast(control, NumericUpDown).ValueChanged, AddressOf Me.OnValueChanged End Sub ''' <summary> ''' Unsubscribes events from the hosted control ''' </summary> ''' ''' <param name="control"> ''' The control from which to unsubscribe events. ''' </param> Protected Overrides Sub OnUnsubscribeControlEvents(control As Control) MyBase.OnUnsubscribeControlEvents(control) RemoveHandler DirectCast(control, NumericUpDown).ValueChanged, AddressOf Me.OnValueChanged End Sub #End Region #Region " Private Methods " ''' <summary> ''' Creates the control instance. ''' </summary> ''' ''' <returns> ''' The control. ''' </returns> Private Shared Function CreateControlInstance() As Control Return New NumericUpDown() With {.AutoSize = True} End Function #End Region End Class End Namespace #End Region
ToolStripTrackBar.vb' *********************************************************************** ' Author : ElektroStudios ' Modified : 19-April-2024 ' *********************************************************************** #Region " Option Statements " Option Strict On Option Explicit On Option Infer Off #End Region #Region " Imports " Imports System.ComponentModel Imports System.Drawing Imports System.Runtime.InteropServices Imports System.Windows.Forms Imports System.Windows.Forms.Design #End Region #Region " ToolStripTrackBar " ' ReSharper disable once CheckNamespace Namespace DevCase.UI.Components ''' <summary> ''' Represents a selectable track bar <see cref="ToolStripItem"/>. ''' </summary> ''' <seealso cref="ToolStripControlHost"/> < ComVisible(True), DebuggerStepThrough, DefaultEvent(NameOf(ToolStripTrackBar.Scroll)), DefaultProperty(NameOf(ToolStripTrackBar.Value)), DefaultBindingProperty(NameOf(ToolStripTrackBar.Value)), Description("Represents a selectable track bar ToolStripItem."), Designer("System.Windows.Forms.Design.ToolStripItemDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory(NameOf(DesignerCategoryAttribute.Generic)), DesignTimeVisible(False), DisplayName(NameOf(ToolStripTrackBar)), Localizable(True), ToolboxBitmap(GetType(TrackBar), "TrackBar.bmp"), ToolboxItem(False), ToolboxItemFilter("System.Windows.Forms", ToolboxItemFilterType.Allow), ToolStripItemDesignerAvailability(ToolStripItemDesignerAvailability.ToolStrip Or ToolStripItemDesignerAvailability.StatusStrip) > Public Class ToolStripTrackBar : Inherits ToolStripControlHost #Region " Properties " ''' <summary> ''' Gets the <see cref="TrackBar"/> control that is hosted by this <see cref="ToolStripTrackBar"/>. ''' </summary> < Browsable(True), EditorBrowsable(EditorBrowsableState.Advanced), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Category("Components"), Description("The TrackBar control that is hosted by this control.") > Public Shadows ReadOnly Property Control As TrackBar Get Return DirectCast(MyBase.Control, TrackBar) End Get End Property ''' <summary> ''' Gets or sets a numeric value that represents the current position of the scroll box on this <see cref="ToolStripTrackBar"/>. ''' </summary> ''' ''' <value> ''' The numeric value that represents the current position of the scroll box on this <see cref="ToolStripTrackBar"/>. ''' </value> < Bindable(True), DefaultValue(0I), Category("Behavior"), Description("The numeric value that represents the current position of the scroll box on this control.") > Public Property Value As Integer Get Return Me.Control.Value End Get Set(value As Integer) Me.Control.Value = value End Set End Property ''' <summary> ''' Gets or sets the lower limit of the range this <see cref="ToolStripTrackBar"/> is working with. ''' </summary> ''' ''' <value> ''' The minimum value for this <see cref="ToolStripTrackBar"/>. The default is 0. ''' </value> < Bindable(True), DefaultValue(0I), RefreshProperties(RefreshProperties.All), Category("Behavior"), Description("The minimum value for this control.") > Public Property Minimum As Integer Get Return Me.Control.Minimum End Get Set(value As Integer) Me.Control.Minimum = value End Set End Property ''' <summary> ''' Gets or sets the upper limit of the range this <see cref="ToolStripTrackBar"/> is working with. ''' </summary> ''' ''' <value> ''' The maximum value for this <see cref="ToolStripTrackBar"/>. The default is 10. ''' </value> < Bindable(True), DefaultValue(10I), RefreshProperties(RefreshProperties.All), Category("Behavior"), Description("The maximum value for this control.") > Public Property Maximum As Integer Get Return Me.Control.Maximum End Get Set(value As Integer) Me.Control.Maximum = value End Set End Property ''' <summary> ''' This property is not applicable for this control. ''' </summary> < Browsable(False), EditorBrowsable(EditorBrowsableState.Never), Category("Not Applicable"), Description("This property is not applicable for this control.") > Public Overrides Property BackgroundImage As Image Get Return Nothing End Get Set(value As Image) MyBase.BackgroundImage = Nothing End Set End Property ''' <summary> ''' This property is not applicable for this control. ''' </summary> < Browsable(False), EditorBrowsable(EditorBrowsableState.Never), Category("Not Applicable"), Description("This property is not applicable for this control.") > Public Overrides Property BackgroundImageLayout As ImageLayout Get Return MyBase.BackgroundImageLayout End Get Set(value As ImageLayout) MyBase.BackgroundImageLayout = value End Set End Property ''' <summary> ''' This property is not applicable for this control. ''' </summary> < Browsable(False), EditorBrowsable(EditorBrowsableState.Never), Category("Not Applicable"), Description("This property is not applicable for this control.") > Public Overrides Property Image As Image Get Return Nothing End Get Set(value As Image) MyBase.Image = Nothing End Set End Property #End Region #Region " Events " ''' <summary> ''' Occurs when either a mouse or keyboard action moves the scroll box. ''' </summary> < Category("Behavior"), Description("Occurs when either a mouse or keyboard action moves the scroll box.") > Public Event Scroll As EventHandler ''' <summary> ''' Occurs when the <see cref="ToolStripTrackBar.Value"/> property changes, ''' either by movement of the scroll box or by manipulation in code. ''' </summary> < Category("Action"), Description("Occurs when the Value property changes, either by movement of the scroll box or by manipulation in code.") > Public Event ValueChanged As EventHandler #End Region #Region " Constructors " ''' <summary> ''' Initializes a new instance of the <see cref="ToolStripTrackBar"/> class. ''' </summary> Public Sub New() MyBase.New(ToolStripTrackBar.CreateControlInstance()) End Sub #End Region #Region " Event Invocators " ''' <summary> ''' Raises the <see cref="ToolStripTrackBar.Scroll"/> event. ''' </summary> ''' ''' <param name="sender"> ''' The source of the event. ''' </param> ''' ''' <param name="e"> ''' The <see cref="EventArgs"/> instance containing the event data. ''' </param> Private Sub OnScroll(sender As Object, e As EventArgs) If Me.ScrollEvent IsNot Nothing Then RaiseEvent Scroll(Me, e) End If End Sub ''' <summary> ''' Raises the <see cref="ToolStripTrackBar.Scroll"/> event. ''' </summary> ''' ''' <param name="sender"> ''' The source of the event. ''' </param> ''' ''' <param name="e"> ''' The <see cref="EventArgs"/> instance containing the event data. ''' </param> Private Sub OnValueChanged(sender As Object, e As EventArgs) If Me.ValueChangedEvent IsNot Nothing Then RaiseEvent ValueChanged(Me, e) End If End Sub #End Region #Region " Event Invocators (Overriden) " ''' <summary> ''' Subscribes events from the hosted control ''' </summary> ''' ''' <param name="control"> ''' The control from which to subscribe events. ''' </param> Protected Overrides Sub OnSubscribeControlEvents(control As Control) MyBase.OnSubscribeControlEvents(control) AddHandler DirectCast(control, TrackBar).Scroll, AddressOf Me.OnScroll AddHandler DirectCast(control, TrackBar).ValueChanged, AddressOf Me.OnValueChanged End Sub ''' <summary> ''' Unsubscribes events from the hosted control ''' </summary> ''' ''' <param name="control"> ''' The control from which to unsubscribe events. ''' </param> Protected Overrides Sub OnUnsubscribeControlEvents(control As Control) MyBase.OnUnsubscribeControlEvents(control) RemoveHandler DirectCast(control, TrackBar).Scroll, AddressOf Me.OnScroll RemoveHandler DirectCast(control, TrackBar).ValueChanged, AddressOf Me.Onvaluechanged End Sub #End Region #Region " Private Methods " ''' <summary> ''' Creates the control instance. ''' </summary> ''' ''' <returns> ''' The control. ''' </returns> Private Shared Function CreateControlInstance() As Control Using ts As New ToolStrip() Return New TrackBar() With { .AutoSize = False, .Size = New Size(80, ts.Height) } End Using End Function #End Region End Class End Namespace #End Region
|
Páginas: 1 2 3 4 5 6 7 8 9 [ 10] |
|
|