Writing Code And The Different "commonly Used" Parts Of It?
Aug 22, 2009I am very new to microsoft visual basic express editionm, and I wanted to know a little more about writing code and the different "commonly used" parts of it.
View 10 RepliesI am very new to microsoft visual basic express editionm, and I wanted to know a little more about writing code and the different "commonly used" parts of it.
View 10 RepliesI'm taking a class in VB, so I have numerous projects. I have a lot of useful functions and code, and I'd like for them to all be included in on piece of code that all my projects can use. The problem with DLLs is that when I build, the EXE needs the DLL to be in the same folder. I want a standalone EXE file. Is there any way I can have a DLL in a different folder than the EXE and still use it? Or is there some better solution to having useful code somewhere so when I update that code, it will affect all of my projects?
View 2 RepliesI am not a program designer by any means but I would really like to start getting a better grasp of how to do it and a better understanding of the .NET languages in general (VB, C#). I was reading a book by Wrox - Professional Visual Basic 2008. In it I believed it mentioned that Modules are slowly going out of existence. I can see why most coding would go into a class object but I would assume modules would always be necessary to at least keep the code clean.
Also, I have been searching for a good source on software design but I can't seem to find any recent books published. I might be searching in the wrong places but I would really like to get my hands on one.
I have never made a notepad like program just calculators and felt like learning how to link/find the parts to make save, open, format, and some other extras but I have NO code. I can't move on unless I know the parts needed and what the code for one of them is if I can link the save as button on the menu bar to the part needed to save I can figure the rest out besides the format that it saves in.
View 1 RepliesI have information entered into a text box on an ASP.net 3.5 page. when i click the submit button i would like this information written to a sql server database. what I need to do to accomplish this. The end-user should not see anything.
I am using visual web developer 2008. the event handling code is placed in a separate file using vb.
I am trying to write a code to set a service charge for a checking account to calculate by adding $4.50 to a value computed by using the following specifications: $0.14 per check if less than 10 checks were used, $0.13 per check if less than 25 checks were used, $0.10 per check if less than 50 checks were used, and $0.08 per check if more than 50 checks were used. How do I write $ in a code?
Here is the code I wrote:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(TextBox1.Text) < 10 Then
[code]....
What are the variables for The system drive (most commonly "C:") and system directory (Most commonly "C:WINDOWS")
View 4 RepliesI have been given the task of basically reading and writing to and from files. Below is the code from one sub:
If btnSaveRecipe.Enabled = True Then
FileName = "C:UsersLeylaDocumentsRecipe TaskRecipe.txt"
FileWriter = New IO.StreamWriter(FileName)
[code]....
I can't work out what i've done wrong, but when I open the file itself in the folder, it is empty.
I am doing the project to make a microcontroller communicate with PC. I am facing the problem writing the C++ code for command button to ask uC to display the data in my label. How to write the code for C++ to get the data from the microcontroller?
i'm using a C8051F320-dk which already have a USB connector and a RTC.
my data will be the date, and time provided from the RTC.
Public Class Form1
Private Sub PictureBox7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox7.Click
[CODE]...............
I need to Add a button. Call it AddOne. Make the button caption say 'Add 1'. The 'on click' code should add 1 to the DigitValue every time it is clicked.
Where should I write the header file - Using System.Configuration and others? When I write it after the Inherit line in the form code (not the HTML one), it gives a redline under it. I want to start making a website.
View 1 RepliesTo write code to implement data from visual basic into excel. Write a VB.NET program to store the following numbers into an array named �Scores�: 89.5, 76.2, 90, 86, 81, 97, 61, and 73. Your program will calculate an average score, list each of these scores in a new Excel workbook and show whether each score is below or above average. Your program will then save the Excel workbook as TestScores.xlsx.
In column A1 it should say "average" and next to it (in b1) should have the average of all those scores. in the cells below (starting from A3) it should list the scores and the column next to each score it should say whether each score is above average, average, or below average (compared to the average calculated in cell b1)
So I'm trying out a concept tool of mine where I need to be able to read and write data from a database real easy. I've set up the form as I like and spread around different text boxes and dropdownboxes to read the data from the database. And I've got it all to work and all, but there's a small bug I don't fully understand why's there. Some textboxes don't update the text from the database.
But it seems as it only occurs if the data in the database is nothing. So the value from the last row is still hanging in the textbox and thus, clicking "Update" actually updates the value from the field from the last row, into the new row. Messing everything up.
[Code]...
I am trying to minimize my code writing. I have DBLayer base class that selects, inserts, updates and deletes records from database. I need only fieldlist and table name from each derived classes to perform the actions. I have defined static tablename, fieldnames in derived class. Currently I am defining next static functions in derived class for GeneralSelect [which selects all records], GeneralInsert[Which inserts a records], GeneralUpdate[Which updates records as per given id] and GeneralDelete[Which deletes a record of the given id]. The parameter and all functioning are same just the differece is the table name and fieldnames.
One DBLayer Class that performs database actions
Class DBLayer
Public shared function Query(byval SQL as string) as dataTable
[code]....
... same goes for all other table objects... If I have 20 database tables i have to write getdata method in all 20 class changing only the tablename so i would like to get ride of it. So in order to get ride of it what do i need to do?
Im developing a program that adds any number of tabs for each directory that contains user specified information and also adds a list view control on each tab that shows the files contained in said directories. I want the user to be able to double click a file in the list view(s) to open it.
View 2 RepliesI am creating a form which has the customer information entered by the user.When the user clicks submit the row need to be inserted into table "customer".writing the code to connect to the access database and insert the new row?
View 3 RepliesI am learning visual basic. I have created a form for a calculator. I have placed buttons for plus, minus, division, multiply etc. The programme is working for clicing on buttons i.e. when I want to add two nos. I accept 1st no. from text box then I click on "PLUS" button then I accept 2nd no. When I click on "Equal" button the result is displaying on textbox. But I want to write code insted of clicking on "PLUS" button if press " + " key on keyboard and for "Equal" button, if I press " Enter " key on keyboard, The result for adding two number should display on textbox. I want code for both click event and keypress event.
View 2 RepliesWell, i was thinking of making a Tetravex solving program in order to practice my code writing skills (language will propably be Visual Basic) and I need help finding an algorithm for solving it. For those that don't know what tetravex is see this http:[url]... . The only algorithm I can come up with is the brute force way, place a tile randomly in one corner and try every possible tile next to it and continue the same process, if it reaches a dead end revert to a previous state and place a different tile.
View 4 Repliesi'm running Visual Basic 2008 Express Edition (latest service pack ... 9.0.30729.1 SP) on XP Pro SP3 with .Net Framework version 3.5 SP1 I have a rather large project I've imported from Visual Studio 2003 (Standard).The project compiles and runs just fine ... my compiled program itself never crashes.
But while I actually have the code up in the IDE, and simply adding/deleting code the whole IDE will randomly crash (usually without warning) and I loose my changes since last save.If/when I do get some hint of why it crashed, I get a window about illegal whitespace or something.... but that's rare ... usually it just crashes without warning and the whole IDE completely shuts down instantly. just deleting/adding a character is enough to trigger it maybe once every 30 minutes.
This is on a computer that is otherwise very rock solid .... no other program ever crashes, etc.
what is the different writing code application vbnet 2005 application for single user and multiuser?
View 3 RepliesI'm writing some VB2008 code to control four 7-seg LEDs I bought from Velleman. They came with some example code in VB 5.0, and with instructions telling me to input 5 bytes at a time in the format Chr$() & Chr$() & etc. for the rest of the 5 bytes. When I try to do this using VB2008, it rejects the $ sign, so I've tried it using the Chr() format, which VB2008 allows. However, it doesn't work. Is Chr() the new version of Chr$() or are they different entities? In sending data to the LEDs, I'm using LiveComPort.WriteLine() as my command. (My serial port is called LiveComPort) I also tried it with LiveComPort.Write() asthe command. I know that my serial port and the LEDs are working, because they respond to the demo program provided by Velleman.
View 7 RepliesI'd like to know if there are other ways to write a submission program (submitting urls or pad xml to directories, submission sites, blogs) other than using the webBrowser. I've evaluated some shareware programs that submit urls or data very quickly, like 100s in a matter of mins. I couldn't write a program using a webBrowser because it might take 15 secs just to load the url. How are they writing the code??
View 1 RepliesI am having trouble writing the code to start clock at 4o mins & count down by 1 second to 0 mins, have MessageBox("time up"), then go to minus time , e.g. -5:22.
View 13 RepliesI am working on a program using VB.Net 2010 which will enable me to setup groups of files & folders for back up with syncing capabilities etc. I have a concept program which is based on some sample code I found out in one of the VB.Net forums. I have modified it from a command line based program to a form based program. At the moment I consider this code to be a "concept" program which once I have the various copy/sync routines developed and debugged will be integrated in to another program I wrote for
creating "Back Up" groups to automate the process. There are some 3rd party programs that do similar things that I want to do such as Microsofts Sync Toy, but none of them offer the grouping and exclusions options that I am going to program in to this backup/sync program.
So here is my problem, I have the included code taking two folders, a source and a destination, and copying everything from the source to the destination. It will skip over any unchanged files/folders and will delete anything found in the destination folder that is not found in the source folder and it will update all files in the destination folder that have a newer version in the source folder. In other words it will mirror image the source to the destination but will be smart enough not to copy unchanged items from the source to the destination thereby saving a lot of time. The sync part of the program is working fine, the displaying of the progress and results is not.
[Code]...
The drive is connected via USB and the problem I'm having is that, periodically, while my code is executing, the usb drive seems to disconnect and reconnect. (Nothing to do with the program, but the drive itself).I want to find a way to prevent these temporary drive reconnects from interrupting my code. IE, i want to insure that whatever read or write that is requested is actually executed even in the case of a temporary drive interruption.
View 1 Repliesi am having problems getting my code to delete certain parts on an XML.I've tried..
DirectCast(ListBox2.SelectedItem, Data.DataRowView).Item("name").Delete()
DirectCast(ListBox2.SelectedItem, Data.DataRowView).Item("description").Delete()
DirectCast(ListBox2.SelectedItem, Data.DataRowView).Item("manufacturer").Delete()[code]....
But get Quote: Public member 'Delete' on type 'String' not found
I have a xml document that i want to edit, for example true texboxes, any other way would also be welcome :))
[Code]...
Im dont know whos familiar with acronis but im using the command line version and some scripts i made to restore data to hard drives.The program is running in CMD, so its should be doable. It also not only needs to redirect but keep the CMD windows open so i can input y/n if is requires it. [code]...
View 3 RepliesI have 4 textboxes three for input one for output. Basically what it does is takes input from textbox1, 2 and 3 then combines them in textbox4.here is an example:
textbox1.text = "AA" textbox2.text = "BB" textbox3.text = "CC" textbox4.text = "AABBCC"
what I am trying to do is is compare the input with the output.so take the first two characters in textbox4 and see if they are the same as in textbox1. then take the second two characters and see if they are the same as textbox2.
I know how to do it for just one string of characters but I am not sure how to seperate out different letters in one textbox.
I have a datagrid that show an online status. the Status column have 2 status, OnLine n OffLine. I want to make any record that Status = Online into bold style.
View 2 Replies