I am very new to VB and trying to understand Array's. I am having trouble referencing the contents of the Array in other areas of my application and I ma getting object Reference Errors and the contents of the Array appear as Nothing and I get a null reference error.
The Array is being loaded from the Sequel Server and I am adding two columns to the Array to add data. I am getting all of my Array in the Return Array, however I acm unable to reference contents of the Array and write out the contents. I need to reference the contents.
The Array is called MyArray, and I need to reference each part of the Array as MyArray(irow,1) for example.The irow will always vary but I will always have 10 columns. How can I reference the Array in other parts of the application? I tried dimensioning the array at the Class Level, but the array shows nothing in it.
My Code here works and the Array Returns with all of my data that I need all ten columns, but I can't reference the pieces of it elsewhere in the application in another button event in a Private Sub or Public Sub.
I have this code that I got from somewhere, I forget where, but it adds a checkbox array to my form. Now I have a button on the form that when pressed it will check all the checkboxes but instead I keep getting the error NullReferenceExpection where I put that red arrow. What am I doing wrong?
Public Sub frmAlarm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Ypos As Integer 'Need to move the position of the checkboxes down Dim NumWeek As Integer ' This is the number of checkboxes
If I have a low level dll called low.dll. I then create another dll, say my.dll that references low.dll.
Now, if I create an application that references my.dll, I should not have to reference low.dll in the application correct?? This does not seem to be happening. The application will not compile as it cannot see low.dll, even though it does not access it directly.
I am attempting to fully convert my Java/VB.Net application (That's actually working perfectly fine, however due to the referencing the jar files using IKVM the application is almost 27 MB big. For just a few classes this is extrememly huge.)I want to converted it strickly to VB.Net. I have 5 Javax.net.ssl references that I'm trying to figure out the VB.Net equivalent of. It seems to me that is should be in the System.Net.Security however I'm unsure as to the correct ones.
Here's an example of one of them: Imports SSLSocket = javax.net.ssl.SSLSocket
I'm in a VB.NET application. I have referenced some java.* namespaces in my file and am utilizing objects and methods from this namespace throughout the code. Presumably this is relying upon J# to compile.
Are these JDK namespaces fully contained in the .NET framework, or will my clients need to have Java installed when they go to run my application?As a side note, I have not explicity referenced any external Java DLL's or anything. This is all pure .NET as far as my code is concerned.
i'm extremely confused. my professor gave us this as the FIRST problem to do in this intro to VB class...on page 380 of our text. it is due today and i have been up all night trying to figure out where to even start. i'm so frustrated. could someone please help me and steer me in the right direction? use a one dimensional array to solve the following problem: a company pays its salespeople on a commission basis. the sales people receive $200/week, plus 9% of their gross sales for that week. for example, a salesperson who grosses $5,000 in sales in a week receives $200 plus 9% of $5,000, a total of $650. write an application (using an array of counters) that determines how many of the salespeople earned salaries in each of the following ranges (assuming that each salesperson's salary is truncated to an integer amount): $200-299, $300-399, $400-499, $500-599, $600-699, $700-799, $800-899, $900-999 and over $999.
Allow the user to eanter the sales for each employee in a TextBox. The user clicks the Calculate Button to calculate the person's salary. when the user is done entering this information, clicking the Show Totals Button displays how many of the salespeople earned salaries in each of the above ranges.
I am a self-taught noob and have been given the task of developing someone elses code. I have rebuilt someone elses solution into my dev machine and able to run with some minimal bugs. I don't know where to add an .xls file into my solution
System.IO.FileNotFoundException was unhandled FileName=TestRec.xls Message=Could not find file 'TestRec.xls'.
I have a line of VB code which looks like this : If GroupTagDropDownList.SelectedValue Is "1" Then The system doesn't throw up any errors for it but the statement doesn't appear to work.
I think that the problem must lie in how I've referenced the '1' value - I've tried putting single quotation marks around it but it appears to make no difference at all.
There is definitely a value in the drop down list of value '1' but it doesn't appear to be read at all.
I have been given a .dll file (implemented in C++) that I want to use in my VB.NET application.When I try to add a reference to this dll using Visual Studio I get the following error:A reference to 'path-to-dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.
Based on this error I concluded that I need to register the dll. Since it has been implemented with unmanaged code I tried to use the regsvr32 tool to register it. But when I try to register the dll using this tool I get the following error:Name-Of-DLL was loaded, but the DllRegisterServer entry point was not found. This file cannot be registered. how do I add a reference to this dll in my VB.NET application?If I have to register it, how?
This application should ask the user for a percentage amount by which each price should be increased then increase each price by that amount and then display the increased amounts. I can't seem to get it to calculate the amounts. Everything else seems fine. Any suggestions, ideas or recommendations? [Code]
I need to reference a C++ dll from my Java project. The method that I need to expose is actually written in Visual Basic. Is there any way to access the Visual Basic code in C++, so that it can eventually be accessed in the Java project?
I have a java class that is used to for ssl connections to a web server. I have got some of it converted however there are serveral java libraries that i have been unable to figure out how to call or reference in vb.net. First off i'm not even sure if it's possible to reference them. In Java code they look like this:
I'll use the last one for example: I get a "Namespace or type specified in the Imports 'org.xml.sax.SAXExeption' doesn't contain any public member or cannot be found. make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use aliases.
I have a project to do in Visual Basic.My problem is that the outcome is always wrong (ex. instead of 2011 it gives 2000). And i cannot set as Desired unit the Inch(1) or feet(3), it gives the Infinity error. And if i put as Original and Desired unit the inch(1), the outcome is "Not a Number".[code]
im trying to save a encrypted password to a application settings which is a byte array but didn;t find any easy way to do so. i did try to convert the byte array to string adn read the string back as a byte array but the problem was the bytearray lenght increases when i read it back.
I am writing an application that has a user enter a wage per hour plus an anticipated salary increase percent and calculates the the users salary for the next 10 years. I have received some help from a few folks who are beginners like myself with visual basic and we are at a road block.
Public Class Form1
[code]...
Error1Expression is not an array or a method, and cannot have an argument list
I have a DataGridView that is being filled with data from a table. Inside this table is a column called 'group' that has the ID of an individual group in another table.
What I would like to do, is when the DataGridView is filled, instead of showing the ID contained in 'group', I'd like it to display the name of the group. Is there some type of VB.net 'magic' that can do this, or do I need to cross-reference the data myself?
Here is a breakdown of what the 2 tables look like:
table1 id group (this holds the value of column id in table 2) weight
I've been poking around in some projects written by one of our contractors, and he seems to be storing a lot of settings in the main "app.config" file for the application, using, for example:
<add key="SomeClass/SomeValue" value="False"/> And then referencing the key value in the "SomeClass" class in "SomeProjectLibrary" using ConfigurationManager.AppSettings.Get("SomeClass/SomeValue")
While this works, I guess, it also pretty much sucks. I was wondering if anyone knew of some more elegant way of creating variables in the "app.config" file, which could then be used across various applications within a Solution?
I'm developing an app in which there's hundreds of different calculations involved and would like for my app's admins to be able to tweak these calculations by specifying the formulas.For example, my database table contains price and quantity. One of the columns 'X' might contain "(price * quantity) over the past 7 days". How can I allow my app's admins to change the calculation from "7 days" to "14 days"?
Is there some way to make calculations dynamic within VB.NET or do I have to rely on stored procedures and write some code to alter those procedure if a change is needed? What are the best practices in this type of a scenario?Ideally, I would like to use something similar to the "Tags" box used when posting questions on here to bring up the available fields and add mathematical operators in between them to perform calculations. It might be adding more complexity, but would be great if an existing calculation isn't overwritten so that it could be used in building a new formula.
I was directed to update an old VB6 dll to VB .net as we are moving away from COM objects. The dll contains one function that does a bunch of high math calculations. I opened up a new class project in VS 2005, Imported System.Math, and then basically copied the function code from the VB6 project into the new class. When compiling, I made the assemble COM-Visible and also checked the Register for COM Interop in the project properties. I then copied the dll and tlb files to Windows/system32 and tried to register using Regasm.exe.
Even though I'm using the correct version for .Net 2, I still get error RegAsm : error RA0000 : Failed to load 'C:WINDOWSsystem32eagetairmiles.dll' because it is not a valid .NET assembly. When attempting to add a reference to it in my new .Net project, I see it in the COM tab - but in the location it was developed in, and I receive the following error: Converting the type library to a .Net assembly failed. Type library mydllname was exported from a CLR assembly and cannot be re-imported as a CLR assembly.
how to create a class yet, and I think I need to learn how.I am wanting to shorten my code in a form, thinking of creating several classes to do so.Lets use a Listview as a reference if you dont mind.Say there is a listview, you have a numeral amount of if statments to fill by. Is there a way to create a class(is this the way to go) so that you can open the class to modify that specific block of code? Example of questionYou have multiple items you need to add for each if statement. Animal as a group Dog as an item 14 years as a sub item Cat as an item 11 years as a sub itemIs this the way to go, if so how do you create a class and call it from a form?Davids Learning
Ive have a listview on my form and need to populate it with data from my Table called "tblCustomers". However I need to only retrieve records based on field that is populated with data called "Joe". In order for the SQL syntax to retrieve the name "Joe" then the SQL syntax needs to reference the Label on the form called "lblName" which will have the name "Joe" as the caption.
How can my dataset have SQL data that references my label object on my form?
i have just installed Visual Studio 10 and DirectX SDK (June 2010), however i can't seem to add directX as a reference. I have also tried Direct X SDK (march 2009).
I am currently working on an application that is about 90% finished, and we just got an addition that requires us to create a new project in the solution. My question is, I have a bunch of classes created in the main project that deal with the database, and it has a lot of functionality that I could really use in this other project.
I am building application that will be hosted as a web service. This app takes an employeeID and returns an employee object that contains lots of info regarding the employee. (name, status, full-time/part-time, etc)I want the two existing apps we have (and more to come) to be able to call a method that the web service will have and return the employee object. (also at time this web service that returns the object may have new fields added to it - Pay rate, etc)How would I go about creating a new object from this web service reference in the existing applications.Would I decalre it like Dim Employee as new emp_webservice.employee? And then be able to use this object within the app? Or would the better practice be to also included the same class files? It seems like this would not be the way to go, since if I make a change to that class I then have to make it in all places.
I have compiled a C# class as a .dll named TileCalculations.dll Within the Class its namespace is TileCalculations and the Class is TileSystem
namespace TileCalculations { static class TileSystem
I have attempted to add this to a vb.net poject using Project > Add Reference and navigating to that file and selecting this dll. I see the dll in my Project Properties Window and the Local Copy property is set to True.
MyProperty is just a property defined in another class. However when I try to reference that property as shown below I get an 'Identifier expected' error
This is a project I am working on written in Visual Basic, using Visual Studio 2005.I have a form (FrmMain) which contains a user control (CtrlDisplay). Within the user control (CtrlDisplay) is a list box which pulls information from a database. when you click on a button it checks another database to see if you have all the required components to build the object in the list box. If you dont have the parts, a dialog box (DiaAddToList) opens up to ask you if you would like to add the missing parts to your next order.
I had this all working perfectly when I was using forms and a MDI parent container. Now I am using a single form which swaps out user controls. the issue I am running in to is, the dialog box has the button "Add to next order", which is supposed to start routine to add the objects to the inventory. using forms, it was easy to do this, on DiaAddToList, under the sub when you click the add button, the code was FrmDisplay.AddList()
Now that I have switched it to user controls I tried to put CtrlDisplay.AddList(), and it is telling me "Reference to a non shared member requires an object reference". How do I reference the CtrlDisplay. It is already open and running on FrmMain. I tried to use "Imports.MyProject.CtrlDisplay" and that didnt work.
how I can reference this? It is starting to look like I will have to put the list boxes and routines into FrmMain, but that will end up with something like 200 boxes on one form, all overlapping and making it REAL confusing.