create a visual studio template
DESCRIPTION
Create A Visual Studio Template. For OpenGL Application. Don’t waste time on adding references, copying files & writing the same code again & again. Get to the real programming immediately. Create a template for the things which are recurrent. Launch Microsoft Visual Studio. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/1.jpg)
Create A Visual Studio Template
For OpenGL Application
![Page 2: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/2.jpg)
Don’t waste time on adding references, copying files & writing the same code again & again. Get
to the real programming immediately. Create a template
for the things which are recurrent.
![Page 3: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/3.jpg)
Launch Microsoft Visual Studio
![Page 4: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/4.jpg)
Create A Windows Forms Application with any name
![Page 5: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/5.jpg)
In the right window pane, RIGHT CLICK On References, & click Add Reference…
![Page 6: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/6.jpg)
Click Browse
![Page 7: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/7.jpg)
Navigate To lib folder, select csgl.dll and click OK.
![Page 8: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/8.jpg)
Write the statement “using CsGL.OpenGL;” as shown.
![Page 9: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/9.jpg)
Write the following code inside the class Form1. You may write all the code you wish to be prewritten at the time of creation of a new application.
![Page 10: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/10.jpg)
Go To Project Properties
![Page 11: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/11.jpg)
In the Build tab, change the Platform Target to x86. Save the project.
![Page 12: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/12.jpg)
Go to lib folder. Copy the path of lib folder from the address bar.
![Page 13: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/13.jpg)
In the Build Events tab of Project Properties, write the following command in the Post-build event command line box…
copy “PATH” “$(TargetDir)”
In place of PATH, paste the previously copied path and add \csgl.native.dll at the end, so the whole command looks like:
copy “F:\CsGL\GL\csgl1.4.1.dll\lib\csgl.native.dll” “$(TargetDir)”
![Page 14: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/14.jpg)
In the File menu, click on Export Template…
![Page 15: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/15.jpg)
In the Export Template Wizard, select Project template, and click Next.
![Page 16: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/16.jpg)
Write a template name. Template description is optional. Click Finish & Close Visual Studio.
![Page 17: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/17.jpg)
Now when you create a new project in visual studio, a new project type will be available under My Templates. Select that, write a project name, and click ok. All the code will be prewritten & reference to
csgl.dll added by default.
![Page 18: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/18.jpg)
Once the template has been created, do not change the
location of the lib folder or csgl.dll, or else you will have to add the
reference again every time.If it is necessary to change the
location, then the template must be recreated for the new location
of csgl.dll.
![Page 19: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/19.jpg)
You have to do this whole procedure only ONCE. Afterwards, you can use the template to create an OpenGL project. Now you don’t have to…
1. Add reference to csgl.dll every time you create an OpenGL Application.2. Write the statement using CsGL.OpenGL;3. Create the View class every time.4. Copy the csgl.native.dll to output folder.
![Page 20: Create A Visual Studio Template](https://reader036.vdocuments.site/reader036/viewer/2022062408/568142cc550346895daf22a9/html5/thumbnails/20.jpg)
THANKYOU
Tutorial By
SYED GHAZANFAR ABBAS RIZVI