Re: Moving MsgBox
- From: "Bill McCarthy" <Bill@xxxxxxxxxx>
- Date: Sat, 7 Jun 2008 10:20:20 +1000
"DanS" <t.h.i.s.n.t.h.a.t@xxxxxxxxxxxxxxxxxxxxx> wrote in message news:Xns9AB56B2F3ACE1thisnthatadelphianet@xxxxxxxxxxxxxxxxx
"Bill McCarthy" <Bill@xxxxxxxxxx> wrote in
news:860098AA-C818-4F1B-961A-A8E7FBA154D5@xxxxxxxxxxxxx:
"NeilH" <neil@xxxxxxxxx> wrote in message
news:OIbnSWlxIHA.5176@xxxxxxxxxxxxxxxxxxxxxxx
Why not just design your own Message Box?
Yeh that was my first thought when I saw that code. But in VB6 I
think that'd take a bit of work to do all the resizing as needed, and
anchoring the buttons to the bottom etc. In VB.NET it's easy as you'd
use a flow layout and you'd get all the resizing for free, but in VB6,
unless you've got a third party control it's a bit of code
To most that's not an issue, unless of course you're afraid to write a
little bit of code.
You need to weigh up the cost/benefits of each approach. If you write your own, you need to provide the same functionality which includes wrapping of the message text, flexible set of command buttons ensuring the correct default button and cancel (ESC) button if needed, changing the look in accordance with the OS, clipboard set text of the message, and localization. It's not a huge amount of code, but it is "reinventing the wheel" considering you already have this provided for you with MsgBox.
Of course if you feel that's "little code" then feel free to post your version .
Although I prefer the idea of writing your own, in this case hooking the window maybe less code, especially when you start considering the localization issues. The real benefit of rolling your own is if you intend to add other functionality, such as toast window, or automatically close after n seconds, or "don't ask me this again" kind of functionality: of course then you really don't have much choice other than to roll your own.
.
- Follow-Ups:
- Re: Moving MsgBox
- From: DanS
- Re: Moving MsgBox
- References:
- Moving MsgBox
- From: LondonLad
- Re: Moving MsgBox
- From: NeilH
- Re: Moving MsgBox
- From: Bill McCarthy
- Re: Moving MsgBox
- From: DanS
- Moving MsgBox
- Prev by Date: Re: Drag-Drop to MSFlexGrid Crashes IDE
- Next by Date: Using Resource Files
- Previous by thread: Re: Moving MsgBox
- Next by thread: Re: Moving MsgBox
- Index(es):
Loading