VS 2010 Make Control Arrays - No INDEX Property Or Load Method Like VB6?
Feb 28, 2010How can to make control arrays in vb.net ? there is no INDEX property or Load method like VB6. so how i can do it ?
View 5 RepliesHow can to make control arrays in vb.net ? there is no INDEX property or Load method like VB6. so how i can do it ?
View 5 RepliesIt seems as if the propertygrid control cannot display property arrays. Is this the case?
When I do this :
Imports System.ComponentModel
Public Class comPicturePirate
Private intAmountImages As Integer
Private strWebURL As String
[Code]...
I need to get the ID number from an acces table (I am working with GIS .. I do not nkow if that helps) from a record (I do not know if I am using the correct technical words here)
View 4 RepliesI would like to format output to a property of a custom control I have made.For instance I have a literal control in my control and when populated I want to check if it is longer than 30 characters long, if so, then go to the next space (as to not cut the word off) after the 30th character and place a <br /> tag in to place the next 30 characters on the next line.So if there were 100 characters in a string, there would be 3 line breaks in the label.I have the looping worked out to get the label populated but cannot get how to dymaically create the array based on the string lenth property and index of method.
View 7 RepliesDim LabelArray(12) As Integer
LabelArray(0) = Label3.BackColor = Color.White
LabelArray(1) = Label4.BackColor = Color.White
[CODE]..................
i have made an array. first of all i want to make it global and on form load i wanna show it's first position and on a button' s click i want to increase it's position by one how can i do that
I want to create a custom control (let say textbox), after build, when I place that custom control on a form, all the properties for the default textbox are available.
1- How to Hide them and only show the wanted property and method?
2- Is there a Wizard or custom tool for creating custom control or I had to do every thing by coding?
When ListView is not in Virtual mode the following method seems to be the fast method to load a large list into ListView:
Dim items As New List(Of ListViewItem)
Dim alllines as String()=System.IO.File.ReadAllLines("FilePath")
For each line as string in alllines
Dim item As New ListViewItem
item.Text = line
items.Add(item)
Next
ListView1.Items.AddRange(items.ToArray())
I've created a custom control in VB.NET on .Net 3.5, in VS2008, which contains a load of custom properties, including RSS feed address, proxy address and proxy port.This control is an RSS ticker, which works really nicely, but doesn't initially run at all, and from stepping through my code, this is because none of my properties are being passed data from the containing form, until after the control has been initialised, and the code behind the control has run. The code (relevant bits) looks as follows:[code]
View 2 RepliesI have the following property in a property grid in VB.Net 2010.
<Description("Rapid Entry Post Car Wash Settings CarWashOptionPushButtons"), _
Category("Post Car Wash")> _
Public Property CarWashOptionPushButtons() As String
[code]....
I need to make this property a list box that gets the values from a database table and populates the list box with the values from the table. I have tried numerous things to no avail.
I'm trying to make a program with transparent labels over pictureboxes and when I set the label Parent to the PictureBox the position of the label changes.
View 2 Repliescontrols mainly an indexed picturebox control. In VB 4, 5 and 6, I could make a picturebox(0) indexed, but in VB Express 2010 I no longer see this option in the picturebox properties window how is this accomplished in VB Express 2010.
[Code]...
How do I reference txtCourse1.text and txtDept1.text using an index variable similar to to code below which does not work?
'two controls on the form
txtCourse1.text
txtDept1.Text
[code].....
I have written a Visual Studio 2008 addin that adds controls to a Form. I want some of those controls' Visible property set to False so they're hidden during runtime, so I do this:[code..]
This doesn't work. Not only is the control invisible in the designer window itself, but the Visible = False code doesn't even make it into [FormName].designer.vb. I have tried forcing Serialization on the Visible property like so, to no avail:[code...]
I have a custom control and would like the properties to be mandatory (not default) when a programmer codes the control. Is there a good way to do this without throwing exceptions in the program?
View 2 Repliesgetting started with creating an index search for parallel arrays. When the user enters the specific "code", and presses enter, the information in the other arrays should be displayed based on its matching index. I'm pretty sure I use "For i = " but I'm lost. I have my arrays set up like this:
Dim code(9) As String
code(0) = "A"
code(1) = "H"
[code]....
I'm trying to create two arrays filled with a set of strings from two tables in a database and then compare them. For example:
array1[0]="1101" and
array2[0]="0110"
If both respective characters equals 1 then perform an action. But when I run this code I receive the error: Index was outside the bounds of the array. System.IndexOutOfRangeException.
For some reason I believe the problem area is with the following two statements:
comparestringa = userintarray(x) and
comparestringb = eventintarray(x)
When I comment them out, the error doesn't show.
myconnect = New SqlConnection("xxxx")
Dim Table1 As New SqlCommand("SELECT * FROM Table1", myconnect)
Dim Table2 As New SqlCommand("SELECT * FROM Table2", myconnect)
Dim array1 As New ArrayList
Dim array2 As New ArrayList
Table1.Connection.Open()
[Code] .....
start with I was given a program by a friend that was created in Excel 2003 with the help of Visual Basic Editor. He said he used Visual Basic 2003, which he is not 100% sure about. Anyways he used CurLine in the program and when I try to open it in Excel 2007 and then open the Visual Basic Editor and run the program I get the following error:Run-time error '-2147418113 (8000ffff)':Could not get the CurLine property. Unexpected call to method or property access.
View 2 RepliesI am not sure whether this is a trick question?One of the object i have has 2 boolean properties, Standing and Sitting.I have a class called student with the 2 methods stated below- Am I coorrect is assuming that the first method draw() is affected by the standing property AND not the second method?Also the way it affects is that it draws an image when the the stugent is standing?
[code]...
I want to split an array into two smaller arrays at a given index?
View 5 RepliesI'm in the process of making a usercontrol and i've run into the problem of how to make a property page. Obviously this makes setting up you control nicer and more importantly to my program makes loading the form faster (setting the properties in the load event vs property page). I was trying to find something to start on but i didn't find a propety page in the "New Item" menu or even something like the "Property Pages" property of a usercontrol in vb6 where i've done this before. How can i make the equivalent of the vb6 property page in vb.net? Maybe with a form or a dialog?
View 6 Replieshow to create a property like this:[URL]
View 7 RepliesI have been trying to create a custom control based on the ListBox called FileListBox. I followed Microsoft's walkthrough but am having some trouble.
What I want is to add another property to the ListBox called SafeItems which is an ObjectCollection of strings (like the Items property). I will use the Items property to store a collection of Filenames as strings and I would like to store the corresponding SafeFilenames in the SafeItems collection.
This is what I've tried:
FileListBox.Designer.vb
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class FileListBox
Inherits System.Windows.Forms.ListBox
[Code].....
I am having difficulty getting some form control property bindings to work correctly. Below is the code I am using-
[Code]...
The ZedGraphControl is just a GraphPane, and the TolSelectBtn is just a button. Problem is, the ZedGraph control binding works properly, but the binding to the button does not (both controls' Visible properties are set to False in the design window). Can a ToolStripMenuItem only handle one data binding? Or is there something else I should be looking for?
this questions has be answered partially, but I can't find any full tutorial for this problem.I created my own user control (an advanced list with columns). Each column has different attributes like width, colour and text.I want to able to add this user control onto a form and select/edit the different attributes of each column. Hence, for each column in my user control (these columns are created beforehand, no columns can be added or removed from it) there should be a property in the property-menu. Each of these column-properties should be expanded (like the normal size-property in most default vb-controls that can be expanded with the little plus to show the width and height individually.What i mean by this, is: In the property-menu there should be attributes like Column1, Column2, Column3. Each of these attributes should be expanded to show the attributes like width or colour.
Currently I have different properties for different values of the same column, like Column1Wodth, Column1Colour, etc, but I want to group this under one value Column1.I think this is quite an easy solution, but forgive me, I spent more than 4 hours on google, but couldn't find a proper solution.
I have a project which has a couple of tabs on form, an usercontrol is on the 2nd tab, when the form loads, i want the load event method of the usercontrol to fire, and the message box should pop up.Please see the attach file, the message box only pop up after the form is loaded and the 2nd tab is clicked, not when just the parent form is loaded.
View 5 RepliesI'm writing a custom control and I want to add a "MessageText" property of type String:
<Browsable(True),
DefaultValue(""),
Category("CustomControls"),
[code]....
The MessageText property is a multiline text, and the user must be able to set the text using the designer. The problem is that the designer doesn't allow to enter a newline directly for a string property.I want the same behaviour as the system TextBox's Text property, where you can click on the down arrow and write lines in the small text-editor that appears:How do I do that?
Can anyone give a good explanation of how the indexof method works and what is meant by "Index" ?
View 3 RepliesHow do I use the Indexof Method to search for an Index a number? The number will be different on each line of the file. Each array has a name and a different zip code. I want to tell it to search for the first number in the line. Everything before that index will be first name, last name, and then zip code.
[Code]...
Ive got two lists (each representing a table in a DB, so they are related). lstTransaction has t_id, date, and cust_id. lstCustomer has Name, and cust_id.For each item in lstTransaction Id like to find the index in lstCustomer where lstCustomer.cust_id = lstTransaction.cust_id.
View 5 Repliesmay i know why I can't locate the index property for the radio button in VB.NET? This is because for my existing project which is converted from VB6, there is existing 4 radio buttons with indexes. And now I want to add one more radio button with index 5, but I can't find the index property for the newly added button. The VB.NET treat it as a new button.
View 4 Replies