Ver Mensaje Individual
  #7 (permalink)  
Antiguo 02/06/2005, 12:16
MaxExtreme
 
Fecha de Ingreso: abril-2005
Mensajes: 3.083
Antigüedad: 20 años, 1 mes
Puntos: 17
Cita:
Iniciado por newton666
Hola MaxExtreme, veras, a lo mejor no me he explicado bien y donde digo preciso quiero decir concreto. Es decir, algo así como "la función tal sirve para esto y aquello, no sirve para nada más. Para esto tiene que ponerle los siguiente parámetros y para aquello tiene que ponerle estos otros". Después se explica qué es cada parámetro. Eso es para mí ser «preciso» o «concreto». De todas formas es un buen consejo el de empezar con funciones sencillas. Lo seguiré y ya os contaré que tal me ha ido. Muchas gracias a todos por las molestias y los consejos. Un saludo.
Pues simplemente es leer... Sé que es duro que te lo "espeten" tan técnicamente, pero se debe hacer así. Cuando llevas tiempo programando en algo no quieres un tutorial ameno, quieres ir al grano :)

Por ejemplo, MessageBox:

Cita:
Iniciado por MSDN
Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Long
Const MB_DEFBUTTON1 = &H0&
Const MB_DEFBUTTON2 = &H100&
Const MB_DEFBUTTON3 = &H200&
Const MB_ICONASTERISK = &H40&
Const MB_ICONEXCLAMATION = &H30&
Const MB_ICONHAND = &H10&
Const MB_ICONINFORMATION = MB_ICONASTERISK
Const MB_ICONQUESTION = &H20&
Const MB_ICONSTOP = MB_ICONHAND
Const MB_OK = &H0&
Const MB_OKCANCEL = &H1&
Const MB_YESNO = &H4&
Const MB_YESNOCANCEL = &H3&
Const MB_ABORTRETRYIGNORE = &H2&
Const MB_RETRYCANCEL = &H5&

The MessageBox function creates, displays, and operates a message box. The message box contains an application-defined message and title, plus any combination of predefined icons and push buttons.

· hWnd
Identifies the owner window of the message box to be created. If this parameter is NULL, the message box has no owner window.

· lpText
Points to a null-terminated string containing the message to be displayed.

· lpCaption
Points to a null-terminated string used for the dialog box title. If this parameter is NULL, the default title Error is used.

· uType
Specifies a set of bit flags that determine the contents and behavior of the dialog box. This parameter can be a combination of flags from the following groups of flags.

(...)
MB_OK
The message box contains one push button: OK. This is the default.
(...)
Pues con esto ya puedes trabajar. Pones en el módulo la declaración y las constantes, y llamas a la función:

Primer parámetro: El manejador de la ventana - Simplemente Me.hWnd para obtener el de tu formulario.
Segundo parámetro: El texto - "Hola mundo"
Tercer parámetro: El título - "Mensaje!!"
Cuarto parámetro: El tipo - MB_OK para una estándar.

Resultado de todo esto:

Código:
MessageBox Me.hWnd, "Hola mundo", "Mensaje!!", MB_OK
Ya está. :) Preciso, concreto y rápido. Ya tienes tu caja :) ¿Quién da más?