I would like to make a template for all the forms I create in my visual basic 6 project, for example I want to put a header on all the forms that contains user name etc, I know in c# all I have to do is make the form with appropriate controls and make all other forms inherit from in, in visual basic 6 there does not seem to be a way to make a form inherit from another?
According to MSDN:
To create your own template, save the object that you want to use as a
template, then copy it to the appropriate subdirectory of the Visual
Basic Template directory. For example, to create a custom MyForm form
template, save a form named MyForm, then copy the MyForm.frm file to
the \VB\Template\Forms directory. When you select the Add Form command
from the Project menu, Visual Basic displays the MyForm template in
the Add Form dialog box...
So...design a form any way you want--with whatever code, controls, etc. Then save it and copy it to the \VB\Template\Forms directory.
Related
I am making a Visual Studio extension, which allows to embed web pages into your projects and solutions: https://visualstudiogallery.msdn.microsoft.com/52bd30dd-596f-40a9-94a9-ba3fb250c671
Alpha is out. However, I have a problem: item template for a web page link indeed appears in File -> 'New -> File ...' dialog, but not when I do right click on C# project, and select 'New Item ...' there. I understand, that I can add identical template to ItemTemplates folder, specific to C# projects, but I want my template be easily available in all project types via 'New Item ...'.
Is there a way to do it?
If you use the item templates to display all the projects you need to create the Custom item templates like Custom project system.
Till current moment I knew only one recipy to create form VC++ designer:
1. Add dialog resource and design what you want in designer.
2. Create MFC form by using designed dialog resources
But now I got project sample that has form and has no *.rs files with form information. Instead of that it has header file that has form icon. Header file contains many code that creates controls and sets style. It is also possible select from menu "View Designer". That makes me think that there is another way of creating form. Besides that looks that codes does't uses MFC.
How to create simple form application with designer that would generate header file (not resource) and not use MFC?
Unfortunately I can't "View Designer" because during this procedure error is generated:
C++ CodeDOM parser error: Line: 1520, Column: 42 --- Unknown type 'AxKgLib.AxKg'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built.
Correct me if I'm wrong. Looks like I need registered ActiveX for this project. I have registered ocx that was included in source, but this didn't helped.
How to solve this problem? How to get list of all ocx that system has to make sure there is no required AxKgLib.AxKg? How to make designer to show me form without required control?
Good day, am still a beginner to Windows Phone and visual studio environment so apologies in advance. In Visual Studio, when creating a new layout we have the LayoutRoot by default. After having this LayoutRoot customized(with set rows and columns and a postioned TextBlock), is it possible to make the layout like a base template so that when one starts a new layout, it can have this customized Layout as its LayoutRoot. How can i do this or do i have to copy this values to every new layout that i intend to create. Many Thanks
Three options come to mind here.
You can make a visual studio item template for your customized page where you can easily add it to new projects. Check this tutorial on how to make item templates: Visual Studio - How To Create Item Templates
You can make a base page with the customized xaml and have your other pages inherit from it.
You can make user controls responsible for specific UI parts and then add these controls to pages whenever needed.
I was wondering if it is possible to create a form that will be run on the execution of a t4 template. I would like the values inputted into the form to be used by the template to generate code, similarly to add view in an asp.net mvc project i.e. right click add view and a form would appear to add a new view.
Also in the add view (example discussed above) would it be possible to edit the form that appears i.e. add a new text box?
Something similar can be done with MVC Scaffolding. Only difference is it uses Powershell as the "UI" and environment. Pretty powerful stuff, you can configure it via command line parameters. Part 5-6-7 contains customization/modification related informations.
http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/
No dialog boxes, and forms aout of the box, but powershell (and any command line) is pretty useful if you are a developer. You can queue up tasks, etc...
as a newbie to Sharepoint.... I have created a simple list with several columns in Sharepoint 2010.
I now want to add a button on the List that I can programmatically add some onClick events to do the following:
get a handle on some of the columns in the list;
Distribute an email automatically based on the content of some of the columns
I am looking at using c# via Visual Studio 2010 for all the programmatic aspect of this development.
Is it possible to export the xml from Sharepoint 2010 then import into Visual Studio 2010 so that I can use the list I created as my starting point for the coding work? If so, how do I go about this?
Thanks.
You'll have to setup Visual Studio to work with Sharepoint.
Install it on a server that has Sharepoint 2010 running.
You can then create a webpart that incorporates the list (or a view on it) and add the button to that list.
But I imagine that you'll want to work on a specific row. So what you want is a Custom Action on that list (Visual Studio has a template for that: Add -> New Item -> Custom Action).
The Custom Action will create a new item in the Edit Control Block (the context menu that appears for every item in the list).
I prefer to create the ECB (Edit Control Block) menu items using JavaScript. In the page load I inject a jSon string that has additional information about each of the rows, and a JavaScript function then is called by the builtin SharePoint javaScript function that creates the ECB.
The JavaScript function you'll have to create is Custom_AddListMenuItems .
In that function you'll call CAMOpt to create menu items. If you want SharePoint to create the built-in menu items (and Custom Actions you created), set the return value of the Custom_AddListMenuItems function to true. (And fals if you don't want to see the built in ECB menu items and any Custom Actions you created)
You can start here:Jan Tielens Blogging's
Hope this helps.