Visual Basic.NET: Saving an application? - windows

I am a beginning programmer in VB.NET and I was wondering how to save my application when button1 is clicked, and then load my application when button2 is clicked. My application has several different forms and classes etc. Is there a simple way to save all of the different forms and the changes to those forms that the user may have made, and then load them again? If this is too complicated of a process for a beginner, then I can just forget it for now, but if anyone knows a relatively simple way to do this, I would be very grateful.
Thanks

You have a few different options. The easiest thing is probably going to be for you to take a look at the My.Settings class.

Related

PowerPoint - how to run a macro automatically?

I'd like to run a macro that sets the zoom to 100%, something like Windows(1).View.Zoom = 100, every time ANY file is opened in PowerPoint. The files are already created, so using a template to set the zoom is not possible. How can I do this?
There isn't really a way (that I am aware of) to do this through a macro or powerpoint add-in. You might be able to do it using a custom web add-in but I don't have enough experience with that to provide an example.
After looking around there have been a few success stories. One of which is creating a custom UI element and then adding an onLoad hook to that.
Here is the thread.
Here is a link to the Custom UI Editor Tool However I had no luck in getting it to work. I believe (This is only my theory) that it is not compatible with the latest .NET framework.
If you do end up trying to do this, here is a link to the xml formatting documentation for UI elements. And a link to a little tutorial related to this.
Sorry I couldn't be of more help. This should at least get you started. If anyone else has a simpler way I would love to know as well.

What is imgMain control in visual Basic 6?

I'm using a VB6 application as a reference and have come across imgMain. I'm assuming its an image control, however, I cannot find the object on any of the forms. It's used to load the image. I'm just not sure what's going on with this. I'm assuming its an IMAGE CONTROL, but I cannot find this on any of the forms? it's mentioned a lot of times in teh application as it lets you view incoming faxes and stuff.
Without having a look on source code i assume It might be custom user control that was created for some reasons probably to extend basic picturebox control.
One thing i can advise you is to further inspect code and dig to code of this custom control. If code for this control is not available then see what methods and properties instances of that particular control uses and compare them with regular picturebox.

Mockup application for application with many pages?

I have been using Balsamiq to create mockups for a new application. It has been working very well initially, but now it feels like the application is becoming to large for Balsamiq.
I have connected many Balsamiq screens with the link function in Balsamiq. But that forces me to create way too many screens. Every click makes me create a completely new screen. So if I want to change a button that I am using on many linked screens, then I have to change all of them.
Is there a different application for creating mockups that doesn't force me to create new mockups for every click? I don't know exactly what I'm looking for but maybe something where only parts of the mockup application change when I click on a link?
There is also no functionality in Balsamiq for maintaining my mockups in a structure. Maybe that would help as well. What I'm looking for in essence is an application that let's me mockup more complex applications with many clicks and pages.
WireframeSketcher is a wireframe tool that has projects and lets you organize mockups in directories. It's based on Eclipse IDE and so it shares the same advanced way of organizing files. WireframeSketcher also supports refactoring which makes it easy to move files around or rename them without breaking links.
Look into using "symbols" in Balsamiq, that may help you out some. What you can do is take any group and make it a symbol. Then you can use the symbols on multiple pages. If you want to change the button in multiple places, all you have to do is change the symbol once, and the changes will be carried out throughout the rest of your design. Hope that helps.
MockupScreens has "master screens", similar to master slides in PowerPoint. You do create new screens technically, but you don't do them from scratch.
Since they derive most of their content from the master, you edit only the differences: value in some field, for example.
(I am m.screens developer)

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.

GWT and MVC type calls

I have a GWT app that when launched it takes you to a page with just a menu. So as a shortcut type thing I would like the users to be able to go straight to the page they want. So if the default start page is x, the should be able to say x/add and it will take them to the add page. How would I get that in gwt? Do I need a bunch of different entry points?
To accomplish this, you should use the URL's "fragment", which is the part after the #. For example, if your app is at /x, you could have a different UI displayed when someone navigates to /x#add
If you don't want to write this logic yourself, you should look into the gwt-presenter project, which was written to make MVP apps easier, but also includes an EventBus (to publish events to all corners of your app), and a PlaceManager to facilitate events being fired when the fragment changes (and to change the fragment at will).
Seems like a discussion we already had so I'll just link to the related question. Please see the answers and comments there. Basically, it might be advantageous to just interact with the History class directly, instead of introducing MVP to your project, but YMMV (I'm a huge fan of MVP myself, but it's not for everyone. Besides, I like to know the stuff "under the hood" ;))

Resources