|
|
|
вызвать Msgbox
|
|||
|---|---|---|---|
|
#18+
из VB управляю экселом если сделать в VB так : If MsgBox("Вся информация на активном листе эксел будет уничтожена. Подтвердите. ", vbYesNo) = vbNo Then Exit Sub то окна сообщения не видно потому что активно окно приложения эксель а сообщение идет от окна VB проекта. нужно чтобы эксель выдавал ... If xl.vba.MsgBox("Вся информация на активном листе эксел будет уничтожена. Подтвердите. ", vbYesNo) = vbNo Then Exit Sub не прокатывает .. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.09.2005, 14:35:39 |
|
||
|
вызвать Msgbox
|
|||
|---|---|---|---|
|
#18+
как вариант - посмотри в MSDN статью HOWTO: Position a MsgBox Using a Windows Hook Procedure ID: Q180936 Должно бы прокатить, с поправкой на определение текущего активного окна. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.09.2005, 14:48:29 |
|
||
|
вызвать Msgbox
|
|||
|---|---|---|---|
|
#18+
Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. а это не годится? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.09.2005, 15:57:30 |
|
||
|
вызвать Msgbox
|
|||
|---|---|---|---|
|
#18+
константы Private Const MB_ABORTRETRYIGNORE As Long = &H2& Private Const MB_APPLMODAL As Long = &H0& Private Const MB_CANCELTRYCONTINUE As Long = &H6& Private Const MB_COMPOSITE As Long = &H2 Private Const MB_DEFAULT_DESKTOP_ONLY As Long = &H20000 Private Const MB_DEFBUTTON1 As Long = &H0& Private Const MB_DEFBUTTON2 As Long = &H100& Private Const MB_DEFBUTTON3 As Long = &H200& Private Const MB_DEFBUTTON4 As Long = &H300& Private Const MB_DEFMASK As Long = &HF00& Private Const MB_ERR_INVALID_CHARS As Long = &H8 Private Const MB_FUNC As Long = &H4000 Private Const MB_FUNC_STR As String = "mb" Private Const MB_HELP As Long = &H4000& Private Const MB_ICONASTERISK As Long = &H40& Private Const MB_ICONERROR As Long = MB_ICONHAND Private Const MB_ICONEXCLAMATION As Long = &H30& Private Const MB_ICONHAND As Long = &H10& Private Const MB_ICONINFORMATION As Long = MB_ICONASTERISK Private Const MB_ICONMASK As Long = &HF0& Private Const MB_ICONQUESTION As Long = &H20& Private Const MB_ICONSTOP As Long = MB_ICONHAND Private Const MB_ICONWARNING As Long = MB_ICONEXCLAMATION Private Const MB_MISCMASK As Long = &HC000& Private Const MB_MODEMASK As Long = &H3000& Private Const MB_NOFOCUS As Long = &H8000& Private Const MB_OK As Long = &H0& Private Const MB_OKCANCEL As Long = &H1& Private Const MB_PRECOMPOSED As Long = &H1 Private Const MB_RETRYCANCEL As Long = &H5& Private Const MB_RIGHT As Long = &H80000 Private Const MB_RTLREADING As Long = &H100000 Private Const MB_SERVICE_NOTIFICATION As Long = &H40000 Private Const MB_SERVICE_NOTIFICATION_NT3X As Long = &H40000 Private Const MB_SETFOREGROUND As Long = &H10000 Private Const MB_SYSTEMMODAL As Long = &H1000& Private Const MB_TASKMODAL As Long = &H2000& Private Const MB_TOPMOST As Long = &H40000 Private Const MB_TYPEMASK As Long = &HF& Private Const MB_USEGLYPHCHARS As Long = &H4 Private Const MB_USERICON As Long = &H80& Private Const MB_YESNO As Long = &H4& Private Const MB_YESNOCANCEL As Long = &H3& описание MessageBox This 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. int MessageBox( HWND hWnd, LPCTSTR lpText, LPCTSTR lpCaption, UINT uType); Parameters hWnd [in] Handle to the owner window of the message box to be created. If this parameter is NULL, the message box has no owner window. lpText [in] Long pointer to a null-terminated string that contains the message to be displayed. lpCaption [in] Long pointer to a null-terminated string used for the dialog box title. If this parameter is NULL, the default title “Error” is used. uType [in] 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. Specify one of the following flags to indicate the buttons contained in the message box: Value Description MB_ABORTRETRYIGNORE The message box contains three push buttons: Abort, Retry, and Ignore. MB_OK The message box contains one push button: OK. This is the default. MB_OKCANCEL The message box contains two push buttons: OK and Cancel. MB_RETRYCANCEL The message box contains two push buttons: Retry and Cancel. MB_YESNO The message box contains two push buttons: Yes and No. MB_YESNOCANCEL The message box contains three push buttons: Yes, No, and Cancel. Specify one of the following flags to display an icon in the message box: Value Description MB_ICONEXCLAMATION, MB_ICONWARNING An exclamation-point icon appears in the message box. MB_ICONINFORMATION, MB_ICONASTERISK An icon consisting of a lowercase letter i in a circle appears in the message box. MB_ICONQUESTION A question-mark icon appears in the message box. MB_ICONSTOP, MB_ICONERROR, MB_ICONHAND A stop-sign icon appears in the message box. Specify one of the following flags to indicate the default button: Value Description MB_DEFBUTTON1 The first button is the default button. MB_DEFBUTTON1 is the default unless MB_DEFBUTTON2, MB_DEFBUTTON3, or MB_DEFBUTTON4 is specified. MB_DEFBUTTON2 The second button is the default button. MB_DEFBUTTON3 The third button is the default button. MB_DEFBUTTON4 The fourth button is the default button. The following flag is the default modality of the dialog box: Value Description MB_APPLMODAL The user must respond to the message box before continuing work in the window identified by the hWnd parameter. However, the user can move to the windows of other threads and work in those windows. Depending on the hierarchy of windows in the application, the user may be able to move to other windows within the thread. All child windows of the parent of the message box are automatically disabled, but popup windows are not. In addition, you can specify the following flags: Value Description MB_SETFOREGROUND The message box becomes the foreground window. Internally, the system calls the SetForegroundWindow function for the message box. MB_TOPMOST The message box is created with the WS_EX_TOPMOST window style. Return Values Zero indicates that there is not enough memory to create the message box. Upon success, one of the values described in the following table is returned. Value Description IDABORT Abort button was selected. IDCANCEL Cancel button was selected. IDIGNORE Ignore button was selected. IDNO No button was selected. IDOK OK button was selected. IDRETRY Retry button was selected. IDYES Yes button was selected. If a message box has a Cancel button, the function returns the IDCANCEL value if either the ESC key is pressed or the Cancel button is selected. If the message box has no Cancel button, pressing ESC has no effect. Remarks If you create a message box while a dialog box is present, use the handle of the dialog box as the hWnd parameter. The hWnd parameter should not identify a child window, such as a control in a dialog box. Requirements Runs on Versions Defined in Include Link to Windows CE OS 1.0 and later Winuser.h Msgbox.lib Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API. See Also MessageBeep, SetForegroundWindow ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.09.2005, 16:04:55 |
|
||
|
|

start [/forum/topic.php?fid=61&gotonew=1&tid=2185731]: |
0ms |
get settings: |
7ms |
get forum list: |
14ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
72ms |
get topic data: |
9ms |
get first new msg: |
8ms |
get forum data: |
2ms |
get page messages: |
43ms |
get tp. blocked users: |
1ms |
| others: | 242ms |
| total: | 404ms |

| 0 / 0 |
