VS 2008 Expose "Stop" Properties In Route Class?

Jan 17, 2010

I have two classes clsRoute and clsStop. Each route has a collection of stops. So I created a Stops collection in the route class and a method to add stops and remove stopsThis seems to work for me. owever, the clsStop properties that I declared are not showing in intellisense.i.e. oRoute.Stops.item(i).StopName and oRoute.Stops(i).StopName

Public Class clsStops
Private _stopNumber As Integer = 0
Private _stopName As String = String.Empty

[code].....

View 4 Replies


ADVERTISEMENT

Expose A UserControl's Properties To Properties Window In Designer?

Aug 19, 2009

Is there a way to expose a UserControl's properties to the Properties Window in the Designer?

View 3 Replies

VS 2008 Making Property In A Class Expose An ENUM?

Jul 12, 2009

I've got this in a public module

Module PublicModule
Public caseBAL_C As caseBAL
Public clientBAL_C As clientBal
Public Enum CSFlags

[Code]...

It doesn't like the Public Property StateFlag() As CSFlags -it's saying that CSFlags

'StateFlag' cannot expose type 'PublicModule.CSFlags' outside the project through class 'caseBAL'.

View 2 Replies

C# - New COM Component In Old Codebase Does Not Expose New Properties?

May 15, 2012

I maintain a WinForms application that uses a third party COM component. We recently upgraded to a new version of the component with some additional properties/features (all old properties are intact), but I could not get Visual Studio to detect the new properties. It acted very much like it was hanging onto a reference to the old version of the component. Here are the steps I took to try to clear it:

Deleted the form that was consuming the component (copied out code first). The only control on this form was the third party component.
Removed the reference to the old component Deleted the bin and obj folders in the solution directory so that the PIA's would get newly created when I added the new control Uninstalled the old component, installed the new one Opened the solution, added the reference to the new component Added a form to the application, dropped the component onto the form and gave it the same name the old control had (so that the rest of the application didn't have to be refactored Pasted the form code back in place At that point the application would compile and run, but I could not get Intellisense to detect the new properties, and if I put them in place anyways the application would not compile. Nothing I tried would get the new properties to show.

View 1 Replies

UserControl Expose FONT Properties

Jun 23, 2009

Creating a usecontrol:

The control will have numberous properties available at design and run time.

I am having trouble creating and exposing FONT properties for the child objects.

Example: The control will have a label with a designtime and useradjustable Display font. I wish to

1) be able to set the Font attributes via the properties dialog at design time.

2) set those properties via GUI at runtime.

The problem...

Code:

Private propArtistHeaderFont() As Font
Public Property ArtistHeaderFont() As Font
Get

[Code].....

So clearly I can not pass the FONT properties back and forth via the SET/GET method.

View 2 Replies

Expose Properties Of A WPF Control To The WinForms Host?

Apr 19, 2011

I've got a WPF control hosted inside a Windows Forms form via ElementHost. My WPF control (let's just call it WpfControl for the sake of an example) contains a variable that I'd like to expose to my Form.

View 1 Replies

Use A Single RouteURL To Route To Different Pages Dependent On The Route Name?

Mar 22, 2012

I am trying to use a single RouteURL to route to different pages dependent on the Route name but when I click on a button within my aspx page the page gets routed back to itself:Here is what I have in my Global.asax

Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs on application startup
RegisterRoutes(RouteTable.Routes)[code].....

View 1 Replies

Expose Methods And Properties Of User Controls Contained In A Collection?

Mar 9, 2009

at some points, I need to call the same method on those controls (ex. user presses the clear button on the big control, I want to call the clear f(x) on each of the controls)I thought to toss the controls in a collection, and then be able to handle them something like this:
nextturns out, and I should have realized, methods and properties of controls are not exposed when treated this way. The only thing that can be seen is the stuff that the base class (control, I guess) has.

View 2 Replies

.net - Expose Methods Of Nested Class?

Apr 23, 2012

I have a Public Class called "ClientConnection". Inside that class, I have a Public ReadOnly Property called "FileTransfers(ByVal TransferID)". The property returns an object of the class "FileTransfer". All methods in FileTransfer are set to public.

VS is able to discover the methods inside the parent class "ClientConnection". How would I expose the methods inside the sub-class "FileTransfer" that is returned by the property "FileTransfers(ByVal TransferID)"?

Public Class ClientConnection
'irreverent code removed
Public ReadOnly Property FileTransfers(ByVal TransferID As Integer)

[Code].....

View 1 Replies

Cannot Expose Type Through A Class File?

Jul 23, 2009

Does this mean that the type is not set up correctly?If you're not living on the edge, you're taking up too much room

View 5 Replies

Expose A Function Inside A Module In Class Liberary( DLL)

May 20, 2009

I wand to Expose a function inside a module in my Class Liberary( DLL)

module Module1
Public Function Add(val1 , val2) as double
return val1 + val2
End Function
End Module

View 7 Replies

Transactions - Expose Private Fields Using A Partial Class?

Nov 12, 2010

I am trying to implement transactions across multiple TableAdapters in VB.NET (using Visual Studio 2010) by extending the partial class as described in the following examples:

http://blah.winsmarts.com/2006/06/18/the-definitive-tableadapters--transactions-blog-post.aspx
madprops.org/blog/typed-datasets-and-sqltransaction/
stackoverflow.com/questions/2342289/net-tableadapter-to-dataadapter

However, when I attempt to expose any of the private fields created by the designer they are underlined in the editor with the following error:

'_adapter' is not declared. It may be inaccessible due to its protection
level.

Searching this site as well as google has not revealed anything useful, but perhpas I'm searching the wrong keywords.

Here is the code in MyDataset.vb

Partial Public Class MyTableAdapter
Public Property MyTransaction() As SqlTransaction
Get

[code]....

View 1 Replies

VS 2008 Adding Properties To Class?

Aug 4, 2009

I created this custom listbox, and I want to change the border of the focus rectangle, so I made up this property:

vb.net
Private H_BorderColor As Pen = Pens.Black
Public Shadows Property HighlightedBorderColor() As Pen

[Code]....

But when I'm at the designer tab that property is editable, I attached a screen shot of the properties box.

View 10 Replies

VS 2008 Using ENUM Definition In Class Properties?

Jul 28, 2011

In a global module, I define a new type that can take 4 values:

enum tAction as integer
None
Update
Insert
Delete
end enum

A use this type in many places in my code to check the value stored in a variable (if MyAction = tAction.Delete then ...)

In a separate file, I define a class. One of the properties should return a value of this type:

public class XXX
private _Action as tAction
public property ClassAction() as tAction

[Code].....

This way I could check a class property in the same manner (if MyClass.ClassAction = tAction.Insert then ...)

However I get a syntax error in the property definition: 'ClassAction' cannot expose type 'Globals.tAction' outside the project through class 'XXX'

My entire program consists in a few modules, in a single project. How can I use my tAction definition in my classes?

View 4 Replies

VS 2008 PropertyGrid Class Properties - Define The Color

Oct 21, 2009

1 - Need to create a kind of composite property, like the font property, that it's showed with a plus sign to expand. For example i need to define a new pen, i need to define the color and the width... 2 - I need to define the color for one brush, but if i create a property of the type brush in the PropertyGrid it appears like "System.Drawing.SolidBrush"

View 2 Replies

Trace Route In Vb 2008 Express

Dec 9, 2009

im looking to do a trace route to an ip (specified in a text box) and have the results displayed in a textbox. I know that this has been brought up in the forums before but im yet to find a version thats compatible with vb 2008 express edition. The vb.netmvps example is exactly the functionality im looking for but it throws up 80 +errors(*** is no longer supported etc)[URL]the host resolution isnt an issue becasue i already have the list of ip's and corresponding host names that i would be tracing in a db.

does anyone have a tracert app that is compatible with this version of vb or indeed know where i could find one ?

View 2 Replies

VS 2008 Properties In 'groups' (class) In Designer (property Grid)?

Jul 29, 2009

I'm creating a UserControl that draws a simple radial gauge. I need it to be very customizable; the user should be able to customize everything such as the colors, fonts, sizes. So, I just made a property for every customizable detail. For example, I had ScaleFont, ScaleColor, ScaleStart, ScaleEnd, ScaleInnerRadius, ScaleOuterRadius, ScaleTickmarkFrequenty, etc.. etc.. etc...

Because there are so many properties about the same subject, I wanted to 'group' these properties into one "property". I've seen this done loads of times in third party controls, but I've never done it before myself.The idea is that the properties can be accessed like

Me.Gauge1.ScaleSettings.Start = 10
Me.Gauge1.ScaleSettings.End = 80
...

So far, I tried creating a class for each group, for example a clsScaleSettings class, containing properties like Font, Color, Start, End, InnerRadius, OuterRadius, TickmarkFrequenty, etc (corresponding to the same properties as above).

