miércoles, 19 de febrero de 2020

Eliminar todos los tabpage

TabControl1.TabPages.Clear()

ruta carpeta

 Private Sub btn_examinar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_examinar.Click
        If FolderBrowserDialog1.ShowDialog() = DialogResult.OK Then
            tb_carpeta.Text = FolderBrowserDialog1.SelectedPath
        End If
    End Sub

lunes, 17 de febrero de 2020

Error al abrir proyecto windows service




Solución: abrir el archivo *.vdproj y borrar las siguientes líneas

"SccProjectName" = "8:"
"SccLocalPath" = "8:"
"SccAuxPath" = "8:"
"SccProvider" = "8:"

Si no funciona, abrir nuevamente el proyecto...


fuente

martes, 11 de febrero de 2020

Desinstalar servicio


Agregar a las referencias: System.ServiceProcess


Imports System.ServiceProcess
Import  System.Configuration.Install


  Try
            Dim ObjServiceInstaller As New ServiceInstaller
            Dim context As InstallContext = New InstallContext("log.txt", Nothing)
            ObjServiceInstaller.Context = context
            ObjServiceInstaller.ServiceName = "Service1"
            ObjServiceInstaller.Uninstall(Nothing)
        Catch ex As Exception
        End Try



fuente