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

 

 


Tema destacado: Tutorial básico de Quickjs


  Mostrar Mensajes
Páginas: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [15] 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ... 72
141  Programación / Desarrollo Web / Re: Formato Completo del manifest.json de extensiones del Google Chrome en: 11 Junio 2021, 17:07 pm
Hola, gracias por responder, básicamente necesito todos los campos de puede llevar el archivo "manifest.json" en las extensiones de google chrome, para posteriormente deserializar .

No encontré nada referente a eso, en la pagina que suministraste. pero de todos modos gracias.

142  Programación / Desarrollo Web / Formato Completo del manifest.json de extensiones del Google Chrome en: 10 Junio 2021, 22:40 pm

Hola, como dice en el titulo, necesito el formato completo del archivo "manifest.json" de extensiones para navegador google chrome.

Por ejemplo, tengo el ejmplo de Google aqui que es :

Código
  1. {
  2.  // Required
  3.  "manifest_version": 3,
  4.  "name": "My Extension",
  5.  "version": "versionString",
  6.  
  7.  // Recommended
  8.  "action": {...},
  9.  "default_locale": "en",
  10.  "description": "A plain text description",
  11.  "icons": {...},
  12.  
  13.  // Optional
  14.  "action": ...,
  15.  "author": ...,
  16.  "automation": ...,
  17.  "background": {
  18.    // Required
  19.    "service_worker":
  20.  },
  21.  "chrome_settings_overrides": {...},
  22.  "chrome_url_overrides": {...},
  23.  "commands": {...},
  24.  "content_capabilities": ...,
  25.  "content_scripts": [{...}],
  26.  "content_security_policy": "policyString",
  27.  "converted_from_user_script": ...,
  28.  "current_locale": ...,
  29.  "declarative_net_request": ...,
  30.  "devtools_page": "devtools.html",
  31.  "differential_fingerprint": ...,
  32.  "event_rules": [{...}],
  33.  "externally_connectable": {
  34.    "matches": ["*://*.example.com/*"]
  35.  },
  36.  "file_browser_handlers": [...],
  37.  "file_system_provider_capabilities": {
  38.    "configurable": true,
  39.    "multiple_mounts": true,
  40.    "source": "network"
  41.  },
  42.  "homepage_url": "http://path/to/homepage",
  43.  "host_permissions": [...],
  44.  "import": [{"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}],
  45.  "incognito": "spanning, split, or not_allowed",
  46.  "input_components": ...,
  47.  "key": "publicKey",
  48.  "minimum_chrome_version": "versionString",
  49.  "nacl_modules": [...],
  50.  "natively_connectable": ...,
  51.  "oauth2": ...,
  52.  "offline_enabled": true,
  53.  "omnibox": {
  54.    "keyword": "aString"
  55.  },
  56.  "optional_permissions": ["tabs"],
  57.  "options_page": "options.html",
  58.  "options_ui": {
  59.    "chrome_style": true,
  60.    "page": "options.html"
  61.  },
  62.  "permissions": ["tabs"],
  63.  "platforms": ...,
  64.  "replacement_web_app": ...,
  65.  "requirements": {...},
  66.  "sandbox": [...],
  67.  "short_name": "Short Name",
  68.  "storage": {
  69.    "managed_schema": "schema.json"
  70.  },
  71.  "system_indicator": ...,
  72.  "tts_engine": {...},
  73.  "update_url": "http://path/to/updateInfo.xml",
  74.  "version_name": "aString",
  75.  "web_accessible_resources": [...]
  76. }




Hay todo bien, pero cuando voy a una extension de las que tengo instaladas en mi navegador, y reviso el archivo "manifest.json" de dicha extension, me doy cuenta que hay campos que nos salen en el ejemplo de google.

Por ejemplo :

Código
  1. {
  2.   "background": {
  3.      "persistent": false,
  4.      "scripts": [ "common.js", "mirroring_common.js", "background_script.js" ]
  5.   },
  6.   "content_security_policy": "default-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; script-src 'self' https://apis.google.com https://feedback.googleusercontent.com https://www.google.com https://www.gstatic.com; child-src https://accounts.google.com https://content.googleapis.com https://www.google.com; connect-src 'self' http://*:* https://*:*; font-src https://fonts.gstatic.com;",
  7.   "default_locale": "en",
  8.   "description": "Provider for discovery and services for mirroring of Chrome Media Router",
  9.   "differential_fingerprint": "1.3bba8f43f392ecbc35b582986edcbf7c6591081b63f3f0214f8eed1d239b0f60",
  10.   "externally_connectable": {
  11.      "ids": [ "idmofbkcelhplfjnmmdolenpigiiiecc", "ggedfkijiiammpnbdadhllnehapomdge", "njjegkblellcjnakomndbaloifhcoccg" ]
  12.   },
  13.   "key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDNTWJoPZ9bT32yKxuuVa9LSEYobjPoXCLX3dgsZ9djDrWKNikTECjdRe3/AFXb+v8jkmmtYQPnOgSYn06J/QodDlCIG6l470+gkOoobUM7fOs1AVOse23qYUV4jbuRW3+YZlCvaWCFeczCNbGIUgKEi5B2fyQazy60AL1sLW3utQIDAQAB",
  14.   "manifest_version": 2,
  15.   "minimum_chrome_version": "37",
  16.   "name": "Chrome Media Router",
  17.   "oauth2": {
  18.      "client_id": "919648714761-55j965o0km033psv3i9qls5mo3qtdrb0.apps.googleusercontent.com",
  19.      "scopes": [ "https://www.googleapis.com/auth/calendar.readonly", "https://www.googleapis.com/auth/hangouts", "https://www.googleapis.com/auth/hangouts.readonly", "https://www.googleapis.com/auth/meetings", "https://www.googleapis.com/auth/userinfo.email" ]
  20.   },
  21.   "permissions": [ "alarms", "cast", "declarativeWebRequest", "desktopCapture", "gcm", "http://*/*", "identity", "identity.email", "management", "mdns", "mediaRouterPrivate", "metricsPrivate", "networkingPrivate", "processes", "storage", "system.cpu", "settingsPrivate", "tabCapture", "tabs", "https://hangouts.google.com/*", "https://*.google.com/cast/chromecast/home/gsse" ],
  22.   "update_url": "https://clients2.google.com/service/update2/crx",
  23.   "version": "9121.329.0.0",
  24.   "web_accessible_resources": [ "cast_sender.js" ]
  25. }
  26.  
  27.  

Como ves, es ese ejemplo , estan campos que en el ejemplo de google no hay, los cuales son : "persistent" y "scripts" , entro otros campos.




En pocas palabras , necesito un "manifest.json" Completo , con todos los campos y que hallan.



143  Foros Generales / Foro Libre / Re: Mis dudas existenciales. en: 9 Junio 2021, 18:52 pm
No se de que va este post, pero no me voy a leer pinche 34 paginas....

Pero siempre he tenido curiosidad, por saber : "¿Que pasa después de la muerte?"

Tengo esa duda, y me causa mas curiosidad, que cualquier otra. he visto muchos videos de youtube. algunas que otras religiones; el Valhalla , el infierto/cielo , La reencarnación .

hasta me he leído varios post de redit, de personas que han muerto durante unos minutos y vuelve a la vida. la mayoria, dice que como si te desmayaras. otros, tienen una experiencia tipo viaje astral....

En fin... esa es mi duda existencial. y si la llego a saber con seguridad, podría morir en "Paz"

144  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets para VB.NET !! (Compartan aquí sus snippets) en: 9 Junio 2021, 01:19 am
Defender Watcher

Monitoriza la desactivacion em tiempo real del Windows Defender.

( click en la imagen para ir código fuente en Github)




Codigo Fuente

DefenderWatcher.vb

Código
  1. ' ***********************************************************************
  2. ' Author   : Destroyer
  3. ' Modified : 8-June-2021
  4. ' Github   : https://github.com/DestroyerDarkNess
  5. ' Twitter  : https://twitter.com/Destroy06933000
  6. ' ***********************************************************************
  7. ' <copyright file="DefenderWatcher.vb" company="S4Lsalsoft">
  8. '     Copyright (c) S4Lsalsoft. All rights reserved.
  9. ' </copyright>
  10. ' ***********************************************************************
  11.  
  12. #Region " Usage Examples "
  13.  
  14. ' ''' <summary>
  15. ' ''' The DefenderWatcher instance to monitor Windows Defender Realtime Status Changed.
  16. ' ''' </summary>
  17. 'Friend WithEvents DefenderMon As New DefenderWatcher
  18.  
  19. ' ''' ----------------------------------------------------------------------------------------------------
  20. ' ''' <summary>
  21. ' ''' Handles the <see cref="DefenderWatcher.DefenderStatusChanged"/> event of the <see cref="DefenderMon"/> instance.
  22. ' ''' </summary>
  23. ' ''' ----------------------------------------------------------------------------------------------------
  24. ' ''' <param name="sender">
  25. ' ''' The source of the event.
  26. ' ''' </param>
  27. ' '''
  28. ' ''' <param name="e">
  29. ' ''' The <see cref="DefenderWatcher.DefenderStatusChangedEventArgs"/> instance containing the event data.
  30. ' ''' </param>
  31. ' ''' ----------------------------------------------------------------------------------------------------
  32. 'Private Sub DefenderMon_DefenderStatusChanged(ByVal sender As Object, ByVal e As DefenderWatcher.DefenderStatusChangedEventArgs) Handles DefenderMon.DefenderStatusChanged
  33. '    Dim sb As New System.Text.StringBuilder
  34. '    sb.AppendLine(" Defender Configuration change -  Windows Defender RealtimeMonitoring")
  35. '    sb.AppendLine(String.Format("DisableRealtimeMonitoring......: {0}", e.TargetInstance.ToString))
  36. '    sb.AppendLine(String.Format("Old Value......................: {0}", e.PreviousInstance.ToString))
  37. '    Me.BeginInvoke(Sub()
  38. '                       TextBox1.Text += (sb.ToString) & Environment.NewLine & Environment.NewLine
  39. '                   End Sub)
  40. 'End Sub
  41.  
  42. #End Region
  43.  
  44. #Region " Imports "
  45.  
  46. Imports System.ComponentModel
  47. Imports System.Management
  48. Imports System.Windows.Forms
  49.  
  50. #End Region
  51.  
  52. Namespace Core.Engine.Watcher
  53.  
  54.    Public Class DefenderWatcher : Inherits NativeWindow : Implements IDisposable
  55.  
  56. #Region " Constructor "
  57.  
  58.        ''' ----------------------------------------------------------------------------------------------------
  59.        ''' <summary>
  60.        ''' Initializes a new instance of <see cref="DefenderWatcher"/> class.
  61.        ''' </summary>
  62.        ''' ----------------------------------------------------------------------------------------------------
  63.        <DebuggerStepThrough>
  64.        Public Sub New()
  65.  
  66.            Me.events = New EventHandlerList
  67.  
  68.        End Sub
  69.  
  70. #End Region
  71.  
  72. #Region " Properties "
  73.  
  74.        ''' ----------------------------------------------------------------------------------------------------
  75.        ''' <summary>
  76.        ''' Gets a value that determines whether the monitor is running.
  77.        ''' </summary>
  78.        ''' ----------------------------------------------------------------------------------------------------
  79.        Public ReadOnly Property IsRunning As Boolean
  80.            <DebuggerStepThrough>
  81.            Get
  82.                Return Me.isRunningB
  83.            End Get
  84.        End Property
  85.        Private isRunningB As Boolean
  86.  
  87. #End Region
  88.  
  89.        Private Scope As New ManagementScope("root\Microsoft\Windows\Defender")
  90.        Private WithEvents DefenderState As ManagementEventWatcher = New ManagementEventWatcher(Scope, New WqlEventQuery("SELECT * FROM __InstanceModificationEvent WITHIN 5 WHERE TargetInstance ISA 'MSFT_MpPreference' AND TargetInstance.DisableRealtimeMonitoring=True"))
  91.  
  92. #Region " Events "
  93.  
  94.  
  95.        ''' ----------------------------------------------------------------------------------------------------
  96.        ''' <summary>
  97.        ''' A list of event delegates.
  98.        ''' </summary>
  99.        ''' ----------------------------------------------------------------------------------------------------
  100.        Private ReadOnly events As EventHandlerList
  101.  
  102.        Public Custom Event DefenderStatusChanged As EventHandler(Of DefenderStatusChangedEventArgs)
  103.  
  104.            <DebuggerNonUserCode>
  105.            <DebuggerStepThrough>
  106.            AddHandler(ByVal value As EventHandler(Of DefenderStatusChangedEventArgs))
  107.                Me.events.AddHandler("DefenderStatusChangedEvent", value)
  108.            End AddHandler
  109.  
  110.            <DebuggerNonUserCode>
  111.            <DebuggerStepThrough>
  112.            RemoveHandler(ByVal value As EventHandler(Of DefenderStatusChangedEventArgs))
  113.                Me.events.RemoveHandler("DefenderStatusChangedEvent", value)
  114.            End RemoveHandler
  115.  
  116.            <DebuggerNonUserCode>
  117.            <DebuggerStepThrough>
  118.            RaiseEvent(ByVal sender As Object, ByVal e As DefenderStatusChangedEventArgs)
  119.                Dim handler As EventHandler(Of DefenderStatusChangedEventArgs) =
  120.                    DirectCast(Me.events("DefenderStatusChangedEvent"), EventHandler(Of DefenderStatusChangedEventArgs))
  121.  
  122.                If (handler IsNot Nothing) Then
  123.                    handler.Invoke(sender, e)
  124.                End If
  125.            End RaiseEvent
  126.  
  127.        End Event
  128.  
  129. #End Region
  130.  
  131.        '   Dim oInterfaceType As String = TIBase?.Properties("DisableRealtimeMonitoring")?.Value.ToString() ' Prevent Defender Disable
  132.  
  133.        Public Sub DefenderState_EventArrived(ByVal sender As Object, ByVal e As EventArrivedEventArgs) Handles DefenderState.EventArrived
  134.            Dim DefenderTargetInstance As Boolean = Nothing
  135.            Dim DefenderPreviousInstance As Boolean = Nothing
  136.  
  137.            Using TIBase = CType(e.NewEvent.Properties("TargetInstance").Value, ManagementBaseObject)
  138.                DefenderTargetInstance = CBool(TIBase.Properties("DisableRealtimeMonitoring").Value)
  139.            End Using
  140.  
  141.            Using PIBase = CType(e.NewEvent.Properties("PreviousInstance").Value, ManagementBaseObject)
  142.                DefenderPreviousInstance = CBool(PIBase.Properties("DisableRealtimeMonitoring").Value)
  143.            End Using
  144.  
  145.            Me.OnDefenderStatusChanged(New DefenderStatusChangedEventArgs(DefenderTargetInstance, DefenderPreviousInstance))
  146.  
  147.        End Sub
  148.  
  149. #Region " Event Invocators "
  150.  
  151.        <DebuggerStepThrough>
  152.        Protected Overridable Sub OnDefenderStatusChanged(ByVal e As DefenderStatusChangedEventArgs)
  153.  
  154.            RaiseEvent DefenderStatusChanged(Me, e)
  155.  
  156.        End Sub
  157.  
  158. #End Region
  159.  
  160. #Region " Events Data "
  161.  
  162.        Public NotInheritable Class DefenderStatusChangedEventArgs : Inherits EventArgs
  163.  
  164. #Region " Properties "
  165.  
  166.            Private ReadOnly TargetInstanceB As Boolean
  167.            Public ReadOnly Property TargetInstance As Boolean
  168.                <DebuggerStepThrough>
  169.                Get
  170.                    Return Me.TargetInstanceB
  171.                End Get
  172.            End Property
  173.  
  174.            Private ReadOnly PreviousInstanceB As Boolean
  175.            Public ReadOnly Property PreviousInstance As Boolean
  176.                <DebuggerStepThrough>
  177.                Get
  178.                    Return Me.PreviousInstanceB
  179.                End Get
  180.            End Property
  181.  
  182. #End Region
  183.  
  184. #Region " Constructors "
  185.  
  186.            <DebuggerNonUserCode>
  187.            Private Sub New()
  188.            End Sub
  189.  
  190.            <DebuggerStepThrough>
  191.            Public Sub New(ByVal TI As Boolean, ByVal PI As Boolean)
  192.  
  193.                Me.TargetInstanceB = TI
  194.                Me.PreviousInstanceB = PI
  195.  
  196.            End Sub
  197.  
  198. #End Region
  199.  
  200.        End Class
  201.  
  202. #End Region
  203.  
  204. #Region " Public Methods "
  205.  
  206.        ''' ----------------------------------------------------------------------------------------------------
  207.        ''' <summary>
  208.        ''' Starts monitoring.
  209.        ''' </summary>
  210.        ''' ----------------------------------------------------------------------------------------------------
  211.        ''' <exception cref="Exception">
  212.        ''' Monitor is already running.
  213.        ''' </exception>
  214.        ''' ----------------------------------------------------------------------------------------------------
  215.        <DebuggerStepThrough>
  216.        Public Overridable Sub Start()
  217.  
  218.            If (Me.Handle = IntPtr.Zero) Then
  219.                MyBase.CreateHandle(New CreateParams)
  220.                DefenderState.Start()
  221.                 Me.isRunningB = True
  222.  
  223.            Else
  224.                Throw New Exception(message:="Monitor is already running.")
  225.  
  226.            End If
  227.  
  228.        End Sub
  229.  
  230.        ''' ----------------------------------------------------------------------------------------------------
  231.        ''' <summary>
  232.        ''' Stops monitoring.
  233.        ''' </summary>
  234.        ''' ----------------------------------------------------------------------------------------------------
  235.        ''' <exception cref="Exception">
  236.        ''' Monitor is already stopped.
  237.        ''' </exception>
  238.        ''' ----------------------------------------------------------------------------------------------------
  239.        <DebuggerStepThrough>
  240.        Public Overridable Sub [Stop]()
  241.  
  242.            If (Me.Handle <> IntPtr.Zero) Then
  243.                DefenderState.Stop()
  244.                MyBase.DestroyHandle()
  245.                Me.isRunningB = False
  246.  
  247.            Else
  248.                Throw New Exception(message:="Monitor is already stopped.")
  249.  
  250.            End If
  251.  
  252.        End Sub
  253.  
  254. #End Region
  255.  
  256. #Region " IDisposable Implementation "
  257.  
  258.        ''' ----------------------------------------------------------------------------------------------------
  259.        ''' <summary>
  260.        ''' To detect redundant calls when disposing.
  261.        ''' </summary>
  262.        ''' ----------------------------------------------------------------------------------------------------
  263.        Private isDisposed As Boolean
  264.  
  265.        ''' ----------------------------------------------------------------------------------------------------
  266.        ''' <summary>
  267.        ''' Releases all the resources used by this instance.
  268.        ''' </summary>
  269.        ''' ----------------------------------------------------------------------------------------------------
  270.        <DebuggerStepThrough>
  271.        Public Sub Dispose() Implements IDisposable.Dispose
  272.  
  273.            Me.Dispose(isDisposing:=True)
  274.            GC.SuppressFinalize(obj:=Me)
  275.  
  276.        End Sub
  277.  
  278.        ''' ----------------------------------------------------------------------------------------------------
  279.        ''' <summary>
  280.        ''' Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
  281.        ''' Releases unmanaged and - optionally - managed resources.
  282.        ''' </summary>
  283.        ''' ----------------------------------------------------------------------------------------------------
  284.        ''' <param name="isDisposing">
  285.        ''' <see langword="True"/>  to release both managed and unmanaged resources;
  286.        ''' <see langword="False"/> to release only unmanaged resources.
  287.        ''' </param>
  288.        ''' ----------------------------------------------------------------------------------------------------
  289.        <DebuggerStepThrough>
  290.        Protected Overridable Sub Dispose(ByVal isDisposing As Boolean)
  291.  
  292.            If (Not Me.isDisposed) AndAlso (isDisposing) Then
  293.  
  294.                Me.events.Dispose()
  295.                Me.Stop()
  296.  
  297.            End If
  298.  
  299.            Me.isDisposed = True
  300.  
  301.        End Sub
  302.  
  303. #End Region
  304.  
  305.    End Class
  306.  
  307. End Namespace
  308.  
  309.  



145  Programación / .NET (C#, VB.NET, ASP) / [Ayuda] Chrome69Tabcontrol - Control Extendido en: 4 Junio 2021, 22:28 pm
Hola, hoy vengo a pedirles ayuda .

Tome el Tabcontrol, "Chrome69Tabcontrol " , lo pase a vb, y le agregue la posibilidad de arrastrar las pestañas de tabcontrol.

El problema es que quiero que desaparezca los botones de navigacion y no se como hacerlo :





Lo que quiero lograr es yo mismo calcular el tamaño disponible, y auto ajustar el tamaño de las pestañas, asi como lo hace Google Chrome.



Aqui el codigo :

Código
  1. Imports System.Drawing.Drawing2D
  2.  
  3. Namespace DragonTubeControls
  4.  
  5.    Public Class Helpers
  6.  
  7.        Public Shared Function Base64ToImage(ByVal Base64str As String) As System.Drawing.Image
  8.            Dim Fixb64 As String = Base64str.Replace(" ", "+")
  9.            Dim MemStream As System.IO.MemoryStream = New System.IO.MemoryStream(Convert.FromBase64String(Fixb64))
  10.            Dim ImageStream As Image = System.Drawing.Image.FromStream(MemStream)
  11.            MemStream.Close()
  12.            Return ImageStream
  13.        End Function
  14.  
  15.    End Class
  16.  
  17.    Public Class Chrome69Tabcontrol
  18.        Inherits TabControl
  19.  
  20. #Region " Decalre's "
  21.  
  22.        Private AddImageBlack As String = "iVBORw0KGgoAAAANSUhEUgAAABsAAAAcCAYAAACQ0cTtAAAAN0lEQVR42mNgGAWjYMiCyMiEh3SzLCoq8f+oZaOWgVMdyGBiMU1S6WicjVo2eMrGUTAKRsHgBgBNazNxj/heLwAAAABJRU5ErkJggg=="
  23.        Private CloseImageBlack As String = "iVBORw0KGgoAAAANSUhEUgAAAA8AAAAQCAYAAADJViUEAAAAU0lEQVR42mNgGOHA3Nx8FRDboIubmZnZAsVX49UMVfQc2QCo2AsQTdB2mGKQASRpxGIAaRqhfrchSzNU43OQJpKcjayR5AADRRU2RVAD1jCMAgYAuEUszUWy7F8AAAAASUVORK5CYII="
  24.        Private predraggedTab As TabPage
  25.        Private ReferenceTabSize As New Size(505, 505)
  26.  
  27. #End Region
  28.  
  29.  
  30.        Const CLOSE_SIZE As Integer = 16
  31.  
  32.        Public Sub New()
  33.            MyBase.New()
  34.            SetStyles()
  35.            Me.SizeMode = TabSizeMode.Fixed
  36.            Me.Dock = DockStyle.Fill
  37.            Me.Font = New Font("Microsoft Yahei", 9.0F)
  38.            Me.ItemSize = New Size(245, 35)
  39.            Me.DoubleBuffered = True
  40.            Me.AllowDrop = True
  41.            ' Me.Multiline = True
  42.            '  Me.AutoSize = False
  43.        End Sub
  44.  
  45.  
  46.  
  47.        Private Sub SetStyles()
  48.            MyBase.SetStyle(ControlStyles.DoubleBuffer Or ControlStyles.UserPaint Or ControlStyles.OptimizedDoubleBuffer Or ControlStyles.AllPaintingInWmPaint Or ControlStyles.ResizeRedraw Or ControlStyles.SupportsTransparentBackColor, True)
  49.            MyBase.UpdateStyles()
  50.        End Sub
  51.  
  52.        Public Overrides ReadOnly Property DisplayRectangle As Rectangle
  53.            Get
  54.                Dim rect As Rectangle = MyBase.DisplayRectangle
  55.                Return New Rectangle(rect.Left - 8, rect.Top - 1, rect.Width + 12, rect.Height + 8)
  56.            End Get
  57.        End Property
  58.  
  59.        Protected Overrides Sub OnResize(ByVal e As EventArgs)
  60.            MyBase.OnResize(e)
  61.            Me.Refresh()
  62.            Me.Update()
  63.        End Sub
  64.  
  65.        Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
  66.            MyBase.OnPaint(e)
  67.            Dim rect As Rectangle = Me.ClientRectangle
  68.            e.Graphics.SmoothingMode = SmoothingMode.HighQuality
  69.            e.Graphics.InterpolationMode = InterpolationMode.HighQualityBilinear
  70.  
  71.            Using bufferedGraphics As BufferedGraphics = BufferedGraphicsManager.Current.Allocate(e.Graphics, rect)
  72.                bufferedGraphics.Graphics.FillRectangle(New SolidBrush(Color.FromArgb(230, 232, 236)), rect)
  73.  
  74.                For index As Integer = 0 To Me.TabCount - 1
  75.                    DrawTabPage(bufferedGraphics.Graphics, Me.GetTabRect(index), index)
  76.                Next
  77.                bufferedGraphics.Render(e.Graphics)
  78.            End Using
  79.        End Sub
  80.  
  81.  
  82.  
  83.        Private Sub DrawTabPage(ByVal graphics As Graphics, ByVal rectangle As Rectangle, ByVal index As Integer)
  84.            graphics.SmoothingMode = SmoothingMode.HighQuality
  85.            graphics.InterpolationMode = InterpolationMode.HighQualityBilinear
  86.            graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias
  87.            '  Me.TabPages(index).AutoSize = False
  88.            '  rectangle.Size = Me.ItemSize
  89.  
  90.            Dim sf As StringFormat = New StringFormat()
  91.            sf.Trimming = StringTrimming.EllipsisCharacter
  92.            sf.FormatFlags = StringFormatFlags.NoWrap
  93.            Dim fontRect As Rectangle = New Rectangle(rectangle.X + 40, rectangle.Y + 7, rectangle.Width, Me.TabPages(index).Font.Height)
  94.            Dim rectClose As Rectangle = GetCloseRect(rectangle)
  95.            Dim p5 As Point = New Point(rectangle.Left, 7)
  96.            Dim p6 As Point = New Point(rectClose.X - 12, 12)
  97.  
  98.  
  99.  
  100.            Try
  101.  
  102.            If index = Me.TabCount - 1 Then
  103.  
  104.                    Using Add As Bitmap = Helpers.Base64ToImage(AddImageBlack)
  105.                        graphics.DrawImage(Add, p5)
  106.                    End Using
  107.  
  108.                Else
  109.  
  110.                    If index = Me.SelectedIndex Then
  111.  
  112.                        graphics.FillPath(New SolidBrush(Color.FromArgb(255, 255, 255)), CreateTabPath(rectangle))
  113.                        graphics.DrawString(Me.TabPages(index).Text, Me.TabPages(index).Font, New SolidBrush(Color.SlateGray), fontRect, sf)
  114.  
  115.                        If Me.ImageList IsNot Nothing Then
  116.                            Dim imgindex As Integer = Me.TabPages(index).ImageIndex
  117.                            Dim key As String = Me.TabPages(index).ImageKey
  118.                            Dim icon As Image = New Bitmap(32, 32)
  119.  
  120.                            If imgindex > -1 Then
  121.                                icon = Me.ImageList.Images(imgindex)
  122.                            End If
  123.  
  124.                            If Not String.IsNullOrEmpty(key) Then
  125.                                icon = Me.ImageList.Images(key)
  126.                            End If
  127.  
  128.                            graphics.DrawImage(icon, rectangle.Left + 22, rectangle.Top + 9)
  129.                        End If
  130.  
  131.                        Using Close As Bitmap = Helpers.Base64ToImage(CloseImageBlack)
  132.                            graphics.DrawImage(Close, p6)
  133.                        End Using
  134.  
  135.                    Else
  136.  
  137.                        graphics.FillPath(New SolidBrush(Color.FromArgb(230, 232, 236)), CreateTabPath(rectangle))
  138.                        graphics.DrawString(Me.TabPages(index).Text, Me.TabPages(index).Font, New SolidBrush(Color.Gray), fontRect, sf)
  139.  
  140.                        If Me.ImageList IsNot Nothing Then
  141.                            Dim imgindex As Integer = Me.TabPages(index).ImageIndex
  142.                            Dim key As String = Me.TabPages(index).ImageKey
  143.                            Dim icon As Image = New Bitmap(32, 32)
  144.  
  145.                            If imgindex > -1 Then
  146.                                icon = Me.ImageList.Images(imgindex)
  147.                            End If
  148.  
  149.                            If Not String.IsNullOrEmpty(key) Then
  150.                                icon = Me.ImageList.Images(key)
  151.                            End If
  152.  
  153.                            graphics.DrawImage(icon, rectangle.Left + 22, rectangle.Top + 9)
  154.                        End If
  155.  
  156.                        Using Close As Bitmap = Helpers.Base64ToImage(CloseImageBlack)
  157.                            graphics.DrawImage(Close, p6)
  158.                        End Using
  159.  
  160.                    End If
  161.                End If
  162.  
  163.            Catch __unusedNullReferenceException1__ As System.NullReferenceException
  164.            End Try
  165.        End Sub
  166.  
  167.        Protected Overrides Sub OnSelecting(ByVal e As TabControlCancelEventArgs)
  168.            If e.TabPageIndex = Me.TabPages.Count - 1 Then e.Cancel = True
  169.        End Sub
  170.  
  171. #Region " Mause Event "
  172.  
  173.        Protected Overrides Sub OnMouseMove(ByVal e As MouseEventArgs)
  174.            If e.Button = MouseButtons.Left AndAlso predraggedTab IsNot Nothing Then
  175.                Me.DoDragDrop(predraggedTab, DragDropEffects.Move)
  176.            End If
  177.  
  178.            MyBase.OnMouseMove(e)
  179.        End Sub
  180.  
  181.        Protected Overrides Sub OnMouseUp(ByVal e As MouseEventArgs)
  182.            predraggedTab = Nothing
  183.            MyBase.OnMouseUp(e)
  184.        End Sub
  185.  
  186.        Protected Overrides Sub OnMouseDown(ByVal e As MouseEventArgs)
  187.            MyBase.OnMouseDown(e)
  188.            Dim lastIndex As Integer = Me.TabCount - 1
  189.            Dim AddImage As Bitmap = Helpers.Base64ToImage(AddImageBlack)
  190.            Dim p5 As Point = New Point(Me.GetTabRect(lastIndex).Left, 5)
  191.            Dim AddImgRec = New Rectangle(p5, AddImage.Size)
  192.  
  193.            If Me.GetTabRect(lastIndex).Contains(e.Location) Then
  194.  
  195.                If AddImgRec.Contains(e.Location) Then
  196.                    Me.TabPages.Insert(lastIndex, "Chrome Tab")
  197.                    Me.SelectedIndex = lastIndex
  198.                End If
  199.            End If
  200.  
  201.            If e.Button = MouseButtons.Left Then
  202.  
  203.                ' Incomplete Bug
  204.                '  If Not Me.TabCount <= 3 Then
  205.                '      Dim Xw As Integer = Me.Width / Me.TabCount
  206.                '     If Xw > 245 Then Xw = 245                                  
  207.                '     Me.ItemSize = New Size(Me.Width / Me.TabCount, Me.ItemSize.Height)
  208.                ' End If
  209.  
  210.                Dim x As Integer = e.X, y As Integer = e.Y
  211.                Dim myTabRect As Rectangle = Me.GetTabRect(Me.SelectedIndex)
  212.                myTabRect.Offset(myTabRect.Width - (CLOSE_SIZE + 23), 5)
  213.                myTabRect.Width = CLOSE_SIZE
  214.                myTabRect.Height = CLOSE_SIZE
  215.                Dim isClose As Boolean = x > myTabRect.X AndAlso x < myTabRect.Right AndAlso y > myTabRect.Y AndAlso y < myTabRect.Bottom
  216.  
  217.                If isClose = True Then
  218.  
  219.                    If Me.TabPages.Count > 2 Then
  220.                        Dim tab As TabPage = Me.SelectedTab
  221.                        Me.TabPages.Remove(tab)
  222.                        Me.SelectedTab.Refresh()
  223.                        Me.SelectedIndex = Me.TabPages.Count - 2
  224.                        tab.Dispose()
  225.                        GC.Collect()
  226.                        GC.WaitForPendingFinalizers()
  227.                    Else
  228.                        System.Environment.[Exit](0)
  229.                        Dispose()
  230.                    End If
  231.                End If
  232.            End If
  233.  
  234.            predraggedTab = getPointedTab()
  235.        End Sub
  236.  
  237. #End Region
  238.  
  239. #Region " Private Methods "
  240.  
  241.        Private Function CreateTabPath(ByVal tabBounds As Rectangle) As GraphicsPath
  242.            Dim path As GraphicsPath = New GraphicsPath()
  243.            Dim spread, eigth, sixth, quarter As Integer
  244.            spread = CInt(Math.Floor(CDec(tabBounds.Height)))
  245.            eigth = CInt(Math.Floor(CDec(tabBounds.Height) * 1 / 11))
  246.            sixth = CInt(Math.Floor(CDec(tabBounds.Height) * 3 / 10))
  247.            quarter = CInt(Math.Floor(CDec(tabBounds.Height) * 2 / 3))
  248.            path.AddCurve(New Point() {New Point(tabBounds.X + 2, tabBounds.Bottom + 2), New Point(tabBounds.X + sixth, tabBounds.Bottom - eigth), New Point(tabBounds.X + spread - quarter, tabBounds.Y + eigth), New Point(tabBounds.X + spread, tabBounds.Y)})
  249.            path.AddLine(tabBounds.X + spread, tabBounds.Y, tabBounds.Right - spread, tabBounds.Y)
  250.            path.AddCurve(New Point() {New Point(tabBounds.Right - spread, tabBounds.Y), New Point(tabBounds.Right - spread + quarter, tabBounds.Y + eigth), New Point(tabBounds.Right - sixth, tabBounds.Bottom - eigth), New Point(tabBounds.Right + 2, tabBounds.Bottom + 2)})
  251.            path.CloseFigure()
  252.            Return path
  253.        End Function
  254.  
  255.        Private Function GetCloseRect(ByVal myTabRect As Rectangle) As Rectangle
  256.            myTabRect.Offset(myTabRect.Width - (CLOSE_SIZE + 10), 5)
  257.            myTabRect.Width = CLOSE_SIZE
  258.            myTabRect.Height = CLOSE_SIZE
  259.            Return myTabRect
  260.        End Function
  261.  
  262. #End Region
  263.  
  264. #Region " Other Events "
  265.  
  266.        Protected Overrides Sub OnDragOver(ByVal drgevent As DragEventArgs)
  267.            Dim draggedTab = CType(drgevent.Data.GetData(GetType(TabPage)), TabPage)
  268.            Dim pointedTab = getPointedTab()
  269.  
  270.            If ReferenceEquals(draggedTab, predraggedTab) AndAlso pointedTab IsNot Nothing Then
  271.                drgevent.Effect = DragDropEffects.Move
  272.  
  273.                If Not ReferenceEquals(pointedTab, draggedTab) Then
  274.                    Me.ReplaceTabPages(draggedTab, pointedTab)
  275.                End If
  276.            End If
  277.  
  278.            MyBase.OnDragOver(drgevent)
  279.        End Sub
  280.  
  281.        Private Function getPointedTab() As TabPage
  282.            For i = 0 To Me.TabPages.Count - 1
  283.                If Me.GetTabRect(i).Contains(Me.PointToClient(Cursor.Position)) Then
  284.                    Return Me.TabPages(i)
  285.                End If
  286.            Next
  287.  
  288.            Return Nothing
  289.        End Function
  290.  
  291.        Private Sub ReplaceTabPages(ByVal Source As TabPage, ByVal Destination As TabPage)
  292.            Try
  293.                Dim SourceIndex = Me.TabPages.IndexOf(Source)
  294.                Dim DestinationIndex = Me.TabPages.IndexOf(Destination)
  295.                Me.TabPages(DestinationIndex) = Source
  296.                Me.TabPages(SourceIndex) = Destination
  297.  
  298.                If Me.SelectedIndex = SourceIndex Then
  299.                    Me.SelectedIndex = DestinationIndex
  300.                ElseIf Me.SelectedIndex = DestinationIndex Then
  301.                    Me.SelectedIndex = SourceIndex
  302.                End If
  303.                Me.Refresh()
  304.            Catch ex As Exception
  305.  
  306.            End Try
  307.        End Sub
  308.  
  309. #End Region
  310.  
  311.    End Class
  312. End Namespace
  313.  


Gracias de antemano.

146  Informática / Software / Re: Monitor ReFix - Solución fácil y Rápida para ajustar la Resolucion de tu pantalla. en: 3 Junio 2021, 01:04 am
Procura usar nombres más propicios para tus programas... Monitor, no solo se refiere a un terminal de vídeo, en español tiene varias acepciones, y 'refix'... puede no indicar nada si no se acierta con lo de 'monitor'...

Sería más aceptable por ejemplo algo como: 'Sincronización de la resolución de la señal de vídeo', que tu puedes acortar para el nombre (pero dejarlo para su descripción), luego jugando con las palabras: sincro - resolucion - video (aunque luego lo pongas en inglés).

Tomare tu consejo, a la próxima versión, le cambiare el nombre. y un pequeño bug menor, que se me paso.

La verdad es que siempre me cuesta , el nombrar un proyecto nuevo, no tengo ni idea de como llamarlo.  de hecho si revisas el ensamblado con dnspy, te podras dar cuenta que el nombre origial del proyecto era : WinMonitorAA , también se me había ocurrido llamarlo de una forma mas genérica : Windows Resolution Manager .

El problema, es que llamarlo de formas genéricas, muchas veces conlleva a que cueste encontrarlo, ya que el buscador de google no lo lista. osea me refiero a que le coloco un nombre un tanto "Original" . el buscador listara solo mis software.

Como por ejemplo "xylateware" . me costo crear ese nombre origial, y si lo buscas en google , en los resultados solo aparecerá mi software.


147  Foros Generales / Foro Libre / Re: Funciones que no te gustan de WhatsApp en: 2 Junio 2021, 03:34 am
Nunca me gusto Whatsapp, pero igualmente lo tengo que usar, ya que mis profesores de la Universidad, crean grupos por este medio , para el intercambio de información.

Pero por lo general, Siempre descargo APKs modificadas. Juegos, Aplicaciones, etc... (Obviamente que no requiera acceso Root)

En lo general me gusta esta modificación de Whatsapp : https://www.fouadmods.net/fouad-whatsapp/

Tiene muchas cosas Útiles e Interesantes.
148  Informática / Software / Monitor ReFix - Solución fácil y Rápida para ajustar la Resolucion de tu pantalla. en: 2 Junio 2021, 02:30 am
Hola, soy yo de nuevo. Les cuento algo rapido....

El fin de semana, me lleve mi PC (DELL Hybrid 140g). a la casa de un amigo. al llegar , el me presto un monitor, teclado y mause, pero resulto que el único monitor que tenia VGA , era de menor resolución al mío, entonces no puede configurar la resolución del Windows .

La resolución Máxima que soporta mi monitor es 1400x1050 y la del monitor que me prestaron era  1280x1024 , entonces el monitor se queda en negro.

Bueno , busque varias soluciones, no al final no logre nada. no la pude usar.



Ahora en casa, con mi monitor, hice un pequeño programa de menos de 1mb para solucionar esto.



Introduccion

En Windows, si cambia de monitor y la configuración de Windows es más alta que la resolución del nuevo monitor, el monitor estará completamente negro y, si no tiene otro monitor, no podrá configurar la resolución de Windows. Podrías resolverlo de alguna forma tediosas.

Con este programa de menos de 1 MB, resuelves este problema.


Cuando se ejecuta por primera vez, el Programa le preguntará si desea agregarlo al inicio de Windows. (Debe dar que SI)

Utilice las teclas de acceso rápido para configurar:

  • Ctrl + ALT + A           (Establece la resolución más baja del sistema)
  • Ctrol + ALT + R         (Establecer la configuración anterior)






149  Media / Juegos y Consolas / Re: Among Us Gratis hasta el 03 de Junio en: 2 Junio 2021, 02:11 am
Que Among Us no siempre fue gratis? alv

Recuerdo que lo descargue actualizado de un video de YouTube. y le hice cheat, por aquella época que se había vuelto famoso.

Después se pusieron a actualizarlo cada mes y valió madre, que tedioso actualizar el cheat a cada rato.



También me refiero a que por que Comprarlo ? , si se puede encontrar fácilmente actualizado y sobre todo GRATIS.

150  Informática / Software / Re: DragonTube - El mejor cliente de Youtube! en: 1 Junio 2021, 04:33 am
Hola, hago una breve actualización.

Estoy usando 000webhost como es gratuito y fácil de manejar . para la aplicación. pero llego al limite, así que tuve que crearme otra cuenta y actualizar.


En la nueva actualización cambie mucho código. y lo ordene, ahora es mas rápido. y con menos bugs.

Por los momentos no agregue una nueva función, pero en comparación con las versiones anteriores. esta nueva versión es completamente diferente (en código).

También removí muchos recursos innecesarios, también quite la librería HtmlAgilityPack y cambie las funciones que requerían dicha librería por nuevas funciones independientes.





Páginas: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 [15] 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 ... 72
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines