writing a program which stores and uses information on oil pipelines. I have a number of worldwide sites, which each have a number of pipelines. Each pipeline has a number of segments, and each segment has a number of properties like flow rate, temperature, pressure etc. There are also going to be a number of cases, so the temperature of a segment in case 1 might be different to case 2.
What is the best way to set this up in terms of objects and references? I�ve done a fair bit or reading about arrays, collections, classes and think there are a number of ways to �skin this cat�For example, if I wanted to reference the temperature in case 1, of segment 3, in pipeline 4, at worldwide site number 3, then can I do something with a load of objects and collections like the following?
I made a browser and its awesome but i want to reference the browser name so that i can add script to it, I am calling the new browser window "wb" cause that's what it gets named in the script. here is my code. (it labels the tab, the window, and changes the URL text field)
Private Sub wb_Navigated(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatedEventArgs) Handles wb.Navigated TextBox1.Text = wb.Url.ToString() Me.Text = CType(TabControl1.SelectedTab.Controls.Item(0), WebBrowser).DocumentTitle & " - My Browser"
[code]....
It says "Browse.Name = "wb"" so thats why im trying to call it "wb". I inserted a WebBrowser on the form named wb and then tried to run it and it worked, it labeled the window, tab, and changed the URL field. So i know that the script works. Please help me, I know you guys can solve this, I'm really new at this.So my final question is... What should I call the browser instead of "wb" when I am referring to it in the first script I posted above? I am so confused. How do you refer to an object that gets created dynamically?
I'm just trying to reference report objects (specifically textboxes).For example, let's say from a form, the person has to enter a specific title each time the report is run; or they have to enter something that has to appear along side each record in the detail (List) of the report each time it's run.
How to you pull the info on a form into a report? Is this even possible in VB? (it was quite easy in Access)I've tried in the Form code something like: My.Forms.Form3.ReportViewer1.textbox1.text = My.Forms.Form2.TextBox2.TextBut of course it says "textbox1 is not a member of Microsoft.Reporting.WinForms.ReportViewer" Then I've tried adding an Expression to a textbox in the report itself in an attempt to try and pull the data from a form. The Expression for a Report textbox went something like =My.Forms.Form2.TextBox2.Text
when using variables in object names.I have a Public class which is called "Tank".In that class, there is a public property called "direction" of an integer type.I keep getting the error:
"Tank is a type and cannot be used as an expression"What I'm doing wrong here ?
Public Class mainroutines() Create Instances of tank Private Tank1 As New Tank()[code]....
I would like to dynamically create an object (in my case a thread) and then be able reference that object. Simplistically put, I would like to read from a text file and then process each item using a thread (so that I don't have to wait for each item before starting the next). The problem is that I cannot think of a way to create a new thread dynamically ie. thread name so that I can then wait for all created threads before doing something else.
I am trying to create a program that takes cd information (ARTIST TITLE COUNTRY COMPANY PRICE AND YEAR) and saves it onto a XML file.The info is entered into separate text boxes.The program should also store 3 cd in memory before batch writing it to the xml file?
Hi, I've created a login screen for my application and defined the username and password using the following code
If UsenameBox.Text = "username" and PasswordBox.Text = "password" Then Me.Hide() Main.Show()
It works great however, I need the user to be able to set their own password using a registration form with the details being stored in a xml file. There are no security concerns with the password being stored in a text file as it's a mock login screen.
I dynamically (by programming text, not drawing in GUI) created a matrix of 10x10 buttons named 'Button1' till 'Button100'. In a formula I calculate a number, say '87'. If I next want to reference 'Button87' and change e.g. the background clolor and text properties, how would I do that? I am creating a PocketPC game using VB2005.
I want to know the correct way to access an object that is stored as an object in another object...phew. Here is what I'm trying to do...
I'm creating a restaurant map and to keep things simple I have 3 classes -- cServer, cTable and cGuest. cTable has a property which should contain a cServer object eg
Public Property Server() As Object 'Called when the property is read Get
point me to the best way to store persistant objects ( of my own class) in a vb application? I am putting together a simple family recipe application and have created a food item class. I would like to store the instances ( food items) indefinately so that they are there each time I start the program complete with all properties and meethods
In a program I've been working on I would like to start a process and save it in a variable of type Process. This is so I can kill it later, if needed, and change the window type.
I'm trying to get a complete understanding of Objects . Namespaces etc and think I'm pretty close.I've created A basic Vehicles class and a car class that inherits Vehicle.Through user input I've created several cars and displayed the information in a listview.My question is what is the best way to store my cars (don't say garage!) so that if a user clicks on the associated entry on the list box that they can then alter that specific instance.
Ok, so I`ve been studying a bit of VB lately.. bought a few books and read lot`s of articles and seen hours of instructional videos, and I slightly start to get the hang of a few things.. :) I`ve recently started a fun little project, but I seem to lack a bit of knowledge to reach my goal. I`ll first try to describe my project:
I am working on a media player, and I would like to setup a local playlist feature. I am using a single ListBox and its "Display-" and "Value-Member" properties. The display is the song's Artist and Name, and the value is the song's file path (i.e 'C:UsersUSERMusicetc.').To write the file path to the .txt file, I believe I can use the following code:[code]
I am making a program, obviously, and I require some assistance. I found an explanation on how to read information from a Text file and have modified it for my needs. Here is my (modded) version:
Public Function GetInfo(ByVal playlistname As String) As String On Error Resume Next Dim PlaylistInfo As String
I'm making a database app. I've finish the search, add new, and add function. What I'm trying to do is to expand the functionality of the add new item function.
I am trying to do is fill out a form with certain info, put the info into an array, and write it to a listbox using loops, arrays, and maybe a function if I need one. This is for VB2010 and here is what I have so far... I think there are ways to make it shorter but I cannot figure it out.... maybe just brain dead from all the coffee I have been drinking!
how to correlate info from a textbox based on a listbox item selection. For example the user will select an item from the listbox, enter say the length of a song in the textbox say 2:00 for song #1, select say song #2, enter the song time for that song say 3:00, click on song #1 again and have the same textbox display the length of that song and be able to do that until there are no more songs on the list.
I am getting this error, Not sure why it is happening "Error The SqlParameterCollection only accepts non-null SqlParameter type objects, not Int32 objects."I have tried with all sorts of possibilties, now try to enter default data as dummy data,
Using connection As New SqlConnection connection.ConnectionString = ConfigurationManager.ConnectionStrings("DentalDeviceConnectionString").ConnectionString connection.Open()[code].....
I want to let the user input objects to a richtextbox 1 object on each line, and somehow use Random.Next to select pseudorandomly a few objects, the number 'few' inputted in a textbox.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Using conn As New SqlConnection("Database=Clinic_Management_System;Data Source=.SQLExpress;Integrated Security=True;AttachDBFilename=|DataDirectory|Clinic Management System.mdf") Dim cmdRecord As SqlCommand
I have a user control that inherits the FW ListView and I need to dispose of two objects when the form's disposing of it's objects. Here's what I've concluded already, am I on the right track?
long story short, I have created a ListView type control, using UserControls for the parent control and the ListViewItems. Most the of the control is written and works fine, right up to the point where I tried to replicate the 'Control.SelectedItems(0).Index' property and the 'SelectedIndexChanged' event.
Each child object knows its index value, and could pass this value via the SelectedIndexChanged event (assuming this is how it works in a normal ListView control -- user clicks on an item, and that item fires an event updating the selected index value in the parent object).
How does the child object raise an event in the parent object? I have a feeling this could be done with Delegates, but I'm still learning about their usage.