Can I control what text appears on msgbox function buttons?
Sure do like NOT having to build a form to show a msg
and solicit a YES/NO response. MsgBox function is a great solution
for that.
Sure would like NOT to have to build a form to show a msg
and solicit a BIG/LITTLE or ON/OFF or RED/BLUE response.
Wish I could pop up a msgbox and assign the text i wanted onto
the button(s). Possible? 17 2638
MLH wrote: Sure would like NOT to have to build a form to show a msg and solicit a BIG/LITTLE or ON/OFF or RED/BLUE response. Wish I could pop up a msgbox and assign the text i wanted onto the button(s). Possible?
AFAIK, No.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Alrighty then. I'll stick with msgbox 's like this...
"Do you want the big one? Press Yes for the
big one and No for the small one."
That'll continue to do the job for me. AFAIK, No.
Look at http://vbnet.mvps.org/code/hooks/messageboxhook.htm
Terry Kreft
"MLH" <CR**@NorthStat e.net> wrote in message
news:kn******** *************** *********@4ax.c om... Can I control what text appears on msgbox function buttons? Sure do like NOT having to build a form to show a msg and solicit a YES/NO response. MsgBox function is a great solution for that.
Sure would like NOT to have to build a form to show a msg and solicit a BIG/LITTLE or ON/OFF or RED/BLUE response. Wish I could pop up a msgbox and assign the text i wanted onto the button(s). Possible?
MLH wrote: Can I control what text appears on msgbox function buttons? Sure do like NOT having to build a form to show a msg and solicit a YES/NO response. MsgBox function is a great solution for that.
Sure would like NOT to have to build a form to show a msg and solicit a BIG/LITTLE or ON/OFF or RED/BLUE response. Wish I could pop up a msgbox and assign the text i wanted onto the button(s). Possible?
Visual Basic Graphics Programming:
Hands-on Applications and Advanced Color Development
Rod Stephens, 2nd Edition
Wiley Computer Publishing 1999
ISBN 0-471-35599-2
and
Win32 API Programming with Visual Basic
Steven Roman, First Edition
O'Reilly & Associates, Inc. 2000
ISBN: 1-56592-631-5
should contain enough information to allow a VBA programmer to change
the text of the command buttons on a MsgBox. I don't know if later
editions exist. I haven't tried this yet. It involves topics like
finding object handles, manipulating device contexts and subclassing.
Maybe I'll play around with it this weekend.
James A. Fortune
On Wed, 12 Oct 2005 22:50:15 +0100, "Terry Kreft"
<te*********@mp s.co.uk> wrote:
Alternatively write your own MsgBox function, launching your own modal
form, passing in (OpenArgs) your button texts, etc.
-Tom. Look at http://vbnet.mvps.org/code/hooks/messageboxhook.htm
Terry Kreft
"MLH" <CR**@NorthStat e.net> wrote in message news:kn******* *************** **********@4ax. com... Can I control what text appears on msgbox function buttons? Sure do like NOT having to build a form to show a msg and solicit a YES/NO response. MsgBox function is a great solution for that.
Sure would like NOT to have to build a form to show a msg and solicit a BIG/LITTLE or ON/OFF or RED/BLUE response. Wish I could pop up a msgbox and assign the text i wanted onto the button(s). Possible?
Tom,
The OP said he didn't really want to do this.
Terry Kreft
"Tom van Stiphout" <no************ *@cox.net> wrote in message
news:64******** *************** *********@4ax.c om... On Wed, 12 Oct 2005 22:50:15 +0100, "Terry Kreft" <te*********@mp s.co.uk> wrote:
Alternatively write your own MsgBox function, launching your own modal form, passing in (OpenArgs) your button texts, etc.
-Tom. Look at http://vbnet.mvps.org/code/hooks/messageboxhook.htm
Terry Kreft
"MLH" <CR**@NorthStat e.net> wrote in message news:kn****** *************** ***********@4ax .com... Can I control what text appears on msgbox function buttons? Sure do like NOT having to build a form to show a msg and solicit a YES/NO response. MsgBox function is a great solution for that.
Sure would like NOT to have to build a form to show a msg and solicit a BIG/LITTLE or ON/OFF or RED/BLUE response. Wish I could pop up a msgbox and assign the text i wanted onto the button(s). Possible?
Terry Kreft wrote: Look at http://vbnet.mvps.org/code/hooks/messageboxhook.htm
Hi Terry,
I seem to recall a few years ago on cdma a discussion on some issues
using windows hooks (if that's the correct term). Is Randy Birch's
method free of this issue, if there indeed was an issue I mentioned (I
could be imagining it, I'm not sure...)?
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Cool solution. However, I had a problem in the "With" Statement
of the following function. I'm sure its a typo - just dunno what to
substitute for AddressOfMsgBox HookProc.
Public Function MessageBoxH(hwn dThreadOwner As Long, hwndOwner As
Long) As Long
'Wrapper function for the MessageBox API
Dim hInstance As Long
Dim hThreadId As Long
'Set up the CBT (computer-based training) hook
hInstance = GetWindowLong(h wndThreadOwner, GWL_HINSTANCE)
hThreadId = GetCurrentThrea dId()
'set up the MSGBOX_HOOK_PAR AMS values
'By specifying a Windows hook as one
'of the params, we can intercept messages
'sent by Windows and thereby manipulate
'the dialog
With MSGHOOK
.hwndOwner = hwndOwner
.hHook = SetWindowsHookE x(WH_CBT, _
AddressOfMsgBox HookProc, _
hInstance, hThreadId)
End With
'call the MessageBox API and return the
'value as the result of the function. The
'Space$(120) statements assures the messagebox
'is wide enough for the message that will
'be set in the hook.
'
'NOTE: I am setting the text in the hook only
'for demo purposes, to show how its done. You
'certainly can pass the title and prompt text
'right in the API call instead.
MessageBoxH = MessageBox(hwnd Owner, _
Space$(120), _
Space$(120), _
MB_ABORTRETRYIG NORE Or MB_ICONINFORMAT ION)
End Function
You've got a space missing after AddressOf
AddressOfMsgBox HookProc
should be
AddressOf MsgBoxHookProc
--
Terry Kreft
"MLH" <CR**@NorthStat e.net> wrote in message
news:jn******** *************** *********@4ax.c om... Cool solution. However, I had a problem in the "With" Statement of the following function. I'm sure its a typo - just dunno what to substitute for AddressOfMsgBox HookProc.
Public Function MessageBoxH(hwn dThreadOwner As Long, hwndOwner As Long) As Long
'Wrapper function for the MessageBox API
Dim hInstance As Long Dim hThreadId As Long
'Set up the CBT (computer-based training) hook hInstance = GetWindowLong(h wndThreadOwner, GWL_HINSTANCE) hThreadId = GetCurrentThrea dId()
'set up the MSGBOX_HOOK_PAR AMS values 'By specifying a Windows hook as one 'of the params, we can intercept messages 'sent by Windows and thereby manipulate 'the dialog With MSGHOOK .hwndOwner = hwndOwner .hHook = SetWindowsHookE x(WH_CBT, _ AddressOfMsgBox HookProc, _ hInstance, hThreadId) End With
'call the MessageBox API and return the 'value as the result of the function. The 'Space$(120) statements assures the messagebox 'is wide enough for the message that will 'be set in the hook. ' 'NOTE: I am setting the text in the hook only 'for demo purposes, to show how its done. You 'certainly can pass the title and prompt text 'right in the API call instead. MessageBoxH = MessageBox(hwnd Owner, _ Space$(120), _ Space$(120), _ MB_ABORTRETRYIG NORE Or MB_ICONINFORMAT ION)
End Function This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Frances Del Rio |
last post by:
I have a bunch of Photoshop images on my server, I want when user clicks
on a link to a Photoshop img for it to start downloading (like when you
click on a Word file..) how can I do that? thank you.. Frances
|
by: Simone |
last post by:
Hello!!!
Here is the thing.
I have had this problem and I want to address it now where in the next
and previous button DoCmd.GoToRecord , , acNext - DoCmd.GoToRecord , ,
acPrevious I wish the message that displays to the user when there is
no more record to got to was something different then **You can't go
to the specific record**
Has anyone ever changed to say something different?
|
by: Ant |
last post by:
Hello, I'm a newbie to C#. Does it have a Msgbox function like VB6 i.e.
MsgBox "Hello World". What is the equivelant function? Does it have one?
Thanks for your time on this simple question
|
by: Phoebe. |
last post by:
Hi, Good Day!
I need to display a msgbox asking user whether to delete a record or not
using javascript.
It works fine.
Later on user request to add in more info in that msgbox, displaying records
info like employee no, employee name, i.e. i need this msgbox to be display
during runtime & not during pageload.
|
by: rroman |
last post by:
I've tried the good old fashioned msgBox but I get:
It is invalid to show a modal dialog or form when the application is not
running in UserInteractive mode. Specify the ServiceNotification or
DefaultDesktopOnly style to display a notification from a service
application.
| |
by: z |
last post by:
I just installed Visual Studio .Net with Framework 1.1. I already had VB6
SP6 installed.
I wanted to do a quick "hello world" example in VB.Net. The code is here:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim s As String
Dim r As Long
|
by: |
last post by:
I have about 20 MsgBox occurance in by program, which I use to inform the
user of the progress of the program, or ask confirmation of an action, or
simply to act separators to various parts of the program.
They all vary in size and shape depending on the text length.
To make the looks of the program more consistant, I made the FIRST and LAST
line a series of "======" 65 characters long.
Windows displays Message Box text using a...
|
by: Ivan Jericevich |
last post by:
In my code below at the line 'response' a blip sound is heard and the
program exits the sub -- No MsgBox is displayed. What am I doing wrong?
If nonNumberEntered = True Then
msg = "Enter numbers only"
style = MsgBoxStyle.OkOnly
title = "ERROR in cast"
|
by: JB |
last post by:
Hi All,
I've been using MsgBox function in VB for years and now that I've
moved to .NET, I'd like to do something a little bit more fancy.
I would like to create a message box that can be expanded to display
more details about an error. I have 2 questions about that:
1 - Is there something like an expandable Message Box built in VB.NET
or will I have to create the form and do all the resizing myself?
2 - How can I display the icon like...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |