|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Some simple vb questions
I'm new here, and I'm trying to get into vb.net 2005. I ran into a few things I could not do, wondering if someone here can set me straight.
How can I pause code from execuiting? Say I want to pause code for 2 seconds, or something like that. How can I get the path where the application is running from? Is there a timer event? I would like to have a picture on form display/change every 2 seconds, so I was looking for a timer event to stick some code behind it but I didn't find it. Where does one declare/load namespaces? |
|
#2
|
|||
|
|||
|
I use VB6 myself, but it should be similar
1- use a timer control on a modal dialog. Or there is a windows api you can wrap a vb function around. 2- app.path 3- there is a timer control that you add to a form container. 4- ? not a vb6 feature.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
||||
|
||||
|
you may get more replies in the .NET Forum in case you have .NET specific
questions, and sounds like at least part of your questions are related to .NET only. also, is it for Windows application or Web (ASP.NET) application? |
|
#4
|
||||
|
||||
|
Quote:
VB .NET is a lot more like the lower-level languages in the way that the code is structured; you actually have to declare everything that you use.... that's what kind of put me off learning it ![]() EDIT: As for your first Q (about the 2 second delay), just use the Sleep() API. Its one of the easier Windows APIs... Code:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Private Sub BigAssButton_Click() sleep 2000 End Sub
__________________
LozWare Website Directory Whooo! Free submissions, no recip needed. I'm a nice guy
Last edited by LozWare : September 7th, 2006 at 05:58 PM. |
|
#5
|
||||
|
||||
|
what's wrong in declaring everything?? that's essential part of programming IMO..
|
|
#6
|
||||
|
||||
|
I found it to be quite a big change after using VB for so many years (where all you have to do is declare your variables)
I'm going to be learning C++ at uni when I go (8 days time), so maybe after I've got good at that then I will take another look at VB .NET. I guess that I'll have no choice when my computer finally crashes anyway; my copy of VB6 is all scratched up - and Microsoft don’t sell it anymore. The only copies that you can find are on eBay and they cost like £300. VB.NET is only about £70 ![]() Last edited by LozWare : September 10th, 2006 at 04:33 AM. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Some simple vb questions |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|