Then, for every 'group' or class, I create a Property. For example, I have the ScaleSettings property, which simply returns an instance of the clsScaleSettings class (I initialize the instance only once of course):

vb.net
Private _ScaleSettings As New clsScaleSettings
Public Property ScaleSettings() As clsScaleSettings

[code]....

Now, this works in the code editor. I can now use

Gauge1.ScaleSettings.Font = Me.Font

for example, and it sets the font correctly.But, I does not work in the designer, in the Property Grid. The whole reason I made the effort to move and rename nearly all properties (about 70!), and all references to those properties, to separate classes, was so that the user could design the gauge more easily using the Property Grid!Instead of having 15 settings related to the scale, scattered all over the Property Grid, he can now have one ScaleSettings property, which he can expand, and then he can edit the properties of that group easily.The ScaleSettings property is greyed out in the property grid... So I cannot expand it and view it's underlying properties.

View 16 Replies

VS 2008 Set A User Control (or A Class With A Few Properties) To Appear In The Tan Bar At The Bottom Of The Designer?

Apr 5, 2010

How do I set a User control (or a class with a few properties) to appear in the tan bar at the bottom of the Designer? I have tried googleing it but, I don't know what that bar is called (Kinda Hard to Google without know what to Google)

View 2 Replies

VS 2008 - Route - Take For My Program As Far As UAC And Vista Is Concerned

Jun 1, 2009

This is an extension of this post: [URL]

The reason I am starting a new thread is to be more concise; explain the exact issue I now face in detail. Reading my last thread may help, but what I provide here should be sufficient. I am basically trying to find the best route I should take for my program as far as UAC and Vista is concerned. My program (SysPad) is accessible through my sig).

My program requires constant write access. The purpose of my program is to provide access to a quick notepad-esque program that is directly accessible from the Notification Area. It saves every time the user types into one of the textboxes.

The issue lies in the fact that when UAC is enabled on Vista, there is no folder that is writable to without elevation to Administrator rights. The hitch is that my program is designed to be a startup utility and the issue is that a user who has UAC enabled will have to allow my program through UAC confirmation every time my program runs at startup.

Basically, I am looking for options that will resolve this and make it less "painful" on the end user who uses UAC.

Basically, the only idea I've been able to come up with that is least annoying/intrusive, is to create a Launcher.exe program that does not require elevation and have it sitting in the Notification Area with the same icon as my program at startup. When the user goes to access the program, it then launches the actual program (exiting the launcher) thus invoking the UAC verification.

Of course this would happen every time they boot their PC or restart my program; but, at least they won't be asked for UAC verification as soon as their PC boots.

Does anyone have any other suggestions? I really would like to get this to work with UAC as best as possible. Otherwise, I could just make my program check if UAC is enabled, and if it is, tell them they can't use my program lol. But, I'd rather not do that.

View 18 Replies

VS 2008 Custom Class Called CustomItem That Holds Name And 'SomeProperty' Properties

Apr 22, 2009

Let's say I have a custom class called CustomItem that holds the Name and 'SomeProperty' properties:[code]Now, on the click of a Button, I want to select the CustomItem whose SomeProperty is equal to "Property 4". Of course, this is just "Item 4", but the names and properties are not that correlated in the real application than they are in this example.I have spent ages a long time ago figuring out how to do this. I could not directly set the SelectedItem, because I first need to get the CustomItem that actually matches my condition (SomeProperty = "Property 4"). My solution was to use a loop, looping through each item in the ListBox, and setting the SelectedItem when the right property has been found.[code]Now, is this the correct way to approach this problem? Is the LINQ query correct, or can it be done easier, without the casting? Also, is the LINQ query faster than the For loop, especially for a large amount of items? I expect it to be, but I don't know how to test this.

View 4 Replies

DLLs - Error "newForm1 Cannot Expose Type 'form1' Outside The Project Through Class GlobalData"

Feb 18, 2010

For a test scenario I have a dll project. In the project I have 1 generic class 'GlobalData' and 1 form 'form1' in the generic class I would like to make a public shared newForm1 as new form1 the line of code I'm trying is: Public shared newForm1 as new form1 I get the error newForm1 cannot expose type 'form1' outside the project through class 'GlobalData'. I really need to be able to make a public shared reference to form1. Any way to get around this? Background as to why I need to do this: I have several projects that need to use Form1 as a mdi child. I would like to just update the dll and not have to go back and update the same form in 50 projects.

View 4 Replies

Can't Inherit Shared Properties From A Base Class In A Child Class?

Dec 29, 2010

This is another one of my "I think it's not possible but I need confirmation" questions.I have a base class for a bunch of child classes. Right now, this base class has a few common properties the children use, like Name. The base is an abstract class (MustInherit)Technically, this means that everytime a child class is instantiated, it lugs around, in memory, its own copy of Name. The thing is, Name is going to be a fixed value for all instances of a given child. I.e., Child1.Name will return "child_object1", and Child2.Name will return "child_object2".

View 1 Replies

Class With Class Properties: AObject Reference Not Set To An Instance?

Aug 19, 2009

I have a class in which some of the fields are also classes.I can put values in the "normal" properties, but in the others when o try to assign values it gives the: "Object reference not set to an instance of an object"But the code compiles fine.

dados_Defenicao = New ServiceReference1.draftClaimEntryDefinition
dados_Defenicao.arCode = "123"
dados_Defenicao.claimMarket.warrantyType = "w" - Here it gives the error

How can i fix this ?

View 6 Replies

Class With Class Properties: Object Reference Not Set To An Instance

Aug 19, 2009

I have a class in which some of the fields are also classes.

I can put values in the "normal" properties, but in the others when o try to assign values it gives the: "Object reference not set to an instance of an object"

But the code compiles fine.

dados_Defenicao = New ServiceReference1.draftClaimEntryDefinition
dados_Defenicao.arCode = "123"
dados_Defenicao.claimMarket.warrantyType = "w" - Here it gives the error

View 4 Replies

VS 2008 : Expose HTTP Access To A Background Service?

Dec 16, 2011

I'm creating an executable that will run as a background service.I want to communicate with this executable with a browser - similar to how you talk to sophisticated copiers in a big office.and was told to build an HTTP interface in that app.All the examples of httprequest and httpresponse I can find are about talking to web sites - or public services.How would I go about having my app "fire an event" when an async POST is made from a browser page? How do I wait on a port in the app?

View 1 Replies

VS 2008 Stop Threadpool With A Stop Button?

Dec 24, 2009

I have a simple application that use thread pool to read a file and input the data into a listbox. I want to be able to stop threadpool from running after clicking a stop button. How do I stop threadpool? Here is the code for my application below:

Imports System.Threading
Public Class Form1
Private Delegate Sub StringDelegate(ByVal text As String)

[Code]....

View 6 Replies

C# - .NET: Getting A Class To Copy Properties Of One Class To Another?

Nov 10, 2010

I wrote a function that copies the properties of one class to another so make a copy of an object.So something like

MyObject myObject = myOtherObject.MyCustomCopy(myObject)
where myObject and myOtherObject are of the same type. I do it by bascually doing
myObject.prop1 = myOtherObject.prop1

[code]....

I am pretty sure in the past I used a .NET object that automaticaly did this, by reflection I guess, but can't remember it ... or an I imagining that such a method exists?

View 5 Replies

Timer In Class Won't Stop

Jun 29, 2010

I have a class (e.g. see Client class below) that holds details of clients that are connected to a server app of mine. In the class is a timer of type (System.Timers.Timer) which is supposed to act like a timeout notifier. When I send a message to a client I start the timer within the corresponding object. When I receive a message from a client I check where I received the message from and stop the timer in the corresponding object. If I dont receive a message within the defined period then an event is raised from within the object and I resend the message again. I do this a maximum of two times before giving up.[code]...

View 9 Replies

VS 02/03 : Stop Timer From Another Class?

Oct 3, 2009

how to stop timer from another class?let say:I have a timer object started in Class A and I want to stop that timer in Class B..how can i do that?

View 3 Replies

Class Properties Won't Set?

Jan 22, 2010

as you might guess from the variable names I'm making a game (but this problem isn't game related!) which involves multiple "bullets" moving along straight trajectories. This is my attempt at changing my code for firing one bullet into one for firing many bullets at once. It works perfectly except for one thing.The class I made (BulletClass) to contain all the things needed to move the bullet isn't setting all of its properties correctly. I apologise for the walls of code however I wasn't entirely sure whether I should chop bits out. I wanted to colour code my code so that you could scroll through and see the subs where things have gone wrong, but apparently I can't even code a new thread. Let alone a video game. Instead I'll just list them, you can search for them if you like or just scroll through at your leisure.

[Code]...

In a nutshell: the properties TargetPosY, TargetPosX, ShipPosX and ShipPoseY are not working properly. As a result the calculations involving them are skewed and the bullets always travel directly downward.

View 2 Replies







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