|
There is no way to verify if a URL is good unless you try it. Sure, you can resolve the server name, but only that server can tell you if the rest of the URL is valid or not, and the only way to do that is to try it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
( please how to update SQL database from MS Access databse from local database to web server SQL database. speed is important.;);)
|
|
|
|
|
The question, as you've asked it, is unanswerable. What are you trying to do? Update the database how? Change tables? How does Access fit into this problem? How does the website fit into this? Is the SQL Server only accessible through the website?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
thaks for your concern..
i have an MS Access database application, include (schools.mdb)file that has a many tables, and i have a SQL database on my site, so, i developed the same application on the web based-on SQL database, i want upload or update the SQL data from the local MS Access database when i setup the web application, and update data after changing local data daily or weekly any way..
thanks
Joe
|
|
|
|
|
I'm trying to write my own custom auto installer that will setup up PCs with the same program installation, drives, users, settings, etc. I have written out send key functions for each installation and am using Shell to start the actual setup.exe file.
I'm starting the setup.exe file first, and then using a second thread to start the send keys. As it is right now, all the installation programs want to start at the same time. How can I get them to wait for the first one to end before continuing and still allow the program to move to the thread function so that it can install?
I'm using VB.net 2003.
Thank you.
|
|
|
|
|
You don't get these things to wait for each other. You have to launch one, wait for it in your code, control it, wait for it to finish, launch another,...
Every newbie thinks it should be easy to control another application. Actually, it's one of the hardest and most tedious things to do.
How it's normally done, is batch files are written to launch these installers, usually using START command. Open a CMD and type START /? for parameters, like /WAIT. Also, the installers are launched with command line parameters to automate their installation, probably using installation scripts, if supported. You'll have to get with the manufacturer of the installation to find out what those parameters and scripts might be.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello,
Please how do I set papersize in my vb I did it as below but did not work.
<br />
printer.scalemode=vbinches<br />
printer.papersize= 8.5,5.5 '8.5 is paperwidth 5.5 is paperheight<br />
printer.copies=3<br />
printer.print text1.text<br />
printer.endDoc<br />
Kindly guide me on how to specify my papersize in vb such that it will be recognized by any printer.
Finally I want to print on continuous sheet my specified number of copies.
Thank you.
-- modified at 16:11 Friday 13th October, 2006
Fikunmi Feyijin
Hicad Systems
Nigeria
|
|
|
|
|
Next time, specify what the error is and on what line you're getting it.
I'm assuming you're using VB6. You can't set the PaperSize with two numbers like this. It only accepts a single number.
' vbPRPSUser is a constant that represents the number 256.
Printer.PaperSize = vbPRPSUser
' Height and Width are specified in twips. There are approximatly
' 1440 twips per inch. So, for an 8.5" by 8.5" inch page:
Printer.Height = (8.5 * 1440)
Printer.Width = (8.5 * 1440)
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave thank you.
Is printer.height same thing as paper height.
Also will the suggested coding do for continuous printing.
That is if I putan a4 sheet in the printer will it print 2 copies on the paper that is double the size specified in the printer.
Fikunmi Feyijin
Hicad Systems
Nigeria
|
|
|
|
|
OK. I haven't touched VB6 in about 6 years and I haven't written an application for continous forms in twice that time. How about checking out the documentation[^] on the Printer object and looking up the properties yourself? How about trying it to see what happens?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
How can i retrieve the name of an active download in IE?
And how can i abort it? Can anyone help me out?
--Zaegra--
|
|
|
|
|
You can't. The download window is a seperate instance of IE and isn't exposed as a COM object.
Why would you want to abort a file download anyway? The best method is stopping it is to not let it happen in the first place!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
:-DOk, but how can i stop the download before its downloading then? And how can i retrieve the name of the download?
--Zaegra--
|
|
|
|
|
Write your own proxy server. Then configure IE to use that server and you'll get every request with all the details you're looking for. Since the proxy is the "man in the middle" making the requests for IE, you have complete control over which requests get filled and which don't.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am developing an app in VS2005. I need to put in a reference to an existing dll. The issue is, that dll may or may not exist on the machines that the app gets installed on. The app will have branching code depending on if the machine uses the dll or not, but I am unsure if this will work. I have read that the CLR will not invoke the dll unless it is called. So if I have the dll on my dev machine, have it referenced in the project, have a Try / Catch block around the call to NEW of the dll, but have the dll dimensioned in the class, install the app on another machine without the dll, will it blow up on me? Or will the Try / Catch block stop it from blowing up?
Simple code Example:
Public Class myClass
Private dll as dllMayNotExist
Public Function Execute()
Try
dll = New dllMayNotExist
Catch
'do nothing here, if dll does not exist, it is not needed
End Try
End Function
|
|
|
|
|
That won't work. The .DLL has to be there otherwise your app will fail when the JIT compiler goes to compile the METHOD that tried to call that library. Using a Try/Catch block will have no effect because that method that contains it will never run. All external references are resolved upon JIT compile, not at execution of a class' constructor.
You'll have to check for the existance of the .DLL at the start of your code and set a flag as to whether or not it's there. Then, you'll need to write a wrapper around your two methods, one that uses the .DLL and one that doesn't, plus a dispatcher method to choose between the two methods. The Dispatcher will be the function that your outside call actually calls. The dispatcher will check this flag to see if the .DLL exists, then pass the parameters to the version that's appropriate and pass any return values back to the caller.
Caller
^ |
| |
| v
.DLL flag------>Dispatcher
^ | ^ |
| | | |
| v | v
Method Method
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
So the dll will not be declared in one function, and declared in the other?
|
|
|
|
|
Yes.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
how to use scanners utility in VB
|
|
|
|
|
That's nowhere near enough information to tell you anything useful.
What are you trying to do? What scanner utility? Are you talking about a flatbed scanner? Fingerprinter scanner? Document scanner??? What?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi,
USING VB 6.0
I have several comboboxes named cboField(1),cboField(2),cboField(3) etc. in other words they have been created this way (indexed) for the purpose of using loops whenever necessary.
Now when I use
Private Sub cboField_keyPress(Index as Integer, Key ascii As Integer)
to produce some action on the comboboxes I only get a global action (not individual to each combobox) How can I get this as I would like to produce different actions on different comboxes on keypress on the respective fields
I tried...
Private Sub cboField(2)_keyPress(Index as Integer, Key ascii As Integer) for example gives me an EXPECTED IDENTIFIER error
Thanks for your help
Augusto
Augusto
|
|
|
|
|
It's been about 6 years since I've touched VB6... but what's that Index parameter in your function header for? I'm will to bet that's the index of the control that fired the event.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Dave,
I guess you mean this..
Private Sub cboField_KeyPress(Index As Integer, KeyAscii As Integer)
End Sub
That parameter I did not choose. VB puts it by default when I choose cboField and keypress from the menu. And it works fine only that it is not specific to any combobox but to all of them...
As I said I tried substituting cboField_KeyPress by
Private Sub cboField(1)_KeyPress(Index As Integer, KeyAscii As Integer)
Private Sub cboField(2)_KeyPress(Index As Integer, KeyAscii As Integer)
Private Sub cboField(3_)_KeyPress(Index As Integer, KeyAscii As Integer)
etc.
but then I get the said compilation error
Please suggest something..
Thanks
Augusto
|
|
|
|
|
OK, let's try this again... HAVE YOU LOOKED AT THE VALUE OF THE INDEX PARAMETER WHEN A KEY IS PRESSED??? This should tell you which ComboBox raised the event.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave, I think you have not understood my problem... If I writte;
Private Sub cboField_KeyPress(Index As Integer, KeyAscii As Integer)<br />
MsgBox ("Please use the drop down buttons and select an item from the list")<br />
End sub
everything functions and I get the message poped up as soon as I press a key IN ANY OF THE COMBOBOXES i.e cboField(1),cboField(2),cboField(3),cboField(4) etc.
My problem is that I want to have a specific message for each one of this combo SEPARATELY
How do I do that???
Augusto
|
|
|
|