Determining The Index Of A List Based On Another List And Vice Versa?
Jan 6, 2012
Suppose you have list 1 (ilist1) and list 2 (ilist2) both lists have 3 items.
At index 0 item1 which has text "-- Select --"
At index 1 item2 which has text "Yes"
At index 2 item3 which has text "No"
Both lists have identical items. I would like to know if it is possible to have the selection of list one be "Yes" and the selection of list two be "No" and vice versa using SelectedIndexChanged or something of the sort.
For example:
ilist1 = --Select--
ilist2 = --Select--
I have two list boxes and first list box have some items and I want to drag and drop from listbo1 to listbox2.. Below code is working fine...Now I want to drag and drop items which is moved from listbox2 to listbox1..
Private Sub ListBox_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) _ Handles ListBox1.MouseDown, ListBox2.MouseDown Dim lb As ListBox = DirectCast(sender, ListBox) Dim ix As Integer = lb.IndexFromPoint(e.Location) [Code] .....
I have a list of objects, each with several events. I can add an eventhandler to each object, so I can catch each item's events. But I would also like to know the sender's index in the list (ie, was this object the 3rd, 5th, etc, item in the list?) I'm guessing the object doesn't "know" its position.I could give each object an index number property when it is created and added to the list, so that information could be passed. However, I would have to reindex every item everytime I use remove, insert, etc, methods.
I created a .NET application that reports to a log file the contents of a registry key. My code works perfectly but it is choking on one of the string values found in the registry. The code that works normally is below.
I made a small project that has two picture boxes available on the form. I can shift the focus from one picture box to another by clicking on it and type the letters in the picture box that has focus.
Here's the project on Skydrive (80KB)
[URL]
The problem I am facing is these picture boxes are already available on the Form. But I want to do the same for dynamic custom picture boxes something like
Dim picselected(10) As ZoomPbL
where ZoomPBL is my custom picture box and picselected is an array of those picture boxes.
because of the limitations of communication between projekts with on one side a .net2 and on the other side a .net4 program running on different computers . i was looking for a conversion of string to dataset and viceversa. i dont know if this is relevant for pure .net4 communication. with sockets strings are easy send and received in net2 and 4.[code]
I have 2 buttons they are button a & b in a form. The default button A is green ("ON") in color whilst button B is red ("OFF") in color. When i click button B, it will change the color from red to green, then button A color change from green to red. Vice Versa. Basically, it is to indicate a button has been clicked and green color is to indicate a button has been clicked.
I need help creating a application that converts inches to feet and vice versa, this problem comes based off of this application I had to create to convert Fahrenheit to Celsius and vice versa--below is the first application. I get the basic idea of how to start, but Im having trouble with what I should put to start the conversion, what variable? Everything I'm putting in is coming up as error.
Option Strict On Option Explicit On Module TemperatureConverter
how I could go about making a simple little program in Visual Basic 2010 that has a button you click with drop down menu beside it to search for an excel or sql file on your computer and then you select it. Then you click a button saying "import into sql" or a different button saying "export to excel."
These buttons would of course do what they say... either importing the chosen excel file into sql or exporting the sql file into excel.
how can I download files from the Scanner to the PC or Vice Versa. I have spent an entire day trying to figure this problem out. I can exchange anything I want as long as I am connected to the WI-FI, the phone or Blue tooth but I cannot communicate with the PC from the Mobile or the PC to the mobile when the mobile scanner is docked.
When sending numbers over my server/client, I need to first convert them into strings and pack them together into larger strings, then deconvert them at the opposite end. I need to ensure that they occupy exactly the correct number of spaces in the string - for example I need an integer to use up 4 spaces. So for example, if I had a byte, then 2 integers, I need the first character to contain the byte, characters 2,3,4,5 to contain the first integer and 6,7,8,9 to contain the second integer. Then I can retrieve each number from the string using Mid(Position,Length) and convert it back to a number.I know how to convert bytes using chr and asc, but how would I convert my integers into my string and ensure they occupy the correct number of spaces in the string (and back).All the conversion methods I've looked don't seem to fit the bill. Will I need to write my own function to achieve this?
I am reading and writing binary data through a serial port and must (a) reassemble the incoming four bytes that make up a IEEE single-precision float into an actual float, and (b) disassemble a float into its four constituent bytes before squirting them through the serial port.
I am using VB.NET 2008. In VB6, I could use the LSET command, as in:
Code: Private Type typByteArray B(1 To 4) As Byte End Type
[Code]....
But of course this code won't work in VB.NET. In C it would be easy to handle situations like this by using unions, but VB.NET doesn't support them.
When I make an application on my PC which runs on XP Home Edition, then I send it to my friend who runs on Vista, the controls are sized a lot different on his PC, and also the same way when he sends his Apps to me. Is there any way to fix this problem?
I want to make a program that you can load a jpeg image and convert the image to binary data so that I can put it in a file along with a lot of other data. But I don't know how to change it to binary and back, I was told I would need to do this in order to merge multiple files.
Firstly, sorry about the title, because i dont really know how to express it clearly. But if you see example, you people will understand then.Now what i want to do is I will give in put as:
This is code-related as in what the compiler will allow you to do in one language, but not allow you to do in another language (e.g. optional parameters in VB don't exist in C#).
I have a List myList of MyObjects. Is it possible to check if myList contains a particular myObject based on a property of myObject in VB.NET? In C#, you'd something similar to this right: