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

 

 


Tema destacado: Guía rápida para descarga de herramientas gratuitas de seguridad y desinfección


  Mostrar Mensajes
Páginas: 1 ... 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 [29] 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 ... 65
281  Programación / Programación Visual Basic / Re: Minizar form y ponerlo al lado del reloj en: 1 Septiembre 2010, 17:29 pm
xkiz > por alguna razon nunca puedo ver paginas de support.microsoft =S.

pongo aca el code que muestra  Microsoft:

Código
  1. 'user defined type required by Shell_NotifyIcon API call
  2. Public Type NOTIFYICONDATA
  3.    cbSize As Long
  4.    hwnd As Long
  5.    uId As Long
  6.    uFlags As Long
  7.    uCallBackMessage As Long
  8.    hIcon As Long
  9.    szTip As String * 64
  10. End Type
  11.  
  12. 'constants required by Shell_NotifyIcon API call:
  13. Public Const NIM_ADD = &H0
  14. Public Const NIM_MODIFY = &H1
  15. Public Const NIM_DELETE = &H2
  16. Public Const NIF_MESSAGE = &H1
  17. Public Const NIF_ICON = &H2
  18. Public Const NIF_TIP = &H4
  19. Public Const WM_MOUSEMOVE = &H200
  20. Public Const WM_LBUTTONDOWN = &H201     'Button down
  21. Public Const WM_LBUTTONUP = &H202       'Button up
  22. Public Const WM_LBUTTONDBLCLK = &H203   'Double-click
  23. Public Const WM_RBUTTONDOWN = &H204     'Button down
  24. Public Const WM_RBUTTONUP = &H205       'Button up
  25. Public Const WM_RBUTTONDBLCLK = &H206   'Double-click
  26.  
  27. Public Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
  28. Public Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
  29.  
  30. Public nid As NOTIFYICONDATA
  31.  

Código
  1. Private Sub Form_Load()
  2.       'the form must be fully visible before calling Shell_NotifyIcon
  3. Me.Show
  4. Me.Refresh
  5. With nid
  6.    .cbSize = Len(nid)
  7.    .hwnd = Me.hwnd
  8.    .uId = vbNull
  9.    .uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
  10.    .uCallBackMessage = WM_MOUSEMOVE
  11.    .hIcon = Me.Icon
  12.    .szTip = "Your ToolTip" & vbNullChar
  13. End With
  14. Shell_NotifyIcon NIM_ADD, nid
  15. End Sub
  16.  
  17. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  18. 'this procedure receives the callbacks from the System Tray icon.
  19. Dim Result As Long
  20. Dim msg As Long
  21. 'the value of X will vary depending upon the scalemode setting
  22. If Me.ScaleMode = vbPixels Then
  23.    msg = X
  24. Else
  25.    msg = X / Screen.TwipsPerPixelX
  26. End If
  27.  
  28. Select Case msg
  29.    Case WM_LBUTTONUP        '514 restore form window
  30.         Me.WindowState = vbNormal
  31.         Result = SetForegroundWindow(Me.hwnd)
  32.         Me.Show
  33.    Case WM_LBUTTONDBLCLK    '515 restore form window
  34.         Me.WindowState = vbNormal
  35.         Result = SetForegroundWindow(Me.hwnd)
  36.         Me.Show
  37.    Case WM_RBUTTONUP        '517 display popup menu
  38.         Result = SetForegroundWindow(Me.hwnd)
  39.         Me.PopupMenu Me.mPopupSys
  40. End Select
  41.  
  42. End Sub
  43.  
  44. Private Sub Form_Resize()
  45. 'this is necessary to assure that the minimized window is hidden
  46. If Me.WindowState = vbMinimized Then Me.Hide
  47. End Sub
  48.  
  49. Private Sub Form_Unload(Cancel As Integer)
  50. 'this removes the icon from the system tray
  51. Shell_NotifyIcon NIM_DELETE, nid
  52. End Sub
  53.  
  54. Private Sub mPopExit_Click()
  55. 'called when user clicks the popup menu Exit command
  56. Unload Me
  57. End Sub
  58.  
  59. Private Sub mPopRestore_Click()
  60. 'called when the user clicks the popup menu Restore command
  61. Dim Result As Long
  62. Me.WindowState = vbNormal
  63. Result = SetForegroundWindow(Me.hwnd)
  64. Me.Show
  65. End Sub
  66.  


