Give Class Access To Change Text
May 9, 2012im currently writing a program calculates commute costs. How can i have the class that calculates the costs of the commute, to be able to change the .text value of a label?
View 1 Repliesim currently writing a program calculates commute costs. How can i have the class that calculates the costs of the commute, to be able to change the .text value of a label?
View 1 RepliesI'm writing some web service for my .net application and I have some old projects in MS Access. I wrote a com assemly to give an access to my WS to my MS Access projects. When i'm running it on my computer it work perfectly but when I try to deploy my app on an other PC it dosen't work. It because my dll isn't in the gac I guess. I don't know what to do, my assembly is strong named with a snk key ...the way on VS isn't installed on the other PC ...
View 2 Repliesi have a ClassLibrary and i set some Private Variable like: Private _Test as string and i have to get the value frome Database and set it to my valiable and after that i want to set some function that return it like:
Public Function GetTest() as String
return _Test
end Function
how can i set a value to _Test befor return it?
Win32_CdROMDrive class can give info about CD/DVD Disk..?
[Code]...
I use VB.NET2005 on windows XP with NTFS, and I create an application for folder management. In this I want do.
I created folder for user. When a new windows Use login on system then create a new folder on a particular location and login use have rights for open and delete this folder.
For example on windows have to user A and B. when User A login on system then one folder will create as login user name C:A. only user A have to permission to access this folder. Who I do?
How can I change the delimiter when writing my Access table to a text file? I was hoping it would be as easy as adding a similar option like we do for HDR=No; maybe Delimiter=|
Dim AccessConn As New System.Data.OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|mydatabase.mdb")
AccessConn.Open()Dim AccessCommand As New System.Data.OleDb.OleDbCommand("SELECT * INTO[Text;HDR=No;DATABASE=" & userPath & "].[" & fileName & "] FROM tblMyTable", AccessConn)
AccessCommand.ExecuteNonQuery()
AccessConn.Close()
I've got labels on my form using the following "Shift1Time1Label" to "Shift1Time8Label".I'm trying to get information from a access database and change the text of the labels.I'm getting the information, but having an "Object reference not set to an instance of an object" on the directcast to the label....
[code]...
I have made a vb.net application which has 63 forms. On each form label2 should contain the username using the application. The first form displayed to the user is the login form. When the user clicks the login button on this form the user name in all newly opened windows should appear inside label2. How can I do this?
View 3 RepliesI have a 2 combox's with the following items, Excellent,Good,Average,Fair,Poor in them and a textbox with a user defined numeric value
I would like to be able to do the following:
perform a calculation based on values in each box , example
combox1 = Excellent
combox2 = Good
textbox = 1000
[Code].....
I am deploying my application on a 64 bit windows 7 system (setting the platform property to x86) , after the installation process the app needs to set its connection string in the config file; and this is where I am having issues, the app is not able to write to the config file if/when its located under the program files directory (no admin privileges??), the app works fine when installed on a public folder.Please let me know how to give admin or write access to my app when its installed to the default program files directory
View 2 Repliesthis up but this line below seem to be the problem this sentence (Textbox1.Checked) its supposed to add all the numbers up and give total in a input box under the score line is the complete code sorry for wrecking anyones head cause mine is demented
from mark
Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles yourtotal.TextChanged
[code]....
How to use time in vb.net.I would like to make a traffic lights program in vb.net but am not yet sure where to start besides the interface.I want the lights to change within a give time.
View 1 RepliesI have made my program but I want to give users the option of choosing a custom color for text. I have an inputbox that works and then converts it to Color.whatever. But seeing as the user types in what they want and it is not done by the program itself it can throw exceptions.
Dim directresponse As String
Dim actualcolor As String
Dim isgood As Boolean
[code]....
That is my Sub, it will make Color.(userinput) but I need to check if Color.(userinput) is actually a color that VB.NET can understand and add set.
I have tried "System.Drawing.Color" I get told it is a type and cannot be used in this context.use System.ComponentModel.TypeDescriptor to convert it to a color and check if it is real and then set it.
I have some classes, BsfciFile and StudyFlashCard. Bsfci is the extension to which I save my set of flashcards in an INI format. I am currently working to transform my code from using Windows API calls to access the INI to using a IniFile class that I found on the internet. I would like the BsfciFile to have a Array of StudyFlashCard objects, but I would like the StudyFlashCard class to use the IniFile class object contained in the BsfciFile class. I can pass the IniFile from the BsfciFile class to the constructor for the StudyFlashCard class, but I want it to modify the same IniFile as the BsfciFile class has later on.
[Code]...
This is a bit of a continuation from a previous post for which AtmaWeapon was very informative.
Problem:
A parent class has a sub class with various properties. A property of the parent class is a List(of T) with T = the sub class The issue is how to store data in the sub class of the instantiated parent
Some example code (hopefully formatted correctly):
Code:
'=========== Class Definitions =============
Public Class courseClass
Public Class timeTableClass
[Code].....
How do I access the base class inside a derived class?
View 1 RepliesI have a very simple class that is located within my App_Code folder in my VS2008 web application project. I am trying to instantiate an instance of this class from my code-behind file. Intellisense does not seem to be seeing my class and I am not sure why. I am using VB.NET which I am admittedly not that familiar with as compared to C#. Perhaps I am missing something. I would bet it has something to do with something I am missing in VB.NET.Here is my simple class (for testing):
[Code]...
Is it possible to set a variable in my custom class for Private Read/Write access and Public Readonly access without creating Properties with Get and Set? In other words, from within my class I want full access and from my form I only want read access. Right now I declare my variable as either Private or Public to control Public read/write access. I tried googling my question a bit but I'm not sure what the correct terms even ar
View 5 Repliescan someone please help me with a textbox? I have created a new class and require this textbox field within a sub in the new class but i get Error1 'TextBox1' is not declared. It may be inaccessible due to its protection level.I have tried MyClass.TextBox1 = Form1.TextBox1 but I get declaration expected.
View 23 RepliesThis is my first major application using multiple classes. It is written in vb and I know about creating objects of the class and using that instance to call functions of the class. But how do I create an object with constructors to allow another program written in C# to access my classes and functions and accept things from the program.
View 3 Replieshere a simple class to change the wallpaper in winxp and win7. i think it will work on every windows version.
[Code]...
So, I've got a text boxes which loads up a content from a XML file, usually a numbers I want a button, so when I will change the numbers on the text box, the data in file will change as well, in other words a save button That's how the data is being taken from a file
[code]...
Those EditPaths, Playa2 etc are making up a path to a file
I am trying to figure out how to change the class name on a textbox from "WindowsForms10.EDIT.app.0.bf7d44" to something like "textbox1". Right now the textbox has no caption so i can not just use vbnullstring for the class since i have no caption for the textbox.
Is there any settings in VB.net 2008 that will allow me to change class names?
i want to some change in textbox class , lick in got focus of textbox change color of text box and leave of text box change old color, i want to set Permanente code in text box property, after changing we give a new name to text box class and use this class as well we need.
View 1 RepliesLooking for the best way to update a variable in a different class. Below is a rough outline of the situation.
I am wondering if in fnSendEmailTo if I can access the Property in CB?[code]...
I am filling a form with values from a class, which is working fine. But now I want to take the changed values in the text box and modify the class. For some reason I have not been able to get the syntax.
View 6 RepliesI wrote a quick and dirty web service in VB.NET. And as it always goes, I want to move it to production, but don't want to use the name Service1 for the public class. When I change the name I get an error when trying to reference it. I know there is somewhere else I need to change the class name, something in the code behind but I can't find where it is.
View 4 Replies[code]...
How can I update some x value in prime when there is a change in any of the ItemDetails object in items.
Anyone here ever tried to convert DockPanel (by Weifen Luo) from C# to VB?In another post I was able to change my base class name, but the child form is not going inside the DockPanel control of my main Midi Form.
View 11 RepliesIs there a way to change a base class type by Overrides or Shadows, or other meen?[code]...
In this example there is MyBaseClasswitch is the base Class, then ClassB that Inherits from MyBaseClass, and In ClassB I try to overrides the base property "MyColl" to change is type to a enum.
But it do not work, telling me that the base collection cannot convert to eCarBrand, blah blah blah
Is there other way to change base class type or other approach that a could use?