I'm looking for a way to get rid of the delay when a user presses a key. The Key_Down event unfortunately is affected by this and I'm making a type of game that needs smooth movement.
My current solution involves a timer and sort of my own makeshift way around it, it's almost perfect but quickly switching left and right keys gets buggy from the key repeat delay.
[URL]
There both pretty much the same, It almost worked in VB.Net but when declaring "lpvParam As Any", the any part was marked as an unknown variable type. I guess that's something unique to 6.0.
I'm trying to make a mastermind game program with visual basic. I started of creating the combination maker for the start of the game. Hoever, in my version i don't want any colors to repeat. I used the random function independently to get numbers from 1 to 6. Each number has a corresponding color. The problem, the values still repeat sometimes.
I built a power saver program that makes the screen turn black when you're not standing over the keyboard, but it only makes the screen turn black and that probably won't save much (or any) power
I know that time delays have been covered before around almost everywhere. however a method that forgoes forcing the GUI to become temporarily non-responsive, is all but a myth, or at least to my findings. i have the need for a GUI program to delay before the next command, however using the current method, detailed following, it causes the desired effect however it dose make it much less polished as when you click anything else on the GUI it goes un-responsive for the directed time. [Code] make a sub called say Tdelay( milseconds as integer) and have it run a loop as many times as the milseconds variable indicates and each time making the thread delay for 1 milsecond and then update the GUI/form in some way, then re-loop.
Is it possible to pause the music then if I resume the music it will just continue the flow? I mean if I pause the background music in 33 seconds and the music has 50 seconds and I resume it will just continue playing in 33,34,35 etc.. seconds?
I was wondering if their was a way to for me to turn off events and then turn them back on in my program or just queue them up until i am ready for them to be excuted. Kinda like how a OS turns on and off interupts. Is this one of those general programming no-nos?
How to repeat the row values up to end date For Example
Table1 Date Name Dept ----------------------- 12-02-2009 Raja IT 13-02-2009 Ravi CSE 14-02-2009 Ramu ECE
From the above table value i want to repeat the value between the two dates from 12-02-2009 to 12-03-2009.
Expected Output Date Name Dept -------------------------- 12-02-2009 Raja IT 13-02-2009 Ravi CSE
[code]....
If StartDate is same value of Date column For EndDate i have to check the time column, if time is greater than 17:00 it should display a next date in EndDate column.
i have little comand to add values from one table to another like this, but i need to this command to repeat, because table has more than 130 000 records.
I have a simple program that takes the number of students and calc's the avg. It is suppose to add one student,(female, male,all) with each button click and update the avg. I have a loop set up to do this but I don't know how to get my do/while to work once, each time I press my calc button or can't it be done this way?
I'll try to past my code so far:Public Class frmMain
I'm having trouble using the Random class. I have this [code]...
I have this code in a function and everytime I call it it return a random number. The problem is I only want the number to be return/generate once. There be times I call the function and it returns the same number as in the pass. Is there a way to random the number once? I know in C++ you use like "Seed" or something and it will only generate once.
I've completed an assignment that requires me to search through two listboxes for a particular number.If the number is found, the text on a label changes to a dollar amount, otherwise a message box is displayed letting the user know that the requested number cannot be found.It works well enough, searches through the listboxes, finds the number, and displays the message box when it can't be found.However, the message box shows repeatedly up to five times.After the user clicks "OK" on the fifth appearance, the program crashed and displays the follow message."Invalid Argument = Value of '5' is not valid for 'index'.Parameter name: index."I don't know what's causing this, or how to fix it.I do use the index as a counter at a portion of the program...but I'm not sure where I went wrong with it.[code]Also there are five items in the second listbox...probably has something to do with it.
Im creating a program that randoms 5 questions and when a certain question is shown then it must not be shown again when the button is clicked. Lets say when "What is my name?"array is shown when the button is clicked then it must not be shown again until the last question that is not shown will be shown.
Public Class Form1 Dim random As New Random Dim Question() As String = New String(5) {}
now if i've written a code, and then wrote that if a certain condition presents then repeat that code again including that if condition, so what is the code for this?
I am creating a page that auto-creates a pdf file from data in the database. I have the entire pdf working with the exception of the pdf background. The customer wants a gradient which I will need to repeat, but how would I create this? the image is 1px in width 976 in height [Code]. I was hoping that declaring a longer width it would stretch the image across but this failed.
I have access to the source code of a previously created app that work's as designed, but i am looking to update it for further enhance its ability. The change required may be simple in thought and also in design.Basically the app allows you to read in a data file a confirm the data file is in the correct format.Details fo the data file. All lines of the file are 120 characters long. If they are not then there will be an error returned. The fields within the lines have different properties and vaules and the validation on these fileds and lines work perfectly.
1. The first line of the file is always known as a descriptive ( header record ).
2. The next line will outline a detail record. The could be hundreds of these lines.
3. Finally there is a file total record.
A file could be four lines in total or 40000 lines in total. As mentioned the app works when there is one header and total record.I am looking to see if it can be modified.My intention is to merge multiple data files into a single file. There in lies the problem. There is a line in the code as per below.
Do While Not EOF(1)
As far as i can tell this means to go to the end of the file. When there are more than on set of data , there are errors messages generated because the code is looking only for one set of header and trailer records. As mentioned when there is one set of header total records , the apps will validate the file and return any error messages.What i think i need to do is insert another loop/s that say's read data between the header record and the trailer record , if there are any errors display it , then go to the next header / trailer records and display and errors , and continue to do so until you reach then EOF.
There is a richtextbox containing either 'True' or 'False' at each of it's lines. Let's say for example that it contains 100 lines. The 2nd line is 'False'. Through a contextmenustrip I would like to be able to select that 'False' value and have an option saying 'apply to a range' of lines. The program would ask for the number of lines the user would like to apply that value, and apply that value to the lines he specified. [Code]
I some code that looks to see if a certain program is running when the form is open. If the program is open it puts Running in a label, if it isn't running it says not running.What I want to do is repeat this process every 5 or 10 seconds. I have never used a Timer before so not sure where to start.
Here is my string: (not real just made up) Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load WebBrowser1.Hide() End Sub Now if I want to repeat that string the ammount of times I say in TextBox1, how do I code that with that string code above?
I have a simple project that calculates the grade avg of male, female, and both using a listbox and radio buttoms for male and female. The program needs to update each time I use my btnCalculate button by adding one student and updating the avg.MY question is how to I get my do/while loop to work each time by just hitting my calc button? [code]
I want to create a audio player class but having some problems like when audio is finished it is not repeating. While playing audio some UI controls are not working.
If I have songs in listbox. Thats All Play One by One. Repeat When Finish Play List. I am Using This Code For Repeat One Song: If AxWindowsMediaPlayer1.playState = WMPLib.WMPPlayState.wmppsStopped Then AxWindowsMediaPlayer1.Ctlcontrols.play() End If
User want to open a Employee Entry from in 5 tabs...
For Example
When the user open a Employee Entry form, while entering the details at that same time, user again open a employee entry form (2nd Employee entry form show like a new employee entry from with out any details)[code]....
how to work multiple bookings into my program. At the minute i have two calendars, one visible (Start date) and one invisible, wich the user can make visible if a repeat booking is required (End date).
How would i work a repeat booking into my SQL Statement, as i only have one BookDate field and one BookDate parameter.
e.g.
Dim BookRoom As New SqlCommand("INSERT INTO bookings ( UserID, RoomID, BookDate, StartTime, EndTime, Reason) " + _ "Values (@UserID, @RoomID, @BookDate, @StartTime, @EndTime, @Reason)")