|
-
Jul 16th, 2008, 02:53 PM
#1
Thread Starter
Fanatic Member
[2008] Messagebox.show without beep
I need a silent messagebox.show without the beep bing.
Is there any way to silence it or can someone please point me to some code ?
Thanks
-
Jul 16th, 2008, 03:00 PM
#2
Re: [2008] Messagebox.show without beep
no, but you can create your own messagebox as a form.
When I do that, so I don't have to worry about resizing everything to fit the text I want, I usually just use a multiline textbox with readonly set to true and give it scrollbars.
-
Jul 16th, 2008, 03:03 PM
#3
Lively Member
Re: [2008] Messagebox.show without beep
Yep, that's the only way I know how to do it too. A read-only textbox is nice too because the user's can select and copy the text from the message box....and of course the text wraps automatically, unlike the default messagebox.
-
Jul 16th, 2008, 03:07 PM
#4
Thread Starter
Fanatic Member
Re: [2008] Messagebox.show without beep
thanks. Can MS not give us a bingless messagebox ??
-
Jul 16th, 2008, 03:11 PM
#5
Re: [2008] Messagebox.show without beep
Well the messagebox has been around since the dawn of Windows, and not a ton has changed with it. If you look up the documentation for the actual Win32 API call to the Messagebox function (it is in the User32.dll library) you can look at all the possible flags, and none of them have to do with beeping or not beeping. If the Win32 function had the ability, but it just wasn't rolled into the framework, you could still do it, however it is not the framework that makes the beep happen, it is the actual Win32 function.
I did notice there is also a MessageBoxEx function which states (currently has the same functionality as messagebox) which means they likely added it now for future use, when they expand on the messagebox's capabilities.
-
Jul 16th, 2008, 03:12 PM
#6
Thread Starter
Fanatic Member
Re: [2008] Messagebox.show without beep
Thanks very much. I do believe I have also seen something similar at codeproject
-
Jul 16th, 2008, 03:14 PM
#7
Re: [2008] Messagebox.show without beep
To be honest, the best part about making it yourself, is that you can be a little more creative. Maybe you want a different image than the small handful of stock ones the messagebox class can use, or maybe you want the buttons to say something other than the few default button text values you can set. Maybe you want a hyper link on the messagebox. etc....
You see what I am saying though, you have much more freedom when you make your own.
-
Jul 16th, 2008, 03:28 PM
#8
Thread Starter
Fanatic Member
Re: [2008] Messagebox.show without beep
That was my next point. I need to use icons and get that baby to flash
-
Jul 16th, 2008, 03:35 PM
#9
Lively Member
Re: [2008] Messagebox.show without beep
microsoft provides a lot of fantastic tools......but bingless messageboxes are not one of them!!
good luck with your flashy messagebox
-
Jul 16th, 2008, 03:36 PM
#10
Re: [2008] Messagebox.show without beep
the icons are stock art that ship with visual studio.
For VS 2008, the SHOULD be in a zip file located here:
C:\Program Files\Microsoft Visual Studio 9.0\Common7\VS2008ImageLibrary\1033
Specifically in the zip file under
VS2008ImageLibrary\Annotations&Buttons\ico_format\WinXP
you will find the stock Windows messagebox icons
You could even use the Vista ones if you wanted.
There are tons of other good graphics in many formats in that zip file.
Getting a window to flash is really simple using the FlashWindow api call
Code:
<DllImport("user32.dll")> _
Private Shared Function FlashWindow(ByVal hwnd As IntPtr, ByVal bInvert As Boolean) As Boolean
End Function
you need to pass the window's .handle property, and true as the params to this function, and it will flash the window.
-
Jul 16th, 2008, 03:38 PM
#11
Re: [2008] Messagebox.show without beep
Heres how you can link to the system icons for a messagebox.
http://www.vbforums.com/showthread.php?t=266529
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 16th, 2008, 03:38 PM
#12
Re: [2008] Messagebox.show without beep
 Originally Posted by RobDog888
or that
-
Jul 16th, 2008, 03:39 PM
#13
Re: [2008] Messagebox.show without beep
 Originally Posted by klienma
You could even use the Vista ones if you wanted.
You could use them on a system with Vista but you can not use them on XP or 2000 Pro etc.
Linking to the system icons is th best and safest way.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 16th, 2008, 03:41 PM
#14
Re: [2008] Messagebox.show without beep
 Originally Posted by RobDog888
You could use them on a system with Vista but you can not use them on XP or 2000 Pro etc.
Linking to the system icons is th best and safest way.
due to licensing or actual restriction?
-
Jul 16th, 2008, 03:59 PM
#15
Re: [2008] Messagebox.show without beep
Licensing I believe. When I was building my XP Panel control I was researching about redistributing the XP icons to other OS' and it was found to be against the license. Guess if they dont have XP then they cant use certain icons. This is why you wont find exact icon packs of the various OS'
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 16th, 2008, 04:03 PM
#16
Re: [2008] Messagebox.show without beep
The icon libraries come with readme files, and the readme file has a Use Restrictions section. It doesn't say anything about the target OS for usage, it actually states that the icons simply need to be used for whatever MS says the icons should be used for, as in "you can only use the error icon when you are using it to notify of an error" etc.
The exact wording is:
As part of a visual language, the following images (or any part of the images) must be used in a manner consistent with the description indicated below:
And each icon then has its description of what it represents.
-
Jul 16th, 2008, 04:12 PM
#17
Re: [2008] Messagebox.show without beep
Well that just states the icon should be used for what its meant to be used for and nothing about redistrbuting it. Licensing is always confusing and overlycomplicated. Linking guarentees you are using their icon(s) and no need to redistribute anything = safer.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 16th, 2008, 04:20 PM
#18
Re: [2008] Messagebox.show without beep
 Originally Posted by RobDog888
Licensing is always confusing and overlycomplicated.
so true 
usually expensive as well as confusing and overlycomplicated!
-
Jul 16th, 2008, 04:25 PM
#19
Re: [2008] Messagebox.show without beep
I figure that if you can do it with linking its safer and for what with equal amount of difficulity/code why not. Its better then getting involved in some kind of MS litigation
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 16th, 2008, 04:35 PM
#20
Re: [2008] Messagebox.show without beep
I do agree linking is the better route because you use the icons that are familiar to the OS, and likely that the user will recognize. If they are running 98, and you use some Vista icon, it may not provide the same visual assistance.
That being said though, I am going to look into the licensing implications with icons from one MS operating system to the next.
Being that there are apps out there that visually mimic Vista's UI and glass features on machines running XP, I have to feel that it is safe to be using some Vista icons in XP.
-
Jul 16th, 2008, 04:36 PM
#21
Re: [2008] Messagebox.show without beep
Isnt that the point though? They just 'mimic' the icons, they dont use the exact MS ones (?)
-
Jul 16th, 2008, 04:46 PM
#22
Re: [2008] Messagebox.show without beep
No they dont. they use "similar" icons to get around licensing..
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|