How to display messages at MDI form level in VB6 - vb6

Friends, I've a VB6 application. I'm using 1 MDI form and multiple child forms. Now what I require is, I want to show some messages depending on the child forms(like-If there is no data in the database,then message will be "Enter master data first", messages regarding mandatory fields etc. etc.). I'm already using 1 status bar at lower end to display some other information. I don't want the display to be on the forms(child forms). I want it at MDI level. Is it possible to do(As far I know, MDI form doesn't support keeping any control on it)? If yes then which VB6 control I should use?
I'm asking this question after trying many options. Without knowing, why do you downvote?

As far I know, MDI form doesn't support keeping any control on it
This is not entirely accurate. There are some controls you can put on an MDI form. In this case, you should add a picture box control, and then put another control within the picture box control. I have done this in my own application and it works well.

The proper way to do this is to create a event that handles messages in your application. The child forms would simply raise the event, then the MDI form would handle the event raised, and then the message would be displayed in whatever manner you choose. If you need more information on raising events and listening for them, here is a link that Google found for me.

Related

MFC:CDHtmlDialog Purpose/Usages to open other views?

I was thinking of writing a new app where a users selects an option of what procedure they want to perform and the view changes to that until done then goes back to the main menu. I came across CDHtmlDialog and looked like a nice easy way to add a nice looking menu using html. But I wonder if that is the purpose of that class? Can I set it up so when a button or graphic link is clicked it changes out the view to another one (I would need to use traditional things like CTreeView with CListView with a splitter) or is it more for staying within the HTML world?
Thanks.
From the MSDN MSDN documentation
CDHtmlDialog Class is used to create dialog boxes that use HTML rather than dialog resources to implement their user interface.
From what I can gather from your post, I think you should consider SDI application using view classes that you want. To switch views on the command you do not need a splitter window. A static splitter is used to display a number of views in a different part of the splitter simultaneously.

Custom form in Outlook Task is not syncing

My partner and I created a custom task form to be used in Outlook using the developer mode to do that, and we published it to the Organization Forms Library for anyone to open. We're running into issues that I personally can't seem to find on how to resolve:
Custom forms aren't syncing correctly.
When I complete out the custom form, and I assign it to someone else they might be missing details like the dates I picked from the date picker, and text within the text box are gone too. It's very odd that sometimes some would get all the details that an end-user would input but that's like a 1/8 chance. I feel like there's a disconnect where it just won't behave like any other task. Cache mode or no cache mode doesn't matter it seems. When the person assigns it back with changes made on their end, those changes aren't seen on my side. I just have the same original details that I made when I first made it. We're on Exchange Server 2010.
Looks like a custom form was not published correctly to others in the organization. Try to create a new Outlook item on other machines with your custom forms to make sure they were deployed correctly.
Note, message forms default to separate layouts for composing and reading. Many people find their first message form doesn't look right when they receive an item created with it. That's simply because they forgot to click the Edit Read Page button and customize the Read layout!
You may find the Customizing Outlook Message Forms article helpful.

passing values between parent and child windows

I am really new to MVC 3 and need a help on this.
I have a parent window with a listbox and a child window that is a pop up. The child window has a checkbox list and i need to populate the parent window's listbox when items are selcted in the child window's checkboxlist. How to acheive this in mvc 3 razor ?
I think you're actually looking for something more than just a Razor answer here, you're looking for JavaScript.
Razor is just a generator - you use it to build HTML, JavaScript (or email or XML or JSON or whatever text you want). Now, it's a really good generator, but it can't do the notification things you're looking to do.
JavaScript, however, will let you pass a message to the server from the popup window, and the parent window can use JavaScript to poll the server for messages.
One way to do this without writing the plumbing yourself is to use a library such as SignalR (located at https://github.com/SignalR/SignalR, or you can install it in your project through NuGet) which can handle the client->server->client communication for you.
On a separate note, if the "window" is just an in-page pop-up, you don't have to do anything nearly as complicated. You can just use script on the same page to control any of the DOM elements.
Hope this helps some, cheers.

Win32 textBox in treeview

I want to add textbox in treeview as child of one of the parent node. Is it possible> If yes how to achieve this?
The native TreeView control isn't going to be helpful at all to make this work. Programming one yourself is a tricky proposition. It is however a very popular UI gadget. Any component vendor sells one, invariably called "TreeList".
You'll have to do some shopping if you want to use such a component from unmanaged C/C++. An ActiveX version of such a control is as close as you can get. Most component vendors have however put that in their legacy bag.
Depending on your requirements, you may be able to use the built-in label editing features of the Win32 tree view. See TVM_EDITLABEL.
To make an item act like an edit control, you could send this message yourself when the item is clicked. You could also use owner-draw techniques to make the item look more like an edit control when it isn't in label-editing mode.

Altering windows form from userControl

i'm quite new with windows forms and i have a small issue.
i have a form that contains a userControl.
the form also contains a button with enabled = false, and upon some user selection in the userControl sets the button to enabled = true.
basically, i want to know what's the best way to change something in the form upon a change in the userControl.
I saw on the internet that event/delegates might be the answer, but it seems too complicated for such a small thing.
anyone has another solution?
thanks
Bosco
Events are your friends. They're really not that complicated. Just find an apropriate event for your user selection and set the button property.
User controls are meant to be hosted by different forms or other user controls. That's why they should be decoupled from their host controls.
IMHO best way to decouple the user control from its parent is to use events. Another way would be to implement the observer pattern. Events are a special implementation of observer pattern in .NET.

Resources