|
Take a look in the help for addhandler. This should do the trick for you.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Events are handled in a good new way in .NET. When you want to listen to an event, you do this:
button.Click += new System.EventHandler(buttonClick)
where button.Click is the event, and buttonClick is a method with the correct arguments. When handling multiple controls' events, use the "Sender As Object" argument of the method you assigned to the event to find out which object fired the event.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
How to check if file existe in VB?
Thanks for any reply.
|
|
|
|
|
Hi,
Just use "Dir" command in VB to check it's existance.
Say,
if Dir("filename") then
'' Task to do if file exists
end if
It will retrun True if exists or False if file is not there on the mentioned path. You can use other parameters like vbDirectory, vbSystemFile etc. to check file or folder property.
Best Regards,
Vilas Shewale
|
|
|
|
|
Thanks so much for your reply.
|
|
|
|
|
Here is another way.
If IO.File.Exits("FileName") Then
'Do something
End If
|
|
|
|
|
Anybody had this problem before. I am trying to download a webpage using the URLDownloadToFileA API decalred in urlmon from VB .net and it is not downloading and the returns long value. I tried to trnslate the error code "underlaying portocol is unknown"
Declare Function URLDownloadToFile Lib "urlmon" Alias _
"URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal _
szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
src as string, dest as string
lResult as long
src = "http:\\www.msn.com"
dest = "c:\images\x.html"
lResult = URLDownloadToFile(0, src, dest, 0, 0)
but the same code works very well in VB 6.0. I can download pages with out a problem.
any help appricated.
-Murali
|
|
|
|
|
How about using the .NET framework WebRequest and Stream to read the data from the URL, then use a FileStream to write it out to a file?
There's and example of the read step on GotDotNet, http://samples.gotdotnet.com/quickstart/howto/doc/WebRequests/clientGET.aspx
And as for writing it to a file, the .NET library sample:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemIOFileStreamClassTopic.asp
|
|
|
|
|
Hello all,
What are the date functions in VBA? I have a string in my Access 2000 code, and I'd like it to hold today's date. What do I call to get the date?
Dim theDate as string
theDate = date()
I know that is wrong, but what do I do?
Thanks
Nick
|
|
|
|
|
In VBA/MS Access Macro code, something like this should place today's date into a string:
Dim myDate As Date
Dim myDateString As String
myDate = Date
myDateString = CStr(myDate)
MsgBox myDateString
Hope that helps.
|
|
|
|
|
I have a Problem. I want get picture from a WebCam in a picturebox in VB.Net from a local computer. If anyone knows please write me at taj_saini@hotmail.com. Thanks
|
|
|
|
|
How does the WebCam stream data, via HTTP (or ...)? If so, suggest checking out the System.Net and System.IO classes & interfaces in the .NET framework.
|
|
|
|
|
Hello all,
I have what I hope is a quick question. In my Access 2000 database I have a Table called Candidates. In this table there is a Field called LName. How can I get the data in this field without opening the table?
This what I am trying to do. In the Main Form of my database, you can eneter a Last Name and hit the Command button and it will open the Candidate Table to the first occurence of the person with that last name. I'd like to write an autofill ability in the Main Form. This way when I type A into the space where you type in the last name, it will automatically fill the text to Aardvark for instance. And then if I hit another letter, like b and the string in there is "ab" it would return the first last name with Ab, for instance Aba.
Now, I know the logic behind how to do what I want, but I need the syntax.
How can I make a string equal the text in the last name field?
Would it be:
Dim lastName as String
lastName = [Candidate].[LName] ??
Any help you can offer me would be great.
And one more quick question.
Is there a way to access the characters in a string?
Can I type lastName[1] and get the first letter of the string?
Again thank you very much.
Nick
|
|
|
|
|
Anonymous wrote:
How can I get the data in this field without opening the table?
Aaaaaa you can't. You have to at least open it to run a querry on it and get the data out.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
My boss asked me... 'can u try VB projects'?? I am into web development (ASP and stuffs).
I said.. YES... and now he says he will arrange for a small interview and he can make me take the project. I dunno what he/they are going to ask. So... VB gurus... tell me what you asked to the new candidates for a interview based on VB? And what answers do you expect from them!@>!
I was born intelligent Education ruined me!.
|
|
|
|
|
Hi,
Try these links.
1> http://www.mathtools.net/Learning/FAQs/Visual_Basic/
2> http://visualbasic.about.com/cs/visualbasicfaq/
3> http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/
If this not sufficient for you. Query google with "Visual Basic questins and answers" or "Visual Basic for beginners"
Best Regards,
Vilas Shewale
|
|
|
|
|
Thanks
I was born intelligent Education ruined me!.
|
|
|
|
|
Can someone give a brief explanation / website links that explain the windows message queue and how it works. vb.net examples would be helpfull. Thanks in advance.
Jim
|
|
|
|
|
Hi,
Try following links. I hope you get want you want.
1> http://www.codeproject.com/dialog/queue.asp
2> http://www.pcprogramming.com/DDNUG/VCSHARP/RemotingNotes.htm
3> http://www.openip.org/oa/notes_gem.txt etc.
You can query in google with "Windows Message Queue". You will find number of sites with brief explanation.
Best Regards,
Vilas Shewale
|
|
|
|
|
Thanks Vilas
Jim
|
|
|
|
|
Hello,
I would like to ask a very simple question. How can I open three or so programs using a script. I would like to pause about 30 seconds between them also. I talked to some friends at work and they said to use a vbscript, which is completely forien to me. Any help would be nice. Thanks.
Shades
|
|
|
|
|
Use the ShellExecute and a Timer to control how often the functions are called. To call the ShellExecute API add this to a module:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hWnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
-Nick Parker
|
|
|
|
|
Using VBScript and the Windows Scripting Host, it is possible to control a variety of things through "animation" of standard Windows applications. In your case, you could do something like the following:
' myScript.vbs --
Dim wshell
Set wshell = WScript.CreateObject("WSCript.shell")
wshell.run "calc.exe"
WScript.Sleep 30000
wshell.run "notepad.exe"
Enter the commands into a file using Notepad or your favorite editor and save it with a file extension of ".VBS". Double-click on the VBS file to execute the script. On 99% of desktops equipped with IE5.5+, this will function correctly.
For more information, see MSDN > Platform SDK > Tools and Scripting > Windows Script Host.
|
|
|
|
|
Hi All,
I am a new user to the Business Objects application. I have previously utilized VBA (within Access and Excel) for about a year. Basically, I'm looking for some information regarding integrating VBA into Business Objects. Some tutorials would be great, especially on the syntax aspects of VBA as it pertains to Business Objects.
Any information on the above topics would be very helpful.
Thanks for your time,
Nick
|
|
|
|
|
Hello everybody. I need a little urgent help, i pressed any strange and wronge key combination while triying to delete selected text, and since then (i believe) the text came wrapped and now the horizontal bar has disappeared so i'm limited to the window width for html code editing (ASP.Net projects, in all html-codeedit forms). thanks
|
|
|
|