Purpose Of GET SET Property Versus Just Declaring It As Normal?

May 23, 2012

I have been wondering for a while what the difference is between the following two:

Public Property ProgressMaxValue() As Integer
Get
Return maxval
End Get

[code]....

View 2 Replies


ADVERTISEMENT

VS 2008 - Normal Versus MDI Form (Memory Consumption)

Mar 11, 2010

I did a project (College Management) in vb.net 2008 which contains 13 forms in it. I designed the different functions in a different normal form, i.e. frmAdmission, frmSearch etc. When the project run's the main form is loaded. When user chooses a particular function say 'frmSearch' then the main form is unloaded and the form frmSearch is loaded. Now my lecturer told me to use MDI forms instead of normal forms because, normal forms takes larger memory than the MDI forms.

View 5 Replies

.net - Getting An Advantage To USING Versus Declaring A Context Variable?

Nov 5, 2009

These two snippets do the same thing - is there one that's better than the other, or is it just a matter of preference?

Using context As MyDatabaseDataContext = New MyDatabaseDataContext()
Dim test = context.Employees.Count
End Using

vs.

Dim context As MyDatabaseDataContext = New MyDatabaseDataContext()
Dim test = context.Employees.Count

View 6 Replies

What Is Purpose Of Public Property

Jan 9, 2010

What is the purpose of Public property? why would i do this instead of just doing Public abc as string? [code] Because you may want to do data validation on it before assigning the value to the Private variable. Because you might want to raise an event when the value in the Private variable changes. Because you might later want to make it a ReadOnly property.

View 12 Replies

C# - What Is The Purpose Of Adding BindableAttribute On A Property Of A Custom Control

Jun 27, 2012

I have seen that BindableAttribute is used to decorate public properties in custom controls. MSDN briefly mentions that it provides the ability to control the binding direction and whether binding is supported at design time.

public class MyControl : Panel
{
[Bindable(BindableSupport.No, BindingDirection.OneWay)]
public string MyString { get; set; }

[code]....

1) I set BindableSupport to No, however I could still do this in markup (.aspx).What does BindableSupport affect then? Does it hide the property in the toolbox?

<cc:MyControl runat="server" MyString="something" />

2) How does one-way binding and two-way binding work in the context of custom controls and ASP.NET?

View 2 Replies

Difference Between Using The 'array' Class In VB And Just Declaring An Array Like Normal?

Mar 12, 2010

What is the difference between using the 'array' class in VB and just declaring an array like normal. In other words, what is the difference between:

Dim numOfTicketsPerDay As Array
Dim intNumOfTicketsPerDay(6)
As Integer

Is there any preference of when one should be used over another?

View 2 Replies

Declaring Property In ASP.NET 4.0

Sep 2, 2009

I haven't check yet all the new features of ASP.NET 4.0 but I'm wondering if one of those features (VB syntax) is declaration of class properties oppose to C# in less code.[code]

View 4 Replies

Properties Statement Used For Declaring Name Of A Property

Jun 28, 2009

i have read on the msdn and know properties statement used for declaring the name of a property, and the property procedures used to store and retrieve the value of the property.i learned about structure of it. but i cant figure out it clearly. [code]

View 3 Replies

.NET - Use A Property Versus Variable + Accessor Function?

Nov 2, 2009

Is there ever a situation where I should do the following in .NET instead of using a property with read/write capability?

private S as string
public function GetS() as string

[code]....

Do properties simply provide a more efficient way for doing the same thing?Will properties be any slower than the above accessor functions in a high performance application?

View 3 Replies

CheckBox DataBindings - Checked Versus CheckState Property

Jan 18, 2010

What are the pros and cons of using the checkboxes checked property vs the CheckState property for databinding?

View 1 Replies

Late Binding - Declaring A String Variable And Assigning The Item Property?

Nov 27, 2011

I have a problem involving late binding, and I absolutely cannot for the life of me figure out how to fix it. I have spent hours researching the problem to no avail, so I am turning to stackoverflow as a last resort.The problem is pretty much this: I am creating a grocery list application. I have a class named Item which stores the name, price, quantity, and description of an item on the grocery list. I have a module named ListCollection which defines a Collection of Item objects. I have created an Edit form which will automatically display the currently selected ListCollection item properties, but whenever I attempt to fill the text boxes, it tells me that Option Strict disallows late binding. I COULD take the easy route and disable Option Strict, but I'd prefer to figure out what the problem is so I know for future reference.I shall paste pertinent code here. (Late binding error is in EditItem.vb)

[code]...

I have tried declaring a String variable and assigning the Item property to that, and I have also tried grabbing the value directly from the List item (not using the Get function), and neither of these made a difference.

View 1 Replies

[2005] Today.date Versus Now Versus DateTime.Now?

Jan 16, 2009

just want to know what is the difference between these date values?Once some one told me that its difference is server date and client date but not sure which one he meant.Below is 3 type of date currently I'm using and don't know what is the difference between them.

DateTime.Now is from System.DateTime.Now
Now is from Microsoft.VisualBasic.DateAndTime
Today.date is also from System.DateTime

View 4 Replies

C# - What Is Purpose Of '' Operator In Vb

May 16, 2011

I want to know what is purpose of '' in vb ? I have this statement: frontDigitsToKeep 2 and I want to convert it to C#.

View 2 Replies

What Is The Purpose Behind The OnXXX()

Aug 31, 2010

I just don't understand the OnXXX(). What are they? What do they do? When should you use them?

View 2 Replies

Purpose Of Dividing Saturation / 50 And Hue / 50?

Aug 17, 2009

i am controlling the hue and saturation of the backcolor of the form with scrollbars:

Private Sub tbHUE_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbHue.Scroll
Dim r, g, b As Integer
HSVtoRGB(r, g, b, tbHue.Value, tbSaturation.Value / 50, 255)

[code]....

i would like to know what is the purpose of dividing by 50?

View 3 Replies

VS 2008 - What Is The Purpose Of Interface

May 12, 2009

What is the purpose of Interfaces? it's just a collection of properties, method and events which can be used over and over again by different classes. Its no different than declaring the needed method or property in the classes separately rather than using Interface (because in Interface, you have to write the inner working in each classes implementing the interface). Is there a case where an interface comes in handy (I mean cases where Interfaces are absolutely necessary, without them the program won't work)?

View 9 Replies

What Is The Purpose Of The Function CLine

Jul 21, 2009

What is the purpose of the function CLine, because it is used in my code and it isn't a member of the namespace it is attached to in the vb6 code pasted straight into visual studio 2005, what would it do in this context:

frmXML.CLine = 1

frmXML is a visual basic.net windows application.

View 15 Replies

Dual-purpose Cut/Copy/Paste ?

Jul 19, 2010

My app displays a list of records in a DataGridView on the main form. I've developed code for cut/copy/paste for the selected records and have put the code behind Cut/Copy/Paste menu items under a classic 'Edit' menu design, with the standard shortcut keys(Ctrl + X, Ctrl + C, Ctrl + V).

The trouble is, I also want the shortcut keys to work on selected text when I'm editing inside text fields on a record in the DataGridView. So I need the shortcut behaviour to change depending on whether I'm editing a record or selecting record(s).

View 5 Replies

IDE :: What Is The Purpose Of 'Merge Module Project'

May 11, 2012

I'm am wanting to create a setup Project and see that there is an option to create a Merge Module Project. The description is not clear to me. That is, it says 'Create a Windows Installer Merge Module project to which files can be added'

View 2 Replies

.net - The Intended Purpose For <app Name>.exe.config File In A .NET Forms App?

Sep 21, 2010

I am currently reading up on documentation for a possible assignment I might be put on. In a design document they talk about the .exe.config file. They state that its only purpose is to store constants: "Also note that this file is meant to store constants only, it is not meant to write configuration values to (and the .NET 1.1. framework even prevents this by not offering classes/methods to do so). Therefore, configuration is written to XML files using a..."As far as I understand, this is not true. I don't know about .NET 1.1 preventing this, but I remember in my last project that I did write configuration values to that file (I saved GUI contents there). My project was a small prototype, so maybe I did it wrong, but I do not think so...So what is the intended purpose of this file?

View 3 Replies

Call A Delete Function For Different Database Purpose?

Apr 6, 2011

How to create a delete in used to delete my sql database from different database without decalre one by one in vb applcation

View 1 Replies

Comparing Different Integer In Select Case For Different Purpose?

Feb 23, 2009

I have a question regarding Select Case. I am comparing different integer in select case for different purpose. I want to run some code on the case when number is not from the list of below mentioned.Can i use this as i mentioned below in Select case?. If not then what does mean. It don't give me any error. Case Is <> 307, Is <> 1, Is <> 12, Is <> 14, Is <> 56ThanksDalbir Singh

View 3 Replies

Internet Application:Developing For Personal Purpose?

Mar 17, 2011

Just knowing 20 commands i am developing a app?very impressed on myself!Just knowing 10 commands + common sense + special sense each man has i had world most dangerous spy tool....but on my guru & best friend advice i dropped it..but in future will use for good purpose So here is the new scene We are team of workers had blogs,microblogs and other things i decided to create a tool for my self which is like office assistant to assist in our work at office

my tool will do the submission process when we are not in our office

my idea is using a web browser control and do it with vb commands

so kindly think yourself in such position do you agree to do submission task with web browser control or you can do it some other methods?

whats your opinion? what i mean open a website on web browser control submit the details from listbox(which increment on every submission)i think you now got how we are going to do this!!!

so i am need some one advice shall i proceed with this?i had three big challenges

1.Time
2.Yes Of Course Time
3.Ya Time But Time + Work Accuracy

so kindly guide shall i use the web browser control or use method like direct server post?

View 1 Replies

MonthCalendar Object - Application For The Purpose Of Testing

May 6, 2010

CODE:

Im making basic application for the purpose of testing the object... Basically when i press the button it sends the info to a 2nd form... when i do the date of registration is set automatically. However the date displays correctly but not the time 12:00:00 no matter what...

View 2 Replies

Unable To Understand Enumerator's Reset's Purpose?

Dec 30, 2009

if a call to For Each starts by calling the Enumerator's MoveNext, then Current, then MoveNext, then Current, and so on until MoveNext returns a False then it exits, am i right to say that the Reset is never called?initially i thought that Reset would be called when MoveNext returns False, i tried this (a msgbox would come if it was ever called but i got no msgbox at all)

[code]...

if that's the case, what exactly is the use of the reset in an ienumerator, and is it ok to leave it empty, as such

View 4 Replies

Using GroupBox For Purpose Of Grouping Radio Buttons

Sep 21, 2010

I am finding it is not possible to use GroupBox (for the purpose of grouping radio buttons) in a Windows Mobile Application. Is there an alternative to this so I can group radio buttons in a Windows Mobile App?

View 1 Replies

Database - Replacement For Ms Access Db For Multi-LAN User Purpose?

Apr 27, 2012

I have been using access for my applications from over 4 years now. I realize its time to move on now and i need suggestions for a new database. Here are my requirements :should be able to connect it with Vb.net windows form frontend GUI - all database functions such as add/delete/edit/update will be done through the vb.net front-end only.Should be able to place the db on LAN and each client on the LAN can then access the centrally stored db through their individual front-ends.At the most 5-6 users will be reading/writing to the database at the same time , so the database should not crash or slow down Since i come from MS access background, i would like something thats similar to it so that i can learn and adapt to it quickly.Not very important, but i think its worth mentioning. This db will be the main central db for my .net application.My .net application will also be interacting with quickbooks and magento via some apis but ultimately all this data will go to the central db. So just curious, will there be any compataibility issues with the database that you suggest Should handle about 10 tables and around 10k records in each table Should be secure - just that i should be able to lock it up or anyhow prevent it being accessed from anywhere else other than the vb.net front-end.

Lastly, I would prefer it to be free to use if possible but not essential. I realize there are some topics like mysql vs sqllite and on databases, but pls understand i need suggestions for one that will be apt for the purposes i have listed above.

Edit : Just curious - Would i pushing the limits if i still stick to access - i understand access won't be good for multi-user access but i guess 5 users is not much ?

View 3 Replies

Dynamic Draggable Labels On Chart For Notation Purpose

Jul 22, 2010

I am deveolping a charting program and have a need to have dynamic draggable labels on the chart for notation purposes. Everything works fine until I try to drag a label past the 32767 (16 bit limit).

Here is the code that I drag the label with:
If ISDRAGGING = True Then 'DRAGGING LABEL
If CURRENTLABEL.Tag = 2 Then
CURRENTLABEL.Left = 0
[Code] .....

I have tried to create a new label and override the Top value with a Long Value, but it still does not do the trick. Hhere is my attempt to overload the top value to an integer.

Public Overloads Property Top() As Long
Get
Return _Top
End Get
Set(ByVal value As Long)
[Code] .....

The charts are dynamically generated from a database and represent depths. Usually at least 10000 feet are plotted at 5 pixels per foot. So some labels will be created or dragged below this 32767 line regularly. Any way to be able to drag the labels past this limit, or possible another option to be able to view these long charts.

View 5 Replies

Give Meaningful Names To A C# And .NET Project In The Same Solution With The Same Purpose?

Jun 12, 2012

I have two projects that contain extension methods. One project is implemented using C# and the other is implemented using VB.NET as there are some things I can do in VB.NET that I can't in C# and I want to leverage those features in my extension methods. How can I name the projects to convey their meaning while at the same time differentiating that they are implemented in different languages?For the C# elitists:One of the features that VB.NET supports that C# doesn't:Doesn't C# Extension Methods allow passing parameters by reference?FYI: This doesn't work for reference types, which is what I'm interested in.

public static void LoadFromXml<T>(this T targetObject, string xml)
{
targetObject = _Serializer.DeserializeFromXML<T>(xml);
}

View 2 Replies

Purpose Of Using Shared Methods That Return An Instance Of A Class?

Oct 11, 2010

What is the purpose of using shared methods that return an instance of a class, as opposed to a constructor?

ie: in VB.net, the system.drawing.color class has shared method "FromArgb(int, int, int) as color". This is different from java's implementation which simply is a constructor that takes three ints. Why the decision to do one or the other?

View 1 Replies







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