Put In Some Code That "worked" The Whole List(Of)?
Jun 9, 2012
I've started using Structure's with code - so I can have a List(Of someStructure) and run code against the structures in the list. They are like mini-classes.
I needed to put in some code that "worked" the whole List(Of) - so I put that as a sub in the structure that I pass the List(Of) to - seems a bit of a hack.
I'm curious what I might be missing about them - anyone willing to share some structure-with-code ideas?
View 22 Replies
ADVERTISEMENT
Apr 21, 2009
Does automatic software update causes some of the module property not to work? They are basically the same function that reads image logo from the currently executing assembly. Function named "Get2LogoImageStream" is different from "Get1LogoImageStream" by just Current.ManifestModule.Name vs Current.ManifestModule.ScopeName.
This "Current.ManifestModule.Name " version of the code worked on both Web From app and Windows form app, however right now it only works for Windows App form. But when I changed this code "Current.ManifestModule.Name" with "Current.ManifestModule.ScopeName" and it worked on WEB without any problem. So my questions to fellow C# or VB.NET developers is that does automatic software update causes this kind of issues?
protected Stream Get1LogoImageStream()
{
Assembly current = Assembly.GetExecutingAssembly();
string imageName = "logo.jpg";
[code]....
View 4 Replies
Mar 29, 2010
I originally created a process that occurred by transitioning between views in a multiview and it worked fine. Now, I've moved this same code into a ASP.NET Wizard and it keeps throwing an error at the second step. The error is:Method 'System.Object AndObject(System.Object, System.Object)' has no supported translation to SQL.Any ideas why this would occur when moving the code into the wizard? I'm sure its something stupid, but I've checked over the code 3-4 times now and it appears identical operationally.Here is the code:[code]
View 2 Replies
Dec 21, 2009
This worked fine in VB 6...but does not in 2010. Any ideas of what I have to change?
If Gun1Avail = "No" Then
targetcount = 1
Do Until targetcount = 7
If frm.Controls("Target" & targetcount & "Gun1") = "Blah" Then
frm.Controls("Target" & targetcount & "Gun1").BackColor = vbRed
End If
[Code]...
View 5 Replies
Aug 23, 2011
upgrade my DAO code to ADO? The following code worked fine in VB.Net for Interop Access 2007.
View 1 Replies
Jun 15, 2011
I used vb2008 and make a good application and make setup file by advanced installer builder .And install and use one month then I formatted my pc .Then install my application without install vb2008but I get a warning message as
View 1 Replies
Dec 20, 2010
I have a VB.NET application that will let me preview .DBF files that come in from some of our clients. The application then attempts to spit out a CSV from this file that we can then use in our various environments. This application worked under Windows XP 32 bit. Our company recently upgraded most of us to Windows 7 x64 which has caused this application to fail. I verified that the target build for this application is x86 and not "any CPU" and rebuilt the app but same issues occur.
It originally used System.Data.Odbc and connection.ConnectionString = "Driver={Microsoft dBASE VFP Driver (*.dbf)};SourceType = DBF;SourceDB=" & dbfSourcePath & ";Exclusive=No; Collate=Machine;BACKGROUNDFETCH=NO;".
The location of the failure is at connection.Open(). The error given is: "ERROR [IM001] [Microsoft][ODBC Driver Manager] Driver does not support this function".
I noticed that the drivers for VFP were not installed and that the Access DBF drivers did not work similar to the post here. The fix listed there is to install VFPro SP2, however, we do not have any FoxPro installs to install a service pack on top of. I then tried to install the OLEDB driver for VFP 9.0 and am now using System.Data.OleDb and connection.ConnectionString = "Provider=VFPOLEDB.1; ourceDB=" & dbfSourcePath & ";" but it now tells me that the connection.Open() line has this error: "Feature is not available".
I am at a complete loss as to how to get this application to work under Windows 7 x64. Below are the 2 variants of the code with the file open path removed for readability (I have verified the path and file exist):
ODBC version:
Imports System.Data.Odbc
Dim strSelect As String
strSelect = "SELECT * FROM " & dbfSourceName
[Code].....
How can I use either an OLEDB or ODBC connection to open these .DBF files under Windows 7 x64?
View 1 Replies
Jun 16, 2010
my program does not work on other machines.although they stood Framework & adodb.dll.writes that the error in the "Update".
View 7 Replies
Nov 26, 2011
I see no options to change. I see the HTML icon but it does not seem to activate. OPtion at the bottom HAS CODE is checked. This code worked in VB2008 but I get the indicated error in VB 2010. I would like to understand what changed.
[Code]....
View 13 Replies
Jan 13, 2011
I 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]...
View 4 Replies
Jan 2, 2010
I would like to know how HttpWebRequest and HttpWebResponse works. How would I send a login request to a website and then find out if it worked or not?
View 2 Replies
Mar 27, 2009
I have this homework assignment where we have to create a pay calculator where you would enter the total minutes worked and the hourly pay rate. and then i have to create the code to show what the total weekly pay would be. I have to display the Hours Worked: and the Leftover minutes: I also know that the formula to calculate the weekly pay is totalMinutesWorked / 60 = hoursWorked and i have to use the Mod operator. [code]
View 2 Replies
Jun 21, 2010
I'm creating a program for my workplace which stores hours worked, calculates pay and all that stuff.Problem being, the database will be accessed through the network and i want to be able to select the database from an openfile dialog on first use to locate the database. On every program start up it then would have the database location stored within the program itself.
View 1 Replies
Aug 23, 2011
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].....
View 2 Replies
Mar 16, 2011
I am trying to build a program that calculates the minutes worked times pay rate equals amount of weekly pay this is what I got but it doesn't calculate
CODE:
View 3 Replies
Dec 3, 2010
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 Replies
Sep 30, 2009
You need to design and create a program that accepts input of employee name, employee type, and the number of hours worked each week for two weeks.
You must be able to select an employee type. An employee of type Trainee makes $10 per hour. An employee of type Regular makes $15 per hour. An employee of type Manager makes $20 per hour.
The program should calculate the employee pay for the week. The employee should receive 1 times the regular pay for any hours worked over the prescribed 40 hours in a week. The program should output the following information:
-The employees name without trailing or leading spaces
-Regular hours worked
-Regular pay
-Overtime hours worked
-Overtime pay
-Total pay
The Problem that i am having right now is "Displaying " the overtime hours on my "FORM VIEW" i mean i did the math right its just when i type (lblOverHrs.Text = CDec(CDec(OvrHrsWrkWeek1.Text) + CDec(txtOvrHrsWrkWeek2.Text))
Its says the "OvrHrsWrkWeek1 and 2" are not Declared which are..im not really sure where i went wrong..
Heres my code
CODE:
View 4 Replies
Oct 5, 2011
Why 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].....................
View 4 Replies
Nov 30, 2009
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 Replies
Oct 25, 2010
I 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 Replies
Jan 31, 2012
I 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.
View 2 Replies
Sep 29, 2011
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]...
View 15 Replies
Jul 27, 2010
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 Replies
Dec 23, 2011
Is 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
View 1 Replies
Jul 21, 2011
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]...
View 11 Replies
Nov 18, 2011
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]....
View 8 Replies
Apr 12, 2010
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]...
View 2 Replies
May 1, 2009
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?
View 4 Replies
Sep 11, 2010
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?
View 1 Replies
Jan 21, 2009
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].....
View 1 Replies