hacker


Ingresar con nombre de usuario, contraseña y duración de la sesión
| Portal Hacker | Editorial | Descargas | Ezine |
Inicio Ayuda Ingresar Registrarse
14 de Octubre de 2008, 04:30:29
Noticias: La 1era E-Zine de CPH ya fue liberada, encuentrala
Para ver este enlace Registrate o Inicia Sesion
> aquí

+  Foros pOrtal Hacker
|-+  Programacion
| |-+  Programación en general
| | |-+  Visual Basic (Moderadores: ranefi, crypto136, ziBboh, >> s E t H <<)
| | | |-+  Información de Tarjeta Madre
0 Usuarios y 1 Visitante están viendo este tema. « anterior próximo »
Páginas: [1] Ir Abajo Imprimir
Autor Tema: Información de Tarjeta Madre  (Leído 489 veces)
ebb
NZ1
*
Desconectado Desconectado

Mensajes: 30

Member, pOrtal HAcker


Ver Perfil
« : 09 de Abril de 2006, 07:43:09 »

necesito un codigo que me muestre informacion de la board del pc
« Última modificación: 10 de Abril de 2006, 04:19:00 por ranefi » En línea
ranefi
Moderador Global
*****
Desconectado Desconectado

Mensajes: 1,191


SELECT * FROM guapos WHERE papito_chulo = 'ranefi'


Ver Perfil WWW
« Respuesta #1 : 10 de Abril de 2006, 07:13:38 »

Hola ebb, buen día. Lleva a cabo lo siguiente:

Ir al menú Proyecto---->Referencias y seleccionar Microsoft WMI Scripting V1.2 Library

Agregar un control ListView, 1 CommandButton e REPLACEar el siguiente código

Código:

Private Declare Function SendMessage Lib "user32" _
   Alias "SendMessageA" _
  (ByVal hwnd As Long, _
   ByVal wMsg As Long, _
   ByVal wParam As Long, _
   lParam As Any) As Long

Private Const LVM_FIRST As Long = &H1000
Private Const LVM_SETCOLUMNWIDTH As Long = (LVM_FIRST + 30)
Private Const LVSCW_AUTOSIZE As Long = -1
Private Const LVSCW_AUTOSIZE_USEHEADER As Long = -2