282  Programación / Programación Visual Basic / Re: ayuda vb6 en: 1 Septiembre 2010, 17:20 pm
hay un programa que se llama Api Guide que tiene muchos ejemplo de Api de Windows, es una herramienta muy util para Visual Basic...
283  Sistemas Operativos / Windows / Re: como certificar windows xp en: 1 Septiembre 2010, 05:10 am
con un serial valido. hace mucho no utilizo XP ya, buscate en taringa o en google en si, alguno que no esta en l lista negra de Microsoft tiene que haber...
284  Programación / Programación Visual Basic / Re: Empaquetar aplicacion que incluye un control Webbrowser en: 1 Septiembre 2010, 05:08 am
mejor dicho, no es para nada recomendable usar el empaquetador que viene con Visual Basic 6.0
285  Programación / Programación Visual Basic / Re: ayuda vb6 en: 1 Septiembre 2010, 05:07 am
RegSetValueEx Function
286  Programación / Programación Visual Basic / Re: Minizar form y ponerlo al lado del reloj en: 1 Septiembre 2010, 05:02 am
Cómo usar la bandeja del sistema desde Visual Basic
287  Programación / Programación Visual Basic / Re: Empaquetar aplicacion que incluye un control Webbrowser en: 29 Agosto 2010, 06:13 am
tendria que bastar con solo la dll esa (shdocvw.dll).
288  Programación / Programación Visual Basic / Re: Empaquetar aplicacion que incluye un control Webbrowser en: 28 Agosto 2010, 08:47 am
al crear un instalador de un proyecto realizado con vb6, lo apropiado es incorporar los activex que utilizas en dicho proyecto, si no estas 100% seguro de cuales son, solo tenes que abrir el archivo.vbp, y mirar Referenc y Object, osea el archivo.vbp tiene la extructura de un archivo ini, por ejemplo:
Proyecto.vbp
Código
  1. Type=Exe
  2. Form=Form1.frm
  3. Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\Windows\SysWOW64\stdole2.tlb#OLE Automation
  4. Object={831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0; MSCOMCTL.OCX
  5. Startup="Form1"
  6. Command32=""
  7. Name="Proyecto1"
  8. HelpContextID="0"
  9. CompatibleMode="0"
  10. MajorVer=1
  11. MinorVer=0
  12. RevisionVer=0
  13. ; Resto del archivo de proyecto.vbp que no viene al caso poner aca
  14.  

la ubicacion exacta de cada archivo de Referenc u Object las podes encontrar en el registro de Windows en la siguiente rama:
"HKEY_CLASSES_ROOT\TypeLib\" mas la clave {xxxx-xxxxx-xxxx} y bajando un \ por cada # y finalizando con Win32

por ejemplo:
Citar
HKEY_CLASSES_ROOT\TypeLib\{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}\2.0\0\win32

bue en resumen aca dejo un programita que hice yo hace muchisimos años para rejuntar las dependencias de vb6.
el programa en si es un desastre pero hasta donde me acuerdo funcionaba casi bien.
Descargar: VB6RunTime.exe

NSIS es un muy buen generador de instaladores

PD: si usas alguna dll standar(no activex) no va a estar incluida en las referencias del proyecto pero esa tambien tiene que ser incluida en el instalador.
289  Sistemas Operativos / Windows / Re: Pasar a windows 7 en: 28 Agosto 2010, 05:27 am
VirtualBox
Windows Virtual PC
290  Programación / Programación Visual Basic / Re: Codigo al pedo :P en: 27 Agosto 2010, 22:36 pm
cual es el fin del post, osea es un aporte, consulta, o que?


:o
Encima se le olvido el:
Código
  1. Option Explicit

no es necesario ni obligatorio usar Option Explicit
Páginas: 1 ... 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 [29] 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 ... 65
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines