Programing VB Getting 6 Errors Dont See Em
Feb 5, 2012[code]...
View 11 Replies[code]...
View 11 RepliesI have adapted a connection string i used alot in vb6 to what, after much research i think it should look like now. I added some code to a button, i dont get any errors and no result in the textbox.[code]
View 2 Repliesbefore you say something like "just search the forum for socket programing examples" I did and came up with things that were to complicated for me e.g multi threaded etc even a chat server that holds users names in a hash table i couldnt quite grasp so im asking if anyone can give me a few pointers maybe link me to a website that i havnt stumbled apon in my google seaches that contain infomation just about basic tcp server that recieves text strings no fancy users or anything like that.
View 2 RepliesI am trying to make a program that converts the weight of objects on earth into other planets. i have trouble with naming things like weight ratio and planet because VB program doesn't accept the coding. i don't know where to put theh data in the disk so that the program can access it when it runs.
Imports System.IO
Public Class weightcalc
Private planet structure
[code]....
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
FileNum = FreeFile()
[Code].....
Im an electrical engineering student, and I am trying to utilize the serial port to give me high and low digital states. What i want to do is simply turn on an LED or turn it off. the basic gist of what I have been trying currently is that on a button click, serialPort1.DTREnable = enabled or disabled, indefinitely until the next button click.
So far, I have only been able to get the LED to momentarily flash... It seems to begin in an active state flash off, then immediately, return to its active state. I am using Visual Studio 2008. Can I use DTREnable to generate on/off states by enabling or disabling the pin? Is there a tutorial somewhere for electrical engineering applications using visual studio 2008?
I created a project in Excel-VBA (wich I'm also new at) that connect to a SQL. It retrieves data, puts it in arrays, calculates, writes it up nicely and mails it to a mailing list before it closes itself down. This works when Excel is stable on the server, which it is not. Therefore I'm set on rewriting it to VB.NET (just have to learn it first).Project:To build this project in VB.NET I wanted to try and make it Object Oriented (OO). I have read that OO is when I create a Sub or Module for different tasks. Are there any advantages in learning/doing this from the start? I plan on creating Subs for almost everything, and then call it from a Main sub.
Too much OO?:
These are the modules I plan to create (and call)
Connect to SQL moduleSet up a query and put data in arrays moduleCalculation moduleOutput
[code]....
I am trying to get a better understanding of the uses of arrays in programing, and have been wondering why do programmers use an array when working with mathematical concept such as Fibonacci sequences? why are arrays so prevalent in coding now a days.
View 3 RepliesI have a .net application that uses customerrors web.config module to display meaningful messages for errors. It works without any issues for 500 errors/exceptions caused by non-ajax and ajax components (updatepanel). However, in a scenario where updatepanel's asynchronous request times out, there is no error raised at all. I was able to see the timeout in firebug and come up with a solution that would at least display the error message as an alert and then redirect the user to the 500 error page using javascript but it's not quite doing what the rest of the application does in case of an unhandled errors like these. I basically just want everything to go through "LogEvent" mechanism so based on the severity of the error, it does the necessary work.This 500 error page doesn't have anything in the Server.GetLastError() for these timeout scenarios. Is this an expected behaviour? Can it be changed so I do have access to these timeouts in Server.GetLastError() OR maybe just run this error through "LogEvent" mechanism? Is there a better/more graceful way to handle this issue?
Below is my code to give you an idea, not exactly what I have in my application but pretty close.
Web.Config
<customErrors mode="On" defaultRedirect="~/Errors/ErrorUnknown.aspx" redirectMode="ResponseRewrite">
<error statusCode="500" redirect="~/Errors/Error500.aspx" />
</customErrors>
[code]....
All i need to do is save the project when i done, But it keeps updating.
View 7 Repliesi am using PostMessage API to send text to another app but the prob. is i want which key is pressed and it not write to the app for example.If a person is writing to notepad he pressed "H" but it will not write H and the key will be stored in my program i am using keys.H for this for reciving but i dont know how to not write the key which he pressed.how to use it which api or code to use.
View 2 RepliesThe ZEMSDK program only run on VS 2005 is there any possible that it can run in VS 2008? because i am using VS 2008..
Is there any object or function that are not suppported by VS 2008?
ok i want the speech recognition to listen to me but not do anything unless it hears a certain word or phrase
View 4 RepliesPublic Function ChangeUpdateOrderPlace() As Boolean
' Try
Dim dsChanges2 As New DataSet
[code].....
It there a way where you dont type anything in the textbox, and you press F2 and then the textbox says F2 or if you press 1 on your numberpad, the textbox will say NUMPAD1, or something like that and if you press Ctrl on your keyboard the TextBox will say Ctrl
View 2 Replieshow can i prevent from software to be opened twice?
View 9 RepliesThis is my first time writeing a program and i am stuck. i am just looking for were i should go next. i can't figure out how to write in code for the days in the getDay function.
Write a program that computes the cost of a long-distance call. The cost of the call is determined according to the following rate schedule:
a. Any call started between 7:00 A.M. and 9:00 P.M., Monday through Friday, is billed at a rate of $0.30 per minute.
b. Any call started before 7:00 A.M. or after 9:00 P.M., Monday through Friday, is billed at a rate of $0.15 per minute.
c. Any call started on a Saturday or Sunday is billed at a rate of $0.10 per minute.
The inputs will consist of (1) the day of the week, (2) the start/end time of the call, and (3) the length of the call in minutes. The output will be the cost of the call. Input will come from the user and outputs will be displayed via the console window.
Module program1
Sub Main()
Dim day As String
day = GetDay()
[CODE]...
Assume I have a form that has say 5 text boxes and I need to pull some data from a database then set those 5 text boxes with that data.So assume I have 3 basic layers: the code behind for a default.aspx page a BLL class that contacts the DAL and a data access layer (DAL)But I've heard and read that the default.aspx page should not know about sqldatareader, in fact you probably dont want to add the sqlclient namesspace to the default.aspx code behind page. [code] Then the BLL would simply call the DAL to call a stored procedure in SQL Server and do a CommandObject.ExecuteReader, get the results pass it back to BLL and BLL would then send it to the code behind page of default.aspx.I can provide full source code if that doesn't make sense. My question is if its bad that default.aspx actually declares and knows about an SQL Data Reader then what is the better way to do this? What datatype should I be using to avoid having an sqldatareader in my interface code ?
View 2 RepliesI have formA.vb and I added some shortcut keys using the key_up event handler. Before coding the handler I change the keypreview property of the form to true. I added this code :
Private Sub IntRMA_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
If e.KeyCode = Keys.ControlKey And e.KeyCode = Keys.C Then
[code].....
I have developed an application which launch an external executable. I want to be able that if I am using another one, like notepad, I dont loose the focus to the one called by my application. I have test it changing the startinfo.windows style ( http://msdn.microsoft.com/en-us/libr...ndowstyle.aspx ) from Normal, minimized and hidden.Every one I have used make notepad loose the focus to the new launched application. Is it there any way to launch an application and make this dont get the focus, in order I can continue working in other app without problems?
View 7 Repliesi am still new to using session state, i want to convert page name into and integer according to a database table a function then compares "X" and "Y" to check if a user have the right to view this page..i know this is not the best way of managing website security, but it is like "training on how to use the session".[code]
View 1 RepliesI imported icons from the VS 2005 Image library and they look kind of weird. I have it set on 16-bit color. The icons in the toolbar look fine but the rest don't look right. Has anyone had this problem before?
View 3 RepliesI am using ASP.net with VB.NET.Is there some Validator that i can use that will check the size of the uploaded image?Else what must i do in code to make sure that the user do not upload images more than 1MB?
View 3 RepliesI have a problem that hopefully someone can shed light on. My OleDBdataadapters and OledbTableadapters have gone on strike In a simple vb.net 2005 pro project I have an Access 2003 .mdb with 2 tables each with 1 primary key and all other fields allowing zero length and not required. The database (not read only) is included in the project (see connection string below which works because data is presented on bound forms).
Although each table's data is displayed on one of 2 bound windows forms, it just refuses to update, add new or delete. I've deleted and recreated forms, etc, using wizards and just run time code but the problem is still there. I can change data manually in the mdb. The code below refers to a site mdb table and was wizard generated. I added an update query to the TableAdapter using the wizard, see sql below.
[Code]...
wen i open mdi through the login form, the forms inside the mdi child forms dont seem to execute.
View 2 RepliesEach time I create a program, if I don't change the CPU type to x86 in the Project Properties, Compile, Advanced Compile options, it doesn't work. For example, if I hit the drop down button on a combo box, there will be no data, but after switching to x86, there is data. How does changing the CPU type affect how others (such as when its being graded) view the program? If the program is not run on an x86 system, would it appear to not work then?
View 1 RepliesI found some threads talking about this.. but when I follow the thread on where to do it.. it must be talking VS2005.. cause on vs2008 in project properties -> application tab-> I dont see View Application Events button. so I assume its moved in VS2008 ? I did find some code I guess to do the same thing.. but I wanted to make sure I do it correct.. since I have an app that a client is running and they keep getting framework exceptions and I have no clue where its coming from.
View 18 RepliesI have a checked listbox which is populated with names(firstname & Surname), I also have a form that has been designed (layoutwise but with no code) to be populated with personal info such as name address,postcode,email address, sql database defined in the program that has a table called members that has the same column headings as the members form.
What i am trying to figure out is how i can commit personal information on my form to that database and copy the firstname and surname from that form to the checklist box if they dont exist? how do i go about this codewise?
So when i build or click debug on my program. No errors come up and its smooth. So i decide to publish my programme. However. I come up with a bunch of errors during the publishing.
Here they are:Error 1 Cannot publish because a project failed to build. 1 1 Simple CALC
Error 2 Unable to copy file "binReleaseSimple CALC.exe.manifest" to "binReleaseapp.publishApplication FilesSimple CALC_1_0_0_0Simple CALC.exe.manifest". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
I have 2 console apps projects in the same directory but different projects. There is some common code in the App_Code directory and a common app.config which gets build into seperate .exe.config files.One module (VScanDemonStarter) starts up and writes to one logger with its own appender going to a seperate file. It uses an process.start() to execute the other module (VScanDemon) in another command prompt hidden window.When I run VScanDemon by itself it puts entries into its log file. When I run VScanDemonStarter it puts entries into its (different) log file, the VScanDemon log file gets created, but no entries. I can see it is executing because some files get moved from one directory to another. Just no Log entries.
<root>
</root>
<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender" >
[code].....