Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Message Box position

My MsgBox covers some data I want to see, is there a way to define a
position for it? Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default Message Box position

Hi John;
Private Declare Function UnhookWindowsHookEx Lib "user32" _
(ByVal hHook As Long) As Long
Private Declare Function GetCurrentThreadId Lib "kernel32" () As Long
Private Declare Function SetWindowsHookEx Lib "user32" Alias _
"SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long _
, ByVal hmod As Long, ByVal dwThreadId As Long) As Long
Private Declare Function 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) As Long
Private lgHook As Long

Sub Positionned_MsgBox()
lgHook = SetWindowsHookEx(&H5, AddressOf WinProc, 0, GetCurrentThreadId)
MsgBox "Special msgbox (Left = 100 / Top = 100) !", 64
End Sub

Private Function WinProc(ByVal lMsg As Long, ByVal wParam As Long) As Long
If lMsg = 5 Then
SetWindowPos wParam, 0, 100, 100, 0, 0, &H15
UnhookWindowsHookEx lgHook
End If
WinProc = False
End Function

Regards,
MP

"John Keturi" a écrit dans le message de
news:1bhcd.44666$hj.43803@fed1read07...
My MsgBox covers some data I want to see, is there a way to define a
position for it? Thanks




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Validation Input Message Box Position Frozen MM Phil Excel Discussion (Misc queries) 3 March 7th 08 05:57 PM
Change the position of a pop message splodgey Excel Discussion (Misc queries) 2 June 21st 07 01:47 PM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM
Displaying a message in a message box without requiring user to click anything to proceed Android[_2_] Excel Programming 2 June 25th 04 06:44 PM
Position of Message Box on screen Hotbird Excel Programming 0 August 21st 03 06:46 PM


All times are GMT +1. The time now is 06:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"