Private Sub wmiBiosInfo()
On Local Error Resume Next
   Dim BiosSet As SWbemObjectSet
   Dim bios As SWbemObject
   Dim itmx As ListItem
   Dim cnt As Long
   Dim msg As String
   
   Set BiosSet = _
    GetObject("winmgmts:{impersonationLevel=impersonate}"). _
        InstancesOf("Win32_BIOS")
   
   For Each bios In BiosSet
      Set itmx = ListView1.ListItems.Add(, , "BIOSPrimario")
      itmx.SubItems(1) = bios.PrimaryBIOS
           
      Set itmx = ListView1.ListItems.Add(, , "Estado")
      itmx.SubItems(1) = bios.Status
     
      For cnt = LBound(bios.BIOSVersion) To UBound(bios.BIOSVersion)
         Set itmx = ListView1.ListItems.Add(, , IIf(cnt = 0, "VersiónBIOS", ""))
         itmx.SubItems(1) = bios.BIOSVersion(cnt)
      Next
     
      Set itmx = ListView1.ListItems.Add(, , "Título")
      itmx.SubItems(1) = bios.Caption
     
      Set itmx = ListView1.ListItems.Add(, , "Descripción")
      itmx.SubItems(1) = bios.Description
     
      Set itmx = ListView1.ListItems.Add(, , "Nombre")
      itmx.SubItems(1) = bios.Name

      Set itmx = ListView1.ListItems.Add(, , "Manufacturador")
      itmx.SubItems(1) = bios.Manufacturer

      Set itmx = ListView1.ListItems.Add(, , "FechaLanzamiento")
      itmx.SubItems(1) = bios.ReleaseDate

      Set itmx = ListView1.ListItems.Add(, , "NúmeroSerie")
      itmx.SubItems(1) = bios.SerialNumber

      Set itmx = ListView1.ListItems.Add(, , "SMBIOSBIOSVersión")
      itmx.SubItems(1) = bios.SMBIOSBIOSVersion
     
      Set itmx = ListView1.ListItems.Add(, , "SMBIOSMajorVersión")
      itmx.SubItems(1) = bios.SMBIOSMajorVersion
     
      Set itmx = ListView1.ListItems.Add(, , "SMBIOSMinorVersión")
      itmx.SubItems(1) = bios.SMBIOSMinorVersion

      Set itmx = ListView1.ListItems.Add(, , "SMBIOSPresente")
      itmx.SubItems(1) = bios.SMBIOSPresent
     
      Set itmx = ListView1.ListItems.Add(, , "SoftwareElementID")
      itmx.SubItems(1) = bios.SoftwareElementID
     
      Set itmx = ListView1.ListItems.Add(, , "SoftwareElementState")
      Select Case bios.SoftwareElementState
         Case 0: msg = "deployable"
         Case 1: msg = "installable"
         Case 2: msg = "executable"
         Case 3: msg = "running"
      End Select
      itmx.SubItems(1) = msg
     
      Set itmx = ListView1.ListItems.Add(, , "Versión")
      itmx.SubItems(1) = bios.Version

      Set itmx = ListView1.ListItems.Add(, , "IdiomasInstalables")
      itmx.SubItems(1) = bios.InstallableLanguages

      Set itmx = ListView1.ListItems.Add(, , "IdiomaActual")
      itmx.SubItems(1) = bios.CurrentLanguage
       
      For cnt = LBound(bios.ListOfLanguages) To UBound(bios.ListOfLanguages)
     
         Set itmx = ListView1.ListItems.Add(, , IIf(cnt = 0, "ListaIdiomas", ""))
         itmx.SubItems(1) = bios.ListOfLanguages(cnt)
         
      Next cnt

      For cnt = LBound(bios.BiosCharacteristics) To UBound(bios.BiosCharacteristics)
     
         Set itmx = ListView1.ListItems.Add(, , IIf(cnt = 0, "CaracterísticasBIOS", ""))
     
         Select Case bios.BiosCharacteristics(cnt)
            Case 0: msg = "reservedo"
            Case 1: msg = "reservedo"
            Case 2: msg = "Desconocido"
            Case 3: msg = "Características de BIOS no soportadas"
            Case 4: msg = "ISA soportado"
            Case 5: msg = "MCA soportado"
            Case 6: msg = "EISA soportado"
            Case 7: msg = "PCI soportado"
            Case 8: msg = "Tarjeta PC (PCMCIA) soportada"
            Case 9: msg = "Plug and Play soportado"
            Case 10: msg = "APM está soportado"
            Case 11: msg = "BIOS actualizable (Flash)"
            Case 12: msg = "BIOS shadowing permitido"
            Case 13: msg = "VL-VESA soportado"
            Case 14: msg = "Soporte ESCD permitido"
            Case 15: msg = "Arranque de CD soportado"
            Case 16: msg = "Selección de Arranque soportado"
            Case 17: msg = "BIOS ROM socketed"
            Case 18: msg = "Arrancar desde PC card (PCMCIA) soportado"
            Case 19: msg = "EDD (Enhanced Disk Drive) especificación soportada"
            Case 20: msg = "Int 13h, Japanese Floppy for NEC 9800 1.2mb (3.5, 1k b/s, 360 RPM) supported"
            Case 21: msg = "Int 13h, Japanese Floppy for Toshiba 1.2mb (3.5, 360 RPM) supported"
            Case 22: msg = "Int 13h, 5.25 / 360 KB floppy services supported"
            Case 23: msg = "Int 13h, 5.25 /1.2MB floppy services supported"
            Case 24: msg = "Int 13h 3.5 / 720 KB floppy services supported"
            Case 25: msg = "Int 13h, 3.5 / 2.88 MB floppy services supported"
            Case 26: msg = "Int 5h, print screen service supported"
            Case 27: msg = "Int 9h, 8042 keyboard services supported"
            Case 28: msg = "Int 14h, serial services supported"
            Case 29: msg = "Int 17h, printer services supported"
            Case 30: msg = "Int 10h, CGA/Mono video aervices supported"
            Case 31: msg = "NEC PC-98"
            Case 32: msg = "ACPI soportado"
            Case 33: msg = "USB Legacy soportado"
            Case 34: msg = "AGP soportado"
            Case 35: msg = "I2O boot soportado"
            Case 36: msg = "LS-120 boot soportado"
            Case 37: msg = "ATAPI ZIP drive boot soportado"
            Case 38: msg = "1394 boot soportado"
            Case 39: msg = "Smart battery soportado"
         End Select
         
         itmx.SubItems(1) = msg
         
      Next  'For cnt
     
   Next  'For Each bios

End Sub

Private Sub Command1_Click()
    With ListView1
      .ListItems.Clear
      .ColumnHeaders.Clear
      .ColumnHeaders.Add , , "WMI Property"
      .ColumnHeaders.Add , , "Value(s)"
      .View = lvwReport
      .Sorted = False
    End With
    ListView1.ListItems.Clear
   
    Call wmiBiosInfo
    Call lvAutosizeControl(ListView1)
End Sub

Private Sub lvAutosizeControl(lv As ListView)
   Dim col2adjust As Long
   
   For col2adjust = 0 To lv.ColumnHeaders.Count - 1
      Call SendMessage(lv.hwnd, _
                       LVM_SETCOLUMNWIDTH, _
                       col2adjust, _
                       ByVal LVSCW_AUTOSIZE_USEHEADER)
   Next
End Sub


Espero que te sea de utilidad.

PD: Cambia el título de tu mensaje con algo que lo relacione a tu pregunta. Te recomiendo leer las
Para ver este enlace Registrate o Inicia Sesion
Reglas de la sección de Visual Basic
. Nos vemos.
« Última modificación: 03 de Mayo de 2006, 06:58:34 por ranefi » En línea


SELECT * FROM mejores_batos_ del_mundo WHERE id = (SELECT DISTINCT id_guapo FROM los_mas_guapos _del_mundo WHERE papito_chulo = 'ranefi')
N@5h
Recien llegado
*
Desconectado Desconectado

Mensajes: 3


Ver Perfil
« Respuesta #2 : 02 de Mayo de 2006, 11:09:34 »

me tira error en esta linea


Código:
Private Sub lvAutosizeControl(lv As ListView)

que puedo aser para solucionarlo??

by Saludos..
En línea

ranefi
Moderador Global
*****
Desconectado Desconectado

Mensajes: 1,191


SELECT * FROM guapos WHERE papito_chulo = 'ranefi'


Ver Perfil WWW
« Respuesta #3 : 03 de Mayo de 2006, 07:02:28 »

Me faltó algo muy importante, deben Ir al menú Proyecto---->Referencias y seleccionar Microsoft WMI Scripting V1.2 Library, posteriormente introducir el codigo. Con respecto a tu problema N@5h te recomiendo que agregues el control ListView que se encuentra en Proyecto----->Componentes y seleccionar Microsoft Windows Common Controls 6.0 (SP4).     ¡Ah! Y bienvenido al foro.




PD: Ya modifiqué mi mensaje anterior.
En línea


SELECT * FROM mejores_batos_ del_mundo WHERE id = (SELECT DISTINCT id_guapo FROM los_mas_guapos _del_mundo WHERE papito_chulo = 'ranefi')
Páginas: [1] Ir Arriba Imprimir 
« anterior próximo »
Ir a:  


Ingresar con nombre de usuario, contraseña y duración de la sesión

Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC hacker

Juegos gratis - Articulos PHP - Juegos - Trucos - Letras - Juegos - Juegos Online