|
8861
|
Informática / Software / Re: Hacer portable un programa ya instalado??
|
en: 28 Junio 2013, 21:26 pm
|
El programa es phpDesigner8
En este caso es un programa muy sencillo, no crea ninguna clave de registro (bueno, la crea vacía, asi que nada) Tienes uan carpeta en "%APPDATA%\phpdesigner" Otra carpeta en "%PROGRAMFILES%\phpDesigner 8" ..Y nada más, con copiar eso es suficiente. Saludos!
|
|
|
8862
|
Informática / Software / Re: Hacer portable un programa ya instalado??
|
en: 28 Junio 2013, 21:18 pm
|
...Cada programa es un mundo, si no dices de que programa se trata dudo que se te pueda ayudar más que diciendote esto:
1. Monitoriza el registro en busca de nuevas claves añadidas durante la instalación. 2. Monitoriza los archivos en busca de nuevos archivos expandidos durante la instalación. 3. Recopíla todas esas claves y archivos para crear tu portable.
No me vale lo de "es que ya lo tengo instalado", como ya digo cada programa es un mundo, y ese programa puede tener 1.000 archivos expandidos por las carpetas del sistema y que sin ellos no podrás ejecutar la aplicación, por eso has de monitorizar esos archivos, además puede tener servicios, dll's registradas en el sistema, de todo vaya.
Si dices tener una aplicaicón que ya monitoriza todo eso por ti durante la instalación, pues entonces eso es lo que necesitas.
..Ahora, si se trata de un programa sencillo, pues es suficiente con copiar el contenido del directorio de la aplicación, y hacer tu portable, con Winrar por ejemplo (para newbies).
Saludos!
|
|
|
8863
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets)
|
en: 28 Junio 2013, 18:27 pm
|
Un ListView extendido para monitorizar cuando se añade y cuando se elimina un Item. MUY IMPORTANTE: Hay que utilizar los nuevos métodos (AddItem, RemoveItem) en lugar de usar el antiguo ...items.Add o ...items.Remove, para que funcione. PD: Si alguien sabe como overridearlos de forma correcta que lo diga  ' /* *\ ' |#* ListView Elektro *#| ' \* */ ' ' // By Elektro H@cker ' ' Properties: ' ........... ' · Disable_Flickering ' · Double_Buffer ' ' Events: ' ....... ' · ItemAdded ' · ItemRemoved ' ' Methods: ' ....... ' · AddItem ' · RemoveItem Public Class ListView_Elektro : Inherits ListView Public Event ItemAdded() Public Event ItemRemoved() Private _Disable_Flickering As Boolean = True Public Sub New() Me.Name = "ListView_Elektro" Me.DoubleBuffered = True ' Me.GridLines = True ' Me.MultiSelect = True ' Me.FullRowSelect = True ' Me.View = View.Details End Sub #Region " Properties " ''' <summary> ''' Enable/Disable any flickering effect on the ListView. ''' </summary> Protected Overrides ReadOnly Property CreateParams() As CreateParams Get If _Disable_Flickering Then Dim cp As CreateParams = MyBase.CreateParams cp.ExStyle = cp.ExStyle Or &H2000000 Return cp Else Return MyBase.CreateParams End If End Get End Property ''' <summary> ''' Set the Double Buffer. ''' </summary> Public Property Double_Buffer() As Boolean Get Return Me.DoubleBuffered End Get Set(ByVal Value As Boolean) Me.DoubleBuffered = Value End Set End Property ''' <summary> ''' Enable/Disable the flickering effects on this ListView. ''' ''' This property turns off any Flicker effect on the ListView ''' ...but also reduces the performance (speed) of the ListView about 30% slower. ''' This don't affect to the performance of the application itself, only to the performance of this control. ''' </summary> Public Property Disable_Flickering() As Boolean Get Return _Disable_Flickering End Get Set(ByVal Value As Boolean) Me._Disable_Flickering = Value End Set End Property #End Region #Region " Methods " ''' <summary> ''' Add an item to the ListView. ''' </summary> Public Function AddItem(ByVal Text As String) As ListViewItem RaiseEvent ItemAdded() Return MyBase.Items.Add(Text) End Function ''' <summary> ''' Remove an item from the ListView. ''' </summary> Public Sub RemoveItem(ByVal Item As ListViewItem) RaiseEvent ItemRemoved() MyBase.Items.Remove(Item) End Sub #End Region End Class
Ejemplo de uso: #Region " [ListView Elektro] Monitor Item added-removed " ' [ListView Elektro] Monitor Item added-removed ' ' // By Elektro H@cker Private Sub Main_Load(sender As Object, e As EventArgs) Handles MyBase.Shown Dim Item As ListViewItem = ListView1.AddItem("Test") ' Add the item ListView1.RemoveItem(Item) ' Remove the item End Sub Private Sub ListView_ItemChanged() Handles ListView1.ItemAdded, ListView1.ItemRemoved ' I check if exists at least 1 item inside the ListView If ListView1.Items.Count <> 1 Then MsgBox("Listview have items.") Else MsgBox("Listview is empty.") End Sub #End Region
|
|
|
8864
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets)
|
en: 28 Junio 2013, 17:03 pm
|
A ti te dejan doble postear?  No lo considero doble-postear, posteo cuando tengo un nuevo snippet o una cantidad de snippets, a veces me los creo/consigo de 1 en 1 o de 5 en 5, nunca se sabe... PD: A mi no me trollees xD
¿En la del listview no se puede hacer listview.items.indexof("txt")? ¿o utiliza algún tipo de encapsulación distinta al string cada item? El ...IndexOf("text") rquiere pasarle un "ListiewItem", no he podido pasarle un string para probar. PD: A ver si consigues mejorarlo tu  un saludo!
|
|
|
8866
|
Programación / .NET (C#, VB.NET, ASP) / Re: Dar margin a un texto dentro de un TextBox?
|
en: 28 Junio 2013, 16:49 pm
|
Como ves donde está el texto que pone mi nombre, está muy pegado al borde del TextBox, por no decir que está junto.  Eso quiero separarlo.  . . . Lee las propiedades del textbox, pero no busques por "margen" sinó por "alinear" Edito: También influye en el margen que tipo de borde estés usando "borderstyle", y bueno... el margen opcional se lo puedes añadir con espacios. saludos!
|
|
|
8868
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets)
|
en: 28 Junio 2013, 16:30 pm
|
[Textbox] Show end part of text Este snippet no se muy bien como explicarlo en pocas palabras, así que lo voy a explicar con imágenes... Cuando excedemos el límite visible del textbox, la parte del final, es decir la parte derecha no se muestra:  Pues con este snippet omitiremos la parte de la izquierda, mostrando hasta la parte final del texto:  Private Sub TextBox_TextChanged(sender As Object, e As EventArgs) _ Handles TextBox1.TextChanged ' If the text reaches the writable box size then this shows the end part of the text. sender.Select(sender.TextLength, sender.TextLength) End Sub
Saludos!
|
|
|
8869
|
Programación / .NET (C#, VB.NET, ASP) / Re: Insertar <Script> en VB.NET
|
en: 28 Junio 2013, 16:18 pm
|
Añado: Además lo del html 5 solo funcionará si en el equipo se dispone de iexplorer 9 o superior (creo que el soporte para HTML 5 empezaba desde la versión ie9, corregirme si me equivoco).
EDITO: sería más factible hardcodearlo, ¿no?, un par de trackbars y de botones, y listo!
Saludos!
|
|
|
8870
|
Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets !! (Posteen aquí sus snippets)
|
en: 28 Junio 2013, 12:34 pm
|
Función para comprobar si un ListView contiene cierto texto: PD: La verdad es que no es muy útil a menos que le añada más opciones, la hice porque muchas veces se me olvida el nombre del método "FindItemWithText" y eso me hace perder tiempo  #Region " Find ListView Text " ' [ Find ListView Text Function ] ' ' // By Elektro H@cker ' ' Examples : ' MsgBox(Find_ListView_Text(ListView1, "Hello")) ' If Find_ListView_Text(ListView1, "Hello") Then... Private Function Find_ListView_Text(ByVal ListView As ListView, ByVal Text As String) As Boolean Try : Return Convert.ToBoolean(ListView.FindItemWithText(Text)) : Catch : Return True : End Try End Function #End Region
Ejemplo de uso: Private Sub Status_Timer_Tick(sender As Object, e As EventArgs) Handles Status_Timer.Tick If Find_ListView_Text(ListView1, TextBox_Filename.Text) Then Label_Status.Text = "Current song found" Else Label_Status.Text = "Current song not found" End If End Sub
|
|
|
|
|
|
|