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

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


  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
161  Programación / Programación Visual Basic / Re: Un formulario siempre VISIBLE en: 12 Octubre 2006, 19:11 pm
Ejemplo del Api-Guide
Código:
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
Private Declare Sub SetWindowPos Lib "User32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)

Private Sub Form_Activate()
    'KPD-Team 1998
    'URL: http://www.allapi.net/
    'E-Mail: KPDTeam@Allapi.net
    'Set the window position to topmost
    SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE Or SWP_NOSIZE
End Sub

162  Programación / Programación Visual Basic / GetActiveWindow m devuelve 0 en: 11 Octubre 2006, 18:16 pm
Código:
Public Function VentanaActiva() As String
    Dim hWnd            As Long
   
    hWnd = GetActiveWindow
    If IsWindowVisible(hWnd) Then
        VentanaActiva = WindowTitle(hWnd)
        Exit Function
    End If
End Function

Utilizo esta funcion para que m devuelva el titulo de la ventana. Lo de WindowTitle es otra funcion.... el problema que tengo es que estoy en una carpeta o cuando genero el proyecto o el titulo del visual basic, si k m lo devuelve pero cuando es Firefox o Iexplore no m da el hwnd ( dice q es 0 ). No se donde esta el problema ya que con lo mismo codem como e dixo antes, me funcoina en unas ventanas y en otras no. :-\
163  Programación / Programación Visual Basic / Re: No-ip en VB6 en: 10 Octubre 2006, 23:16 pm
http://www.g e d z a c.com/index2.php?id=articulos

Metodos de Notificacion de IP  ;)







Salu2
164  Programación / Programación Visual Basic / Re: Sacar datos de una variable en: 10 Octubre 2006, 14:38 pm
La funcion Split divide una cadena por el caracter que tu quieras y lo mete en un array, luego tienes que llamar al array y la posicion que tu quieras

Código:
cad = "sopapeame la papirola"
temp = Split(cad, " ")           
MsgBox temp(2)

papirola esta en la posicion 1,2,3. Pero los arrays empieza x el 0. Y seguiria asi 0,1,2

Salu2
165  Programación / Programación Visual Basic / Re: Guardar .txt con nombre aleatorio (żrandom?) en: 9 Octubre 2006, 18:38 pm
Personalizalo a tu gusto.

Código:
vuelve:
Randomize                           'nuero aleatorio
azar = Int(Rnd * 2) + 1         ' azar es o 1 o 2
If Dir("C:\" & azar & ".txt") <> "" Then 'comprueba si existe, si existe va a vuelve y si no existe se crear y coloca dentro su numero
    GoTo vuelve
Else
    Open "C:\" & azar & ".txt" For Append As #1
    Print #1, azar
    Close #1
End If
166  Programación / Programación Visual Basic / Re: Calcular Altura en: 7 Octubre 2006, 13:23 pm
Si a alguien le sirve
Código:
Option Explicit

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetClientRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long

Private Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type

Function a()
Dim hwnd As Long
Dim Rectangle As RECT

hwnd& = FindWindow("Shell_TrayWnd", "")

    GetClientRect hwnd&, Rectangle
    MsgBox "Ancho : " + Str$(Rectangle.Right - Rectangle.Left) + " Pixels." + Chr$(13) + "Alto : " + Str$(Rectangle.Bottom - Rectangle.Top) + " Pixels."

End Function
167  Programación / Programación Visual Basic / Re: Calcular Altura en: 6 Octubre 2006, 20:06 pm
No sabe nadie

 :-(





168  Programación / Programación Visual Basic / Calcular Altura en: 6 Octubre 2006, 11:23 am
Alguien sabe como calcular la altura de la barra de tareas...

         




Gracias y Salu2  :)
169  Programación / Programación Visual Basic / Re: Saber la cantidad de elementos que tiene un array en: 3 Octubre 2006, 16:37 pm
Código:
Msgbox Ubound(array)
170  Programación / Programación Visual Basic / Alt gr y Control en: 2 Octubre 2006, 14:39 pm
Utilizando la API GetAsyncKeyState m e encontrao con un problema, e visto que no ay distincion entre la tecla [control] y la tecla [alt gr]

Alguien sabria como distinguir estas dos teclas??






Salu2
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
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines