How to add a custom icon to MessageBox? - vb6

How can I use my own icon (like vbexclamation) with the MsgBox() method? I need to add a icon of my own.

I don't believe MsgBox() supports this. You would need to create your own Form from scratch as a replacement for MsgBox().

There is an Extended Msgbox project at http://rpgprojects.homestead.com/code.html
Also, take a look at http://www.vbforums.com/showthread.php?329373-MsgBoxEx-Extended-Message-Box

Related

Nativescript prompt dialog select all text

I was just wondering if it was possible to have a nativescript prompt dialog select all of the text upon opening without going so far as to create an entire custom dialog. I don't see any settings when creating it, but I was wondering if someone knew of a way to do this?
Thanks in advance.
The native dialog controller or the UI components inside are private to the dialogs module, not exported for public use. Hence you will need a custom one in order to operate on the textfield.

Image/Picture on a messagebox C#

Is it possible to add a picture to a messagebox in C# besides the customized buttons?
or
How do I put the picture I want as a custom Icon?
It is not possible.
Instead you can use a Form to show the image. You message box will be just like any other form in your application.
It is useful to have such type of facility while coding with C#, but reality is it is not as relevant as we think.
a good practice is to use Forms instead of putting things in MessageBox.
Try it I hope it helps !!

Creating a GUI in MATLAB using guide is not updating the m-file?

I am trying to create a GUI. I try and add 3 radio buttons to the GUI and when I hit save the m-file doesn't change...
I can add other entities and the m-file is edited and changed like normal.
Am I missing something?
If you delete a function that GUIDE creates it wont automatically add it back for you. You need to use the INSPECTOR tool in GUIDE and click the box next to the function to make GUIDE add the function back into your m-file.
Thanks
GUIDE stores the GUI between a FIG-file with the figure data and an M-file with the callback functions. You may need to add some callbacks for the radio buttons before it will modify the M-file.

How to create a view for a single control?

What is the best way to create a view for a single control that I need to load into a Shell region in a Prism app. I know I can wrap the control in a UserControl, but I suspect there may be a better way.
I am working on a demo app to learn Prism 4. Each module will load a navigation button into an ItemsControl in a region in the Shell. These navigation buttons will function like the Mail, Calendar, and other buttons in Outlook.
I am creating the view in each module that will hold the module's navigation button. The simplest way to create the view seems to be to wrap it in a UserControl. My question is this: Is there a better way to do it? Thanks for your help.
If you need graphical control, what you are doing is the way to go. If you find yourself making all of the buttons look the same (copy - pasting) you might find that a menu registration service is the way to go.
You'd have a service like IMenuService that you register with your container and modules can come around and register menu items to. You can then create buttons for the module. I've provided a sample for this here:
http://dl.getdropbox.com/u/376992/CAGMenus.zip
Your question, though, seems to be about whether or not you need to wrap a control in a UserControl to register them with a region? If that's the question, I believe the answer is no, although you might amend your question to tell us what you are running up against that makes you think this.
I ended up wrapping the control in a UserControl, and it seems to work fine. I am still interested in seeing if there is a better way to load the button, so I will hold this question open for a few days.
Edit 02/22/2011: I tried using a control without a UserControl wrapper, and I got the following error:
Library project file cannot specify ApplicationDefinition element.
I wrapped the control in a UserControl and the error went away.

CTaskDialog hyperlinks in vc++

Hi I am using CTaskDialog class in my MFC application. I am trying to customize it.
In this if i want to add hyperlinks, as of now there is no specific provision for this. But to add the buttons we can use "AddCommandControl" and can handle the button.
If I want to implement similar to this AddHyperlinkControl and want to handle can any suggest how i can achieve it. My goal is I want to handle the click event of that hyperlink. Please share your suggestions if any one tried this.
Hi I am mainly looking for button alternative with hyperlink. Please share your suggestions.
Thanks a lot.
Haranadh.
If you would want to have a hyperlinks in a dialog and would want to handle the click event on it, You should be using SysLink common control (CLinkCtrl)... Check this out -> SysLink common control

Resources