I am experimenting with OpenTK in VB.net using VS 2012. I have used the Nuget manager to include OpenTK and the OpenTK Control in my project. The Imports statement are in place and don't show errors so I assume they items are correctly loaded.
My next step is to add the OpenTK Control to the form. The examples I found on the web use the Choose Items... option found by right clicking the top of the Toolbox Tree. I then use Browse and select the OpenTK control .dll. I then get an error message saying that there is noting in the .dll that can be added to the toolbox.
I'm obviously missing something very basic!
Chris
Related
I have created a custom UserControl in a vb.net Class Library project, and I would like to Build this library and be able to reference the .dll file from other projects in order to re-use the custom UserControl.
When I Build the Class Library project and add its .dll to a Windows Form Application project as a reference, I do not see my custom UserControl in the ToolBox. I have a feeling it has something to do with the fact that the code I've written for the UserControl is separate from the code the designer automatically creates when I design the control in design mode.
I've been searching the web for a few days no to no avail. I see similar answers for ASP.net UserControls, but have been unable to transfer those answers over to the vb.net platform.
Any help is greatly appreciated.
• Right-click in the toolbox.
• Click "Choose Items..."
• Click "Browse..."
• Navigate to your DLL and click Open
• Then click "Ok"
Your components should then show up
I'm currently coding in F# using Visual Studio 2015
I'm trying to access the .Net Namespace System.Drawing to make a bitmap. I've been supplied with a working example project from school that draws a bitmap and updates it every second. The file is a F# script file with extension .fsx
The thing is i'm not able to access the System.Drawing namepace and use the same code if I copy and paste it into a F# source file, with the extension .fs.
Visual studio's intellisence is not even showing the .Drawing namespace.
I've tried googling around, but I don't know what to search for.
In Visual Studio
From menu: View -> Solution Explorer
Expand the project. In this example it is ConsoleApplication2
Right click references
Click Add Reference...
On left click Assemblies
Framework should be selected by default. If not select Framework
In upper right for search.
When entering the search term do not press Enter when done.
For search enter: drawing
In middle
Click on System.Drawing
Click box on left of System.Drawing
Click OK
Expand References
Verify reference to System.Drawing added.
In fs file at top add following line
open System.Drawing
You can now use the the library, e.g.
Microsoft notes
For a complete example of creating a project see:
Walkthrough: Using Visual F# to Create, Debug, and Deploy an Application
The part about adding references is under
To develop a component by using F#
and is item 3.
Open the shortcut menu on this project's References node, and then
choose Add Reference. Choose the Solution node, and then choose the
Projects node. Select the check box next to the RateAnalysis project,
and then choose the OK button
.
I'm trying to add a chart to my Visual Studio form but the button is greyed out. I'm using .NET Framework 3.5 and C#. Following instructions online I've downloaded and installed the dll files from this link: http://www.microsoft.com/en-us/download/details.aspx?id=14422
I also added them as references and added the following line at the top of my form file:
using System.Windows.Forms.DataVisualization.Charting;
but the button is still greyed out.
What have I missed?
To make the chart control available, you need:
To be using .Net framework 4.0 or higher, OR for .Net framework 3.5 install this: http://www.microsoft.com/en-us/download/details.aspx?id=14422
On the toolbox context menu -> Choose Items... have the Chart control selected. (Sort by name in the Choose Toolbox Items dialog and scroll to Chart. There are two: one for Windows forms, one for Web forms. You need only select what's relevant.)
The chart control appears in the "Data" section of the Toolbox.
You do NOT need to any any "using" clause to the form source file, or any reference in the project references. (The reference is added automatically for you when you add the control.)
I too had this issue and could not resolve it for hours.
As posted here:
Visual Studio 2010 toolbox controls disabled or inactive
In order to solve it for me I just right-clicked one of the items in the toolbox, and chose "Reset Toolbox"
This resets the entire toolbox, so as mentioned in the answer above, all custom tools are lost and need to be re-imported.
Had the same problem.
What I did was to make sure that I was using the same Framework with the chart framework version.
During project creation, by default using .net 3.5. But since the chart is written for Framework 4.0, it will not work with 3.5.
You need to change the solution or project Framework to 4.0 or above by doing this:
On the menu bar of Visual Studio, click <your project name>/Properties.
Change target framework to 4.0 or above.
Save the properties setting.
Rebuild your solution.
After this, you may use that chart component.
Just to start off, this question does seem very similar to another post Add the DLL (lame_enc.dll) reference to my project, but I haven't been able to successfully apply that answer. I am pretty new to VB.NET so it is very possible I'm simply missing something obvious.
I am trying to link a DLL to a VB.NET 2010 project to allow my VB app to play *.ogg files. I followed some other advice here on the forums and downloaded FMOD's FMOD Ex Programmers API. I am trying to now reference that functionality. These appear to be the files I need to somehow reference.
C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\fmodex64.dll.
C:\Program Files (x86)\FMOD SoundSystem\FMOD Programmers API Windows\api\libfmodex64_vc.lib.
I haven't discovered how to add a *.lib reference (or the equivalent), but selecting the DLL as a reference gives the following error.
A reference to 'C:\Program Files (x86)\FMOD SoundSystem\FMOD
Programmers API Windows\api\fmodex64.dll' could not be added. Please
make sure that the file is accessible, and that it is a valid assembly
or COM component.
I'm not sure what I could be missing. Any ideas? Thanks!
In Solution Explorer, double-click the My Project node for the project.
In the Project Designer, click the References tab.
Click the Add button to open the Add Reference dialog box.
In the Add Reference dialog box, select the tab indicating the type of component you want to reference.
Select the components you want to reference, then click OK.
Another approach I was trying is working for me. I found a site with a working example of a LibZPlay VB.NET sample ( http://planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=7789&lngWId=10 ). It runs under VS 2008 and I was able to adapt my project to use LibZPlay (open source library http://libzplay.sourceforge.net/WELCOME.html ) under VS 2008.
That is sufficient for me for now. Thanks for your advice. It was likely some configuration issue or misunderstanding on my end.
Using VB.net 2015 I (could not add or even find a System32 dll) as a reference using Solution Explorer, Tab References. Going to the MAIN Menu, Projects/Add References...
Used Browse and All the System32 dll were visible. Then I was able to load the needed dll.
I have a problem with the style of the button in a messagebox.
If I call the following line of code in a current project the button get one type of visual apperance/style. And If I create a new VB.NET Windows Application project it gets a standard Windows apperance/style.
Windows.Forms.MessageBox.Show("Yaay", "Yaay!", Windows.Forms.MessageBoxButtons.OK)
See the difference between the buttons below.
I suspect they inherit the visual apperance from it's parent or maybe from some project settings. But I have not been able to find out from where.
Both projects are created in VB.NET 2.0, and both have same System.Windows.Forms - dll as reference (c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll).
http://www.freeimagehosting.net/uploads/2a956b0675.jpg
Screenshot can be found here.
Thanx in advance for your help!
I cannot see the image from where I am so I'm not sure if this will help you.
Open the Project Properties for each solution and look at the Application tab.
Is the "Enable Applicaton Framework" item ticked? And if so, is the "Enable XP Visual Styles" item also ticked?
That may the difference in the two solutions.