VS 2008 Write A Program That Will Output The Sum Of The Powers From 1 To The Supplied Number?
Jul 17, 2009
Write a program that will output the sum of the powers from 1 to the supplied number. For example an input of 4 will produce 288 ( 1 exponent 1 + 2 exponent 2 + 3 exponent 3 + 4 exponent 4 = 288)how can i work with this?
View 37 Replies
ADVERTISEMENT
May 5, 2011
I have a form in an application that I'm building that shows a datagridview with the last field being a checkbox. What I'm attempting to do is if the user clicks on the checkbox and then clicking on "Save Changes" all of the fields on that datagridview row (except the first field) is then saved to a database. I have the following [Code] The error I keep getting is "Insert Error: Column name or number of supplied values does not match table definition.".
View 5 Replies
May 5, 2011
I have a form in an application that I'm building that shows a datagridview with the last field being a checkbox. What I'm attempting to do is if the user clicks on the checkbox and then clicking on "Save Changes" all of the fields on that datagridview row (except the first field) is then saved to a database. I have the following
Private Sub holidaysaveButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles holidaysaveButton.Click
For Each dr As DataGridViewRow In DataGridView1.Rows
[Code].....
View 14 Replies
Sep 8, 2009
Have a bit of code ported from VB6 to VB.NET. It uses Write and WriteLine all the way to produce output files.
Now, I need to compare outputs from original and ported code, but there's one tiny problem with number formatting. For instance whereas VB6 code Writes just .5, the VB.NET code produces 0.5, instead of .0005 (in original) it writes 5E-4, etc.
How can I make VB.NET's Write to write numbers in the same format as VB6? The option of refactoring writing code to include formatting step is not acceptable.
View 3 Replies
Dec 17, 2011
Write a program that counts the number of spaces in a string provided by the user
-You need to use the InStr function and start it at different points within the string on each loop of the Do Until control structure.
output- needs to state how many spaces that are in the string that was inputed in the text box
View 4 Replies
Jun 13, 2011
I have to write a program that does a count down on the number of seconds you entered in the GUI I have most of the code and it basically has to countdown the seconds i type in the txtStart. Attached is the program design..This is what i have so far with the code. It converts seconds to hours and minutes and seconds, but it doesn't do the countdown.[code]
View 2 Replies
Apr 25, 2009
Is there a way i can execute a CLI program and have it output or return what the CLI program sais, such as ping etc.
View 3 Replies
Sep 25, 2011
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Microsoft.VisualBasic.Interaction.Beep()
System.Diagnostics.Debug.WriteLine(3 + 2)
End Sub
Why I don't see in Output window number 5 as output?
View 4 Replies
Mar 28, 2011
So Im a student and I need some help I have a question "Write a program that displays a list of Super Bowl winners ordered by the number of games won." I need to use arrays, in the most basic way possible someone was telling me about keys but I havent done that yet...The array is a text file with just the 44 names of the Superbowl Winners...
View 12 Replies
Nov 6, 2010
I've been designing a Interactive Maths Quiz to test students on the modules they've supposedly learnt, but am having trouble getting the textboxes to display the question as i want them.I need to write things like x3 and x-5 but can't get it to work. To get 2 and 3 i copied and pasted off a word document, and that works, it displays it no problem. I tried the same with others and it just displays a box.
View 6 Replies
Mar 1, 2012
What I am trying to do: There are three powershell scripts with different time delays as shown below.I am trying to run them asynchronously in .NET and I followed this article to implement Asyncrhonous programming. Where I am stuck:The I am not able to retrieve output after the events are invoked.The scripts are being called but then the program ends and it shows "Press any key to continue" in console windows.I don't what I am missing here.
Info: JobRequest is a class that I use to pass around information keep track of jobs.
Sub Main()
OurAsyncFunctionCalling("psDelayScript2.ps1", "-arg1 4 -arg2 5", 1)
OurAsyncFunctionCalling("psDelayScript1.ps1", "-arg1 2 -arg2 3", 2)[code]......
View 1 Replies
Jun 15, 2009
how i can write a program to create a shortcut in the startup folder of a different program. So i have one program on my computer that should run at startup, i just need another program to create a shortcut to it, and then copy this shortcut into the startup folder.
View 20 Replies
Sep 24, 2009
This is my current output in a textfile that is created during the program. (Its different from my previous post)
!CH1 = S11,CH2 = S12,
-66.979,-60.518,
-61.403,-60.546,
[code]...
View 17 Replies
Sep 16, 2011
I'm supposed to write a program that validates an inputted ten digit ISBN number using the check-digit at the end to ensure that the sum is a multiple of eleven. Before calculating this and detecting if the entered number is indeed a valid ISBN, we're required to check the first nine digits and see if they are indeed integers. After this the tenth digit is checked to see if it is "X" (for ten) or 0-9.
With the code I've written it keeps returning false for whether or not the ISBN is valid, even with valid numbers. I feel like its something to do with the hyphens; have I misused the replace function?I'm a little lost on how to make my code work, but I'm fairly certain my logic is okay so far.
[Code]...
View 4 Replies
Aug 18, 2009
Using this example how would I go about updating an XML file using this example[code]...
View 5 Replies
Oct 20, 2011
If I want the my output to be written to a text file do I just need to add:
Respone.clear() , Respone.ContentType = "text", Response.OutputStream.Write(bytes, 0, bytes.length) , Respone.flush()
[Code].....
View 1 Replies
Apr 7, 2009
I need help with ASP.NET in the VB.NET language.Currently I have a server that contains a script called Query.aspx. I want this script to evaluate another script, as an example "Test.aspx", and print the evaluated response out as Query.aspx's response.
View 6 Replies
Feb 6, 2007
I have been at VB.NET for a very short while now (about 1 month) and I can say without a doubt my knowledge of VB has continued to amplify from the information posted in these forums.Along with my first post I also have a question about setting an icon for my application .exe file.I have read that I need to go to Project > properties then on the Application tab there is a section to change the icon from the default to something else. However when I do this and choose the icon that I want, I get an error when I use the debug to run my application.It says "Unable to write to output file C:/... the specified image file did not contain a resource section".
View 3 Replies
May 25, 2011
I am running some commands on computers and I would like to have them output a seperate text file if the command cannot run.
For Each strUserName As String In strLines
Dim ReplaceCommand As String = sCommand.Replace("*", strUserName).Replace("$$$", saveFileDialog3.FileName & ".txt").Replace("###", exeSearch)
[code]....
Am I on the right track? I am getting an output to a text file but its just one line ans always says PASS.
View 1 Replies
Apr 1, 2012
I'm trying to adapt a VBscript that runs the QWINSTA command against a text file I've defined as an array and displays the results in a text file.after looking at numerous examples on Stack and other sites this is my latest iteration, that displays everything except the STDOUT, which is really what I'm after, not sure if it's an issue with how I'm calling the command piping the output or what. I'm also passing two variables as arguments to complicate matters :)
The Text file that stdout is piped to is empty after the FOR Loop completes I may be going the long way about this, most of my past experience with this is in BATCH
[Code]...
View 1 Replies
Oct 8, 2009
i have a problem when i run my project, is it can slove? "Unable to write to output file 'E:New FolderQLBVQLBVobjDebugQLBV.exe': The specified image file did not contain a resource section."
View 2 Replies
Feb 26, 2011
I am using Visual Studio 2010 Professional in trial mode... and suddenly the Output window won't show my Debug.Write() stuff. It had been showing it for the past month.I have been using the 2010 version for 30 days (after upgrading from Visual Studio 2003) in trial mode. I just renewed the trial for the extra 60 days, and the "About Visual Studio" window says I still have 59 days left.
I have verified that the application is running properly, without errors. When I purposely generate an error, the Output Window properly shows the error and the stack trace I've already checked my Build>Configuration... it's in "Debug" mode, not "Release". The Debug.Write() text is not going to the Immediate window, either.One other point, I tried running the same application in the Visual Studio 2010 Express Edition, and it complained that it could not debug the specified code, though it did properly build it so that it would run in the build. Could Visual Studio 2010 Express have modified something in my project files to disable the debugging output?
View 2 Replies
Jul 28, 2011
I've this txt file (almost 60 MiB)
[Code]...
Every line starts with 56000 then the first key, the the second key and the rest of the line. I tried to use SORT, that's included with Windows. It does a pretty nice job, but i need to have my own function in case SORT is not available. The output should write 560001002001 at first.
View 3 Replies
Mar 3, 2010
I have a video encoder app made with VB6 that users frequently have issues with. The problem that people encounter is that files do not show up in the output folder where my application is set to write them. The output folder is located in C:Program FilesMyAppOutput. Vista users can sometimes click "Compatibility Files" and see the outputted files. Sometimes I must tell users to "Run As Administrator.."
View 1 Replies
Jul 26, 2011
We are currently changing our Antivirus program which involves uninstalling our current one first. That isn't a problem but we have several laptop users not in the building who might have a problem uninstalling programs.
It should be possible to write a script/program to automate the uninstall process I guess, but don't know where to start. Can someone point me in the right direction?
View 7 Replies
Apr 22, 2009
I have to write a program for a user to take a 20 question test (A, B, C, D). The users answers will be stored in an array and compared with a 2nd array that has the correct answers. Its then supposed to go to a 2nd form when you click show score, grade it, and display whether each answer was right or wrong. I'm missing something easy probably.
CODE:
View 5 Replies
Mar 23, 2009
I have a datalogger with his own program on Windows via a RS232 port. This datalogger records data in two ways :
1- continuously (see picture 1)
2- when pressing 'Start recording' button.
The datalogger record a value each 1 sec. Between 2 values, I need to move a stepper motor. I want to synchronize the stepper motor with the datalogger. So, right after the data is recorded, I move the motor and I wait for the second data to be recorded, etc. The problem is the synchronisation. I have access to 2 triggering method when the data is recorded :
1-when a row is added in the grid (picture 1)
2-when the 'Recording' value change (from 5 to 6 by example)(picture 2)
The easiest option would be the second one because the 'Recording' value isn't a textbox, it's included in the general form. I cannot access to it directly. The class of the datagrid is Thundergrid and his name (Caption) is LIST. I want a VB program that will do the following..When I press a button in My Form :
-Get the handle of Thundergrid class, LIST named.
-Wait until the datagrid row number is 10.
-Then, a variable n will count +1 at each added row in the datagrid.
-Each time the n value will change (datagrid add a row), the motor will move.
-When the n value = 121, the cycle is done and I can collect the data.
For the interaction with the motor, it will be done by grounding a pin in the parallel port.I do not need help with the motor control, only the n value need to be synchronized with the datagrid.Please refer to the attached pics. I used Winspector to get the class of the datagrid. It is in the red box.
View 1 Replies
Nov 24, 2011
I try to redirect a robocopy job to a textbox. If I write the complete output after the job finishes, all is displayed correctly.
Code:
myProcess.StartInfo.FileName = "cmd.exe"
myProcess.StartInfo.Arguments = "/C " & Chr(34) & cntCommand & Chr(34) & " && exit"
myProcess.EnableRaisingEvents = True
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden
[code]....
View 5 Replies
Jan 14, 2011
Unable to write to output file 'D:DevelopmentJob_TrackerJob_List_and_TrackerobjDebugJob_List_and_Tracker.exe': The process cannot access the file because it is being used by another process. Job_List_and_Tracker
View 6 Replies
Sep 4, 2009
I am writing a program which was pretty easier until I got to a certain part. I need to write a code that will let me input 2 alphabets and they will output in alphabetical order
Ex:
Please Enter alphabet 1: b
Please Enter alphabet 2: a
[code]....
View 3 Replies