Using a timer, am making a rectangle platform move from left to right. The problem is that it leaves a trail of itself and I believe this is down to refreshing or something. here is the timer code if your interested:
If shaperet = False Then
Timer2.Start()
platform.Left -= 4
I'm trying to make a program where three race cars move around a track. with randomizers and timers, I only want to do one lap. My "cars" are pictureboxes. so the starting line's location is (400, 150). Here's the coding for the inside car:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TimerRight.Enabled = Not TimerRight.Enabled
I was hoping that the various controls for WinForms in VB.Net 2008 would have a property such as OldValue and NewValue that I could pull from the Change property.
I'm wanting to write a generic code that will save the OldValue, NewValue, name of field and name of table, and date of change directly to a simple Audit table.
Items aren't changed often, but we need to be able to trace the history of changes to certain fields. I've got the code written for saving to the table, but I'm not finding anything that will show me the two values I need.
I get the NewValue from the changed property but how can I locate the OldValue for date/time pickers, text boxes, check boxes are the main items on the forms.
How To Create Audit Trail Of Record Changes In A Form In Vb Net?I get the NewValue from the changed property but how can I locate the OldValue for date/time pickers, text boxes, check boxes are the main items on the forms.
I'm trying to create a 'trial version' for a software of mine, currently it is pay-only. Basically the most efficient way I can think of is to simply change the startup form of the trial version after 15 days. The new startup form will simply be a request to register.
-How can I change the startup form after 15 days? -How can I ensure that this cannot be changed afterwards (so it isn't easily pirated).
I have already managed to get friendly urls working with my cms; however, what i want to know is: with asp.net 4.0 routes options, how do i get a root leaving routing? When user types in www.mysite.com/page_name, which is aboutus, it goes to the page cms.aspx but leaves the other routes intact:
When a user leaves a TextBox on the form I execute a format and save to a variable. This is saved to a database by clicking on a ToolStrip button.
The problem occurs if the user moves the mouse directly from the TextBox to the Button. Neither the Leave event or the Lost Focus event is triggered, the variable is not created and, of course not saved.
If I put the code in the Save Button and the User moves to another control, the formatting(data type Double to currency format in the TextBox) that I want to show is not executed.
So I have a few variables in an array a I want to compare another variable to each of them, if it is the same do something, AND STOP THE FOR LOOP. else carry on the for loop. So...
for i = 0 to 4 if variable = a(i) then do some stuff
[code]....
how do i end the for loop from within an if statement that is in the for loop
this is urgent. i have a form in which i need to give timedelay of 3 seconds before each line executes. But when i try system.threading.thread.sleep its freezing the UI and furthermore all delays are executing as one single delay. that is
I have a modal pop up that is supposed to upload documents. It does that just fine, except that it doesn't give them a title, therefore nothing shows up on my page since Title is how they show up in the list. What should I replace LinkTitle.Text with to get this to work?I am trying to fix this guys code because none of it worked right. I added a comment below that has new code in it that is parameterized. This is in ASP.net 4.0 VB using Microsoft SQL Server.[code]
I find that if I do me.close and then reopen the form with showDialog later, things are as they were before I closed it. If I use me.dispose and then later open the form again, its as if it was never opened before. Are these two both valid methods for leaving a form?
Leaves the user no options to do anything with the program.What I want is to disable everything using the given line (or if anything else), but leave a Menustrip enabled.
I'm trying to update an old code that I don't have the source code for. In this code, the user enters an integer in a textbox as part of a form. Once they move to the next textbox a new form opens to input the number of files that the user chose (in the textbox).I have created all of the forms, but I can't figure out how to get the code to open the new form once the integer has been entered in the textbox and the cursor has moved to the next textbox. I would prefer this to happen automatically and not involve a button.
I am experiencing a strange issue with a VB6 -> VB.Net conversion. There is a function that uses ADOX to look through the tables in a given database, and reset the seed values of any columns in said tables with the auto increment property set to true.I tracked the issue down to a call of "col.Properties("Autoincrement").Value". If this line of code is commented out, then the file handle properly terminates when I close both the ADO and the ADOX connections at the end of the function. If I leave that line in, the handle stays open despite the closing calls and forcing garbage collection.Here's how I am closing the objects:
System.Runtime.InteropServices.Marshal.ReleaseComObject(adoConn) Dim connection As ADODB.Connection = cat.ActiveConnection If Not connection Is Nothing Then
I'm trying to find where this code might be leaving old connections open, and I found this code that might be the cullprit. It is in a function. I'm wondering if this connection would close, if an exception occured from within the USING statement?
I'm looking for a way to process the text entered into a textbox, before the the focus is lost from the control. Or a way to pass a reference to the control to a function/sub when the control has lost focus. In Access I would be able to use the AfterUpdate event. I have tried the following events, but have not figured out how to get what I want from either of these events:
- TextChanged (tried to capture the Tab key, didn't work)
- Validating (when fired for Text1, the ActiveControl name is Text2 which is the next TextBox control)
I'm refactoring the code getting ready for some major work. I want to remove the if/endif pair but leave the contents (do lots of stuff) intact and in place.
In Visual Studio 2008, what is the easiest way to do that without making a mess
I have a DGV with a CB column in VS2008. I would like an event when a DGVCB selection is made (without leaving the cell). It will probably have to be a DGV cell or row event but I can't find one that fires as soon as a DGVCB selection is made.
Our program works fine, until someone locks the computer or the screen-saver pops up (but not ctrl+alt+delete). Once the computer is unlocked/the screen saver is closed, the application stops drawing everything except the title bar, and stops responding to input - it displays a mostly-white window which can't be moved or closed.(Example of application freezing - the mountains are from my desktop background)If we let it sit for about 5~10 minutes, it comes back to life, and doesn't hang again (even after locking the computer/screen saver popup) until the application is restarted.
I'm trying to use StreamWriter to write to a text file; it creates the file fine, but when I open it up, it's still empty. I marked the code below where the writing action takes place.
vb Public Sub BHorse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BHorse.Click Dim oMarketsReq As New BFExchange.GetAllMarketsReq Dim oMarketsResp As BFExchange.GetAllMarketsResp Dim BFWrite As System.IO.StreamWriter BFWrite = IO.File.CreateText("C:Datamarket.txt") With oMarketsReq