Percents In Code For List Box?
Oct 25, 2010I need to know how to code percent in my list box for example: 5, 5.25, 6, 6.25 and so on.This is for visual basic express edition 2008
View 3 RepliesI need to know how to code percent in my list box for example: 5, 5.25, 6, 6.25 and so on.This is for visual basic express edition 2008
View 3 RepliesI have a menu strip with a item titled options. This drops down and there is a dropdown list. Then there are various percents that the user clicks to set the transparency of the window. What code can I use to enable the percents to be clicked and the transparency to change?
View 16 RepliesI am used to C like languages such as C#. I added a list box with a list of names. In the code behind I added the below code. When I run the code I am getting the MessageBox but it will state "UserName favorite color is " but does not show the color. I thought it might be misspelled or non-matching names but this is not the issue due to the names being correct.
Public Class Form1
Private Sub lstData_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstData.SelectedIndexChanged
'Declare Variables
[CODE]...
I want to know what is code can be write for clear all item in list box??..Here i attach my code for looping for.This looping will display are result in list box. For info i am using visual studio 2005.Public Class Form1
Private Sub btnLoop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOnWard.Click
Dim num As Integer
[code].....
can i know what code that enable me to list all currently running process and get their path and list all the path in listbox1.
View 2 RepliesWhy if I run the following code does the argument in the Add method pass {"foo2", "bar2"} in both method calls?
Dim myList As New List(Of String)
myList.AddRange(New String() {"foo", "bar"})
Add(New RandomClass("blah", myList ))
[CODE].....................
ive got a college project and I've tried to make it seem quiet realistic, i've added a menu strip, and I don't know how to code an option in the list. Does anyone know how to code it?
View 5 RepliesI am surely a new self-learner programmer using VB 2010 Express edition and I have a problem on writing my first code. I have designed my form and I only want to add code as events. The IDE already adds the methods when I double-clicked the button which I want to add the code on.
This question may be good on the IDE forum, but I just thought to ask it here because there may be more experts here on VB language functions. I have added the MenuSctripItems such as File, Edit and so on. How do I write the code for New, Open, Save, etc under file menu? It may sound boring or even silly, but I am here to learn and your contribution is both for me, you and the MSDN.
I am trying to add items in a SharePoint list and I would like to use vb. I have tried using this this from here: [URL] but i get this error: Type SPWeb is not defined.
[Code]...
i have four price values in a drop down list and i need to code these values and add them to values from a checklist object i am doing very simple coding ?
View 1 RepliesIs there a way to disable an asp.net dropdown list from the vb code behind?
<select id="reassign_reason" name="reassign_reason">
This is the name of my drop down list and I tried this in the code behind in vb.net
reassign_reason.disabled = True
I have the following code in my app to show free space / disk size and SMART status for a hard disk How can I modify it so that it lists all disks and shows the above info for each one
[Code]...
i have been working on a simple program but cant get my head around it. It does not show any errors at the moment but when i run it does not do the things i would like it to do. I will paste in the code first and explain it below.
[Code]...
So basically the form has help button to show instructions, quit to quit the program and check to check whether the country from listbox lstCountries matches the correct capital in lstCapitals. The idea of the program is to shuffle the items in two arraylists and then add them to seperate listboxes called lstCountries and lstCapitals. At start i used 1 dimensional array and it worked like a charm for mixing up items in arrays and then adding them to listboxes, but then the problem had to match the correct Country with correct Capital and it only worked if i picked the items on the same index such as 1 and 1(straight line). It all sounds complicated and confusing, P.S alot of code is commented out, because i have tried many ways to make it work.
[Code]....
I have the following code to generate combinations of string for a small list and would like to adapt this for a large list of over 300 string words.Can anyone suggest how to alter this code or to use a different method.
[Code]...
I have an internal application that I needs to have a drop down list for two date type elements: Month and Year.These values are not in a database or other repository of information.I know I could just setup a list with the values I need by adding them to a dictionary like object (I need to correlate the Month to the numerical representation, January => 01):
var months = new Dictionary<String,String>();
months.Add("01", "January");
...
The drop down list for the year will be a bit easier as I can just choose a starting year and iterate up to the current or current+1 year in a generic list.Is there a better way to handle these data elements? Something built in, or a good design pattern that I should be implementing?
This is my code for loading list of plugged in USB devices:
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
ListBox4.Items.Clear()
For Each Drive As IO.DriveInfo In IO.DriveInfo.GetDrives
[code]....
I would like when a button (lets say buttontest) is pressed it will show all files of a CD (only MP3) into ListBox5, then when buttontest2 is pressed the files in ListBox 6 will be copied from the CD to the selected USB device?
Option Explicit
Private Declare Function SQLAllocEnv Lib "odbc32.dll" (phenv As Long) As Integer
Private Declare Function SQLFreeEnv Lib "odbc32.dll" (ByVal hEnv As Long) As Integer
Private Declare Function SQLDataSources Lib "odbc32.dll" _
(ByVal hEnv As Long, ByVal fDirection As Integer, ByVal szDSN As String, _
[code].....
I need help in finding out if there is a more efficient way of writing my code. The code below is a list of radio buttons all of which have different values for example
radiobutton1 has a value of 1
radiobutton25 has a value of 20
the values are stored in a variable called 'count'
the 'count' is incremented by the ammount from the radio button clicked.
Is there a way the radio buttons can be compressed into a for loop and if so how can i still access thier each values.
[Code]...
I have the following code to generate combinations of string for a small list and would like to adapt this for a large list of over 300 string words.Can anyone suggest how to alter this code or to use a different method
[Code]...
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim Counter As Integer
[CODE]...
The code is suposed to go through all the computer names in a list box and ping them.
I am trying to add the ability to select a camera to my program to start with I need to list the currently installed devices in a drop down menu much like what is used in MSN's webcam selection but the only thing that I can find that comes close is
Declare Function capGetDriverDescriptionA Lib "avicap32.dll" _
(ByVal wDriverIndex As Short, _
ByVal lpszName As String, ByVal cbName As Integer, ByVal lpszVer As String, _
ByVal cbVer As Integer) As Boolean
This, even with 4 different webcams installed, returns "Windows WDM image capture"
I've been struggling for hours now to get some working code to list the share permissions of a remote share. I've got WMI code which uses win32_share which lists the shares and path and it works great. I"m now trying to add in a routine to get the share permissions as well.
I've searched just about every site for some sample code and can only find some C# (I think) code.
[Code]...
I'm trying to develop some AI code for a game I'm creating. I have a list of x,y coords and I need help figuring out what I can use/do to build the shortest path between any 2 points in this list. I would like to build a function that I can pass a list of valid X,Y coords to use when generating the path, start point, end point, and have it return a list of points, which would be the shortest path between the start and end point, using the list of points supplied. I have looked at A* and Dijkstra's, but am having problems implementing the algs in code, as all this seems graph based.
View 3 RepliesThe code below is used to check if the application setting, an arraylist is populated or not via the count method.
When running the program fails with error "NullReferenceException was unhandled" as initially the setting (arraylist) will contain no values.In similar circumstances I would declare a new instance of the object or set value to string.empty or check if DBNull.
I know application settings have a save method but to reference/load them one is not needed.I also left the value field in the projects -> settings to be empty.[code]...
I've got 2 seperated programs.
One is a program where you can select a product and select how many of them you want. Then the total price wil be displayedin a label. And the list of selected products will be saved in a .txt file.
The second program is an Edit program. The user can edit his selected products. Here he can change the total of a product.So if he had selected 1, he can change it to three or something. When the user clicks the button Save. The changes will besaved in the same .txt file and the total price will also be changed and displayed in program one.
Program one is compleet.Program two has problems and here i need your help:- the user can't make a change in the numbers, seems that the textbox is read-only or something. How to solve?- Then when i click save, the changed must be saved in the .txt ( i can't test this yet because no changes can't be made)- the total new price must be showed in program 1 (i think i programmed this well, but can you take a look)
Here is a part of my code of program 1:
CODE:
anyone knows the equivalent code for App.TaskVisible in VB.net? App.TaskVisible is from VB6 which hides the application in the applications list in task manager and not in the processes list tab.
View 1 Repliesfigure out a way to link datagridviews to other controls like a combobox, list view or even another datagridviewBecause much of the code is managed by the IDE, I was expecting an IDE approach to linking controls. Is this the case or do I have to modify the generated code to do what I want.An example would be to use a combobox to limit the number of entries in a datagridview etc
View 2 RepliesI have code to deal cards and compile a string list for player and dealer. I want to rank the cards for both player and dealer. I dont know how to compare characters in a string or text (which would give me a starting point).
My Code:
I'm having trouble finishing up this salary program which is designed to calculate salary based on gross sales while using arrays. Essentially, when the Calculate Salary click event is initiated after salary is entered, either $200 should show up in the list box or, if the persons sales were over $5,000, a calculation of their sales * 9% + 200 should show up in the list box. Right now, anytime I enter any number, "Double Array()" shows up in that list box. Additionally, a bar graph is supposed to supposed to be displayed in the lower list box showing how many people are in certain categories starting from "$200-$299" through "over $999". These results should be shown when the Show Totals click event is initiated.
[code]...
i want a code that if a process that i picked is no match in a process list that process that i picked will start
View 4 Replies