|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (9 bit)
|
Visual Basic Discrepancy. HELP!
I downloaded the Free VB 2005 Express Edition of visual basic and started a project.
I am picking up on a project which I stopped working on in VB 6.0Ultimately, I NEED to use VB 2005 Express Edition to compile this application. To give a brief premise, I am making an alarm clock which has been fully functional in VB 6.0. Here is the bit of code (which works in VB 6.0) that I need help with working in 2005 Express Edition. ------------------------------------------------------------------------------------------------------------------- (General Declarations) Dim intTotalSeconds As Integer ------------------------------------------------------------------------------------------------------------------- Private Sub cmdStart_Click() Timer1.Enabled = True End Sub --------------------------------------------------------------------------------------------------- Private Sub Timer1_Timer() 'Compute time and format display intTotalSeconds = intTotalSeconds + 1 Minutes = Format(intTotalSeconds \ 60, "00") Seconds = Format(intTotalSeconds Mod 60, "00") lblClock.Text = Minutes & ":" & Seconds End Sub ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Problem is...I cannot (to my knowledge) declare a variable in general declarations in VB 2005 Express Edition! Please Help. The only other thing that is not true for both sets of code in each VB version is: "Private Sub timSleep_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timSleep.Tick" Is the private sub statement in VB 2005. Last edited by TeenPcknowit; 04-17-2007 at 08:15 PM. |
|
|
|
|
|
#2 |
|
Member (9 bit)
|
Good news!
I placed the declaration under the: Public Class FrontEnd (as I had tried before) Then I realizsed that I was operating on a _tick event in VB 2005...as opposed to the _Timer that was default in VB 6.0. :] Foolish me. |
|
|
|
|
|
#3 | |
|
Come in Ray...
Join Date: Sep 2004
Posts: 1,668
|
Quote:
Public intMyInt as Integer Public strMyString as String |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Visual Basic Code | cuzzzzzz | Web Design / Development | 4 | 02-20-2007 07:54 PM |
| Visual Basic compatability question | waiting | Software Discussion & Support | 3 | 11-07-2004 08:45 PM |
| HOW do i make a program i written with visual basic 6 run with out visual basic 6 | jaxson | Web Design / Development | 6 | 07-08-2003 09:39 AM |
| Visual Studio .NET install | MikeeX | Web Design / Development | 19 | 09-27-2002 06:16 PM |
| scripts or visual basic or perl ? | jchoy | Web Design / Development | 4 | 06-07-2002 08:43 AM |