Access Classes From C# Code?

Apr 12, 2010

I have an application in vb.net thats part of a big app. My team member requested I create an object with constructors to allow him to be able to access my classes and functions from his C# code and I will still be able to work on my checked out version.

View 5 Replies


ADVERTISEMENT

Access Properties Of Form Classes?

Oct 21, 2009

I have Form Class A, which is the "Main Form". An Event fired by Form A instantiates Form B, and sets Form A as it's owner. (which makes it be on top of FormA at all times)[code]...

View 4 Replies

C# - How To Access Classes In Sub Referenced Library

Apr 22, 2011

I have the following projects:
TradingProject (my code) Has reference to TradingLibrary, and to ApiLibrary?
TradingLibrary (my code) Has reference to ApiLibrary
ApiLibrary (3rd party code)

I'm making several projects (like TradingProject) that communicate with a software through use of an existing ApiLibrary. But I want to push generic methods into a library I write: TradingLibrary.

Still, I would like to use some parts of the ApiLibrary directly from TradingProject. However, I then would need to pass an object (of an ApiLibrary class) into a method in TradingLibrary. Where the object should be recognized. However I assume this will be a problem, as TradingLibrary use it's own reference to ApiLibrary, so it will not be recognized as the same classes? Is there some way I can "forward" the ApiLibrary reference from TradingLibrary to MyProject, such that they will use the same reference? Or do I need to duplicate the classes and inherit from ApiLibrary for each class? Like:

NameSpace TradingLibrary
Public Class SomeClass
Inherits ApiLibrary.SomeClass
End Class

I guess that would work, if I do it for all classes I need, but is there perhaps some simpler way I'm not aware of?

View 2 Replies

Can't Access Classes From Different Files In Website

Jun 9, 2010

I've inherited a VB.NET website and it won't compile because the class1 in the file class1.vb refers to class2 in a file called class2.vb. I get the following error when trying to compile[code]...

View 3 Replies

Creating Depth Code For Two Classes

Feb 6, 2009

How would you create depth code for two classes in visual basic 2008 (like if you wanted to put one picturebox behind another picturebox depending on what each picturebox's depth equals)?[code]I can't get my movement code and the image for the character object to work.

View 3 Replies

How To Implement M:N Relationships Between Classes In Code

Jul 12, 2009

Current i'm developing an application track storage of an item.in it abusiness rule says an item can be moved to more than one warehouses. Also i need to keep the history of the Item's history, Thereefore i need to create two entities,"Warehouse" and "ItemsHistoryOfLocations". I have developped an static class diagram to show the relationshop.These are the relationship rules between the classes:

1. A warehouse could be in an Item's History of locations.

2. A warehouse could be in many Items' History of locations.therefore in the forward relationshop -- 1..*

3. In an Item's History of locations, there must be at least one warehouse4. In an Item's history of locations, there can be more than one warehouse

Therefore in teh backward relationship -- 1..* Therefore the relationship betwween teh classes is a M:N. In another Object oriented scripting languaage when ever, and M:N relationship is found between classes, their relationship is slit and put a collection class called "MemberKeyDictionaries" as the bridging entity.But in C# / VB, should we create these collection classe. IF NOT, then how should i modify my class diagram to implement this M:N relationship? and h0w do i implement this M;N relationship in code?

View 1 Replies

.net - Access Shared Members In Partial Classes

Feb 16, 2011

I'm writing a WCF-Service and I split up my service class to multiple partial class files, so every ServiceContract-Implementation gets its own file. I have one file however that should contain e.g. members that are used by every partial class file such as a logger. The service is hosted with IIS 7 if this matters in any way.

[Code]....

The code compiles fine, but at runtime I get an BC30451: The name m_Log is not declared Error (Don't know the exact words for it. I get a german message ;) ). I don't think it has something to do with the type of m_Log or a depending assembly because I get the same error if i try this with a String. What am I doing wrong? How can I make this work? Edit: I was trying the same thing in a simple console application without any problems. :(

View 1 Replies

Website With Multiple Languages Can't Use Classes In C# Code?

Feb 23, 2012

I'm developing a new functionality for web site project with VB.NET default language in VS 2008. As my preferred language is C# I create subfolder for C# code in the App_Code folder and add appropriate codeSubDirectories element to web.config file. The problem is that I can't refer VB.NET classes in my C# code. All VB.NET classes and structures are placed in global namespace in the App_Code. But even if I place some VB.NET class in the same namespace I've use for my classes in C#, I still can't use them.

View 2 Replies

How To Access Network Drive Through Usual System.IO Classes

Feb 28, 2010

My software handles multiple operations on files, and I have now finished writing the related functions, using the System.IO classes. I now need to add support for network drives. Using a mapping works very well (although Directory.GetFiles is a bit low, and I don't know why), but I'd now like to be able to deal directly with paths such as \192.168.0.10Shared FolderMyDrive. Is there any way to handle this type of paths other than mounting the drive to an available drive letter, using the newly generated path, and then unmounting?

View 4 Replies

Add Classes And Custom Form With Code In A Setup Project?

Jul 22, 2010

I have a main application and the setup project for the app in a single solution.I have custom classes to detect in sql server 2005 express is installed. if it is not I have classes to install it and create my database.Now I need to call the above classes from my setup project before it installs my actual application on a client pc.

View 2 Replies

Implementing .Net RIA Services With Silverlight3 Using Only Existing Code / Classes?

Oct 20, 2009

As my latest questions have stated, i am in a process of researching on Silverlight 3 and its application as a suitable RIA solution to a pre-built project a client of ours wishes to webify. And my experience in .Net and silverlight is about 3 - 4 weeks.I have now become aware of .Net RIA Services. I require to use an existing VB class; which was created as a quick wrapper class to emulate a small piece of the client's application code. This is used as a proof of concept. It contains one function which uses the client's DLL files to return a simple data type This class has already been used successfully with Flex/Weborb combination.I unfortunately do not have enough knowledge or experience in Silverlight/RIA Services to grasp what it is i have to do to get the file working. All the examples I find online only specify the method where you use a database as dataSource etc.Could you please inform me how i would go about implementing RIA Services with Silverlight 3, using existing code/classes with no DB? Or could you point me in a direction for further research on the matter?

View 1 Replies

Script Task: Write 2 Classes And Access Global Variable

Mar 18, 2012

Can i write 2 classes for one Script Task editor in SSIS(2008). I tried to access the global variable like below. I created 2 classes and it doesn't show any compile error, but i couldn't access the global variable in class2 which was assigned as 2 in class, ScriptMain.

[Code]...

View 1 Replies

Throw System.Exceptions From Within Custom Classes To Calling Code

Jul 9, 2010

I Have just been watching a video on throwing Exceptions. Are you supposed to throw System.Exceptions from within your custom classes. to the calling code, Which other way can they communicate. I have read in several places it is bad practice to throw SystemExeptions.

View 3 Replies

Reference To Any Code Classes For Enabling Selection Of Folder Via A Dialog Window

Mar 30, 2006

I could use a reference to any code classes for enabling the selection of a folder via a dialog window.

View 5 Replies

Use LINQ To Filter Collection Of Nested Classes To Yield Dictionary Of Unique Properties Of Those Classes?

Jan 23, 2012

I have two classes, one nested in the other. [code]Neither "Name" or "ID" are unique between operations and records.I wish to construct a dictionary using LINQ = Dictionary(Of String, Of List(Of Integer), whereby the keys are uniqe examples of Names in my collection and the values are the collective set of distinct IDs that are associated with those names.

View 2 Replies

VS 2010 Structure Classes So That The User Interfaces Though A Single Class While The Supporting Classes Are Hidden From Their View?

Jun 13, 2012

How can I structure my classes so that the user interfaces though a single class while the supporting classes are hidden from their view? I think its best understood in an example:

Public Class MyInterface
Public Economic as EconomicClass
Public Sub New()
MyBase.New()

[code].....

So you might ask why am I even separating them? It's strictly for others who will be working with this interface. I need to funnel them though a logical structure:

interface.Economic.MyMethod
interface.Currency.MyMethod
etc

This way everything is already handled for them in the background and they only need to run the method they need. I don't know if I can have it both ways in VB.NET.

View 23 Replies

VS 2010 Calling Subs And Functions Within Classes That Are Within Classes?

Oct 24, 2009

Here is some example code of what I mean:

vb
Public Class Form1
Private Sub Button1_Click(ByVal sender as Object, e as systemEventArgs) Handles Button1.Click

[Code]....

View 5 Replies

Derived Classes Cannot Raise Base Classes

Jul 10, 2009

I m trying to raise Click event of Textbox explictly but I m getting "Derived classes cannot raise base classes" error.[code]....

View 1 Replies

Example Code To Work To Access An Access Database Through Automation?

Oct 13, 2010

I have a similar problem posted in the forum similar to this : started learning VB. I am not able to get my example code to work to access an Access database through automation. The author of my book suggested that I might not have the correct Jet 4.0 engine. The specs I have are: MSJet40.dll, Dated 7/14/2009, Prod Ver 4.00.9756.0.

View 3 Replies

Simple Inventory - Program Using Classes Hard Coded - Database Named "DATABASE" In Ms Access 2003

Sep 29, 2010

I want to create program in vb2008 express with ms access database. Can somebody help me so i can learn how to program using classes hard coded. I have learned vb6 before but it has a big difference on vb2008.

I have a database named "DATABASE" in ms access 2003 and the details are: Table :

EMPLOYEE(EmpNo, EmpName), DEPARTMENT(DeptID, DeptName), CATEGORY(CategoryID, CategoryName), SUPPLIER(SupplierID, SupplierName), ITEM(ItemID, Itemname), ITEMLIST(ItemListID, ItemID, ItemDescription), INVENTORY

[CODE]...

All the CAPITALIZED name are Table and all items inside the parenthesis are fieldnames. I don't know where to start on working on this RECORDS. I was able to understand visual basic 6 a bit, and i am trying to apply the coding to VB 2008 but all i get is errors. I am hopeless now and i need help to be able to start my programs. If someone can give me a sample code, i think i would be able to trace the line of code to be able to understand it. I am currently an inventory manager on the small company i was working with and i like to organize my record by using database.

View 1 Replies

Loop And Enumerate Properties Of Nested Classes In Nested Classes?

Sep 24, 2010

so far i got

code
For Each item As Reflection.FieldInfo In GetType(NameSpace.ClassWithNestedClasses).GetFields
rtfAppend(item.Name & ":" & Tab & item.GetValue(Me))
Next
For Each item As Reflection.PropertyInfo In GetType(NameSpace.ClassWithNestedClasses).GetProperties()

[code]...

which gets me the simple string vars and properties of my top class, but how can i apply this to loop through all sub classes and get there vars and props?

View 1 Replies

VB XML Classes Vs String Classes?

Oct 13, 2011

Searching the internet finds no less than 700 different ways and opinions to accomplish what I'm trying to do, and I would just like to know the simplest, most bullet-proof way possible.

[Code]...

I simply want to extract the string "bar," which is inside <hostName></hostName>I can do this easily enough with simple string functions, but I'd like to do it with one of the .NET XML classes/methods.

View 2 Replies

How To Access Non-asp Img Tag From Code Behind

Nov 3, 2011

We're working on a big project and we're stuck a bit here.I need to access the <img>'s from an .ASPX from the code-behind on the PageLoad() to assign the right image (attrib src) depending on the value we just collected from the DB from an SQL Query.We can't use the runat="server" attribute to see it server side because we got a bunch of jQuery using the img name tag to work with.I'm sure there's a way to access and modify the src attribute of the images from the code behind view?

View 3 Replies

Access Database Instead Of Code?

Jan 14, 2012

I am using vb 2008 and this is a simple project to use split function to translate English language to Arabic but the problem with database it be in code (array) can anybody make this project use access database or other database instead of [code]...

View 1 Replies

Access ProgramFiles(x86) In Code?

Dec 5, 2009

I have and application in VB 2005 that runs on a 32-bit os right now. One of teh first things it does is call a an API from Novell GroupWise like such, which allows ir tun on either OS but I can't email from the program like I can on 32-bit. Is tehre anyway under the 64-bit section to use the api which on the 64-bit box i assume is in (x86) since GroupWise client installs as a 32 bit app.'determine 32-bit or 64-bit OS

If IntPtr.Size = 8 Then
'64 bit machine
ElseIf IntPtr.Size = 4 Then

[code]....

View 8 Replies

Code To Access Database?

Mar 8, 2010

Doe anyone have a code that can be used for access database or were to put the code? In class they want us to use a Access program but we havnt taken a class on it. I have everything up and running so far but I want the information to transfer between the VB adn database and I am not getting to far.

View 1 Replies

Edite MS Access Via Code?

Mar 15, 2012

I have MS Access Data Base with tow tables table 1 has relashiship with Table 2 when I try edite tabe 1 error message shown

View 3 Replies

Set This Code At Boolean In Access 1 And 0?

Mar 25, 2011

CheckBox1.Checked = DataGridView2.CurrentRow.Cells(10).Value
CheckBox2.Checked = DataGridView2.CurrentRow.Cells(11).Value
CheckBox3.Checked = DataGridView2.CurrentRow.Cells(12).Value
CheckBox4.Checked = DataGridView2.CurrentRow.Cells(13).Value
CheckBox5.Checked = DataGridView2.CurrentRow.Cells(14).Value

how to set this code at boolean in access 1 and 0..

View 3 Replies

Access Compiler Constants In Code?

Jan 11, 2011

Is it possible to use a constant defined by the compiler in code like below?[code]...

I'm running batch processes and I'm experiencing problems with one of my customer's data. I want to add special code for only that customer, but I want to keep the code there so I can easily switch the customer ID in the future should i need to debug a different customer.[code]...

View 2 Replies

Access Crystal Report Through .Net Code?

Sep 6, 2010

I have a Crystal Report that I am trying to access thru my VB.Net app. My problem is that I keep getting a "Database Logon" prompt (see screenshot). My code is below and I think I might have more than I actually need. I created the report from with the VS 2008 IDE.

Private Sub rptSingleWorkOrder()
Try
strSQL = "Select A.productName, " & _
"A.productDesc, " & _

[code]....

By the way, this code runs cleanly completely thru from the time the procedure is called until it exits.

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved