|
Open the port like you were using a file. Use the name "PAR1". If you want to do serial port access then use "COM1". The number represents the number of the port that you are trying to open.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hi
Sorry for using CAPITALS yesterday but I have a habit of doing using capitals.
I am using as OS is ME and VB version 6.
My applications runs well on Windows 98/Me and not on NT and 2000. what happens in windows NT and 2000 is that my software when clicked does nothing doesn’t starts no error codes nothing.
Anyways what my program does it in the starting it checks for the CD-ROM drive with a volume name MARITIMELAW.
How do I do it is by following command
Dim kapil, fs, d, dc, s, n, check, dl
check = 1
Set fs = CreateObject("Scripting.FileSystemObject")
Set kapil = fs.drives
For Each d In kapil
s = s & d.driveletter & " - "
If d.DriveType = 4 Then
If d.IsReady = "True" Then
If d.volumename = "MARITIMELAW" Then
n = d.volumename
check = 2
form1.dl = d.driveletter + ":\"
End If
End If
End If
s = s & n & vbCrLf
Next
If check = 1 Then
Form10.Show ‘exit application form
End If
End Sub
If the CD with the volume name is not found my program terminates
If found it makes stores the drive letter with “:\” added to it in a text field i.e. form1.dl
I need that for my further program reference
I have applied a software lock on the program called ccontrol
I will also let you know the dll files I am supplying with the software to make it run are
ASYCFILT.DLL support file
CCCHANGE.EXE lock file
CCLOOK.EXE lock file
CCMOVE.EXE lock file
CCONTROL.SYS lock file
COMCAT.DLL support file
COMDLG32.OCX support file
ML.BAT lock file
ML.EXE application file
MLI.CCC lock file
MSSTDFMT.DLL support file
MSVBVM60.DLL support file
OLEAUT32.DLL support file
OLEPRO32.DLL support file
PROJECT1.DDF support file
README.TXT Readme file
SETUP.EXE Setup application file
SETUP.LST setup file
SETUP.TXT Setup help file
SETUP1.EXE
ST6UNST.EXE
STDOLE2.TLB
ULOCK.BAT lock file
UTIL.EXE lock file
VB6STKIT.DLL support file
After the above written code there is a second step which doesn’t involve anything much except a form display and then clicking on the image to move forward.
In the third form
What I am doing is displaying a image in a picture box and scrolling it with a vertical scroll bar
What I use maximum is loadpicture
And scroll commands that is all.
|
|
|
|
|
Firstly, stop shouting. Typing everything in CAPITALS is very bad manners and most people will likely ignore your post.
Secondly, what error messages are you getting. A VB program should be able to run unmodified on NT/2000 if it runs on 9x machines. You must be using some code that isn't supported on NT/2000 or you are missing some dlls. Or some ActiveX controls haven't been registered.
You'll need to supply more information about your project for us to be able to help.
Michael
|
|
|
|
|
Without any specifics, your question is difficult to answer...
Did you use an installation package to deploy your app to the NT/2000 machines? If not, those machines probably don't have the VB runtime dll's installed...
Do not go where the path may lead, go instead where there is no path and leave a trail.
- Ralph Waldo Emerson
Paul Lyons
|
|
|
|
|
Hi
I have a little problem with VB. Im using a dll in the project and it works fine until i close the application then i get a "CoInitialize has not been called" error?? Why? and its only in debug mode??
/H
|
|
|
|
|
What DLL are you using? Is the error message a VB generated error or is the DLL generating it? You'll need to post some code or more details for us to assist.
Michael
|
|
|
|
|
The error message is a VB generated error message and the dll im using is a C++ dll (using _stdcall and its NOT a COM dll). The strange thing is that the error message don't appear every time and it never appear if i make a EXE file of the vb project. My source cod:
Vb:
Public Declare Function Data Lib "E:\C++ Program\Test\Debug\Test.dll" _
Alias "_CreateData@4" (ByVal pDb As Long) As Long
Dim Temp As Long
Temp = Data(10)
C++:
.h
extern "C"
{
__declspec(dllexport) long PASCAL CreateData (long iDatabaseId);
}
.cpp
#include "Test.h"
long PASCAL CreateData(long iDatabaseId)
{
return iDatabaseId*10;
}
I would bee so happy if you could help me
/Z
|
|
|
|
|
hi all,
i am writing a program to capture image from quickcam start from video for window. i have been already able to read a frame of data by capSetCallbackOnFrame(). however, i don't know how to add the bitmap header and other neccessaries to make standard bitmap file.
would anyone help me?
thanks,
jim
|
|
|
|
|
You will need to get the type definitions that are defined in the Windows API from the APIViewer program and include them in your program.
You will Need the BITMAPINFO structure. And the BITMAPINFOHEADER. Look at MSDN to see how to fill both of these structures.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I am working on a project where I need to Launch another program with command Line parameter in VB. The program is MTRUN.EXE from Rational Visual Test. My code works fine on NT and 98 and Win2000 (no Service pack) but it fails on Win 2000 SP1 and SP2 and Win2000 Server.
It will actually launch MTRUN.EXE but then MTRUN.EXE will prematurely die/exit. If I put a break point at the line that will call "CreateProcess" or SHELL, and then use F8, it will work fine...launch MTRUN.EXE and Continue execution as required.
Please what will I do to make it work fine at run mode on Win2000
Bob
|
|
|
|
|
Can you post the code?
Or email it to me and i'll try to help - o_be@hotmail.com
|
|
|
|
|
Here is a SQL string I am execute with an ADO connecion object.
objAdoCon.Execute "insert into MEQUERY " _
& "(MESystemListCode, MEQueryName , MESystemListDesc, MESelect, MEFrom, MEWhere, MEDefaultOrder, MEStoreProc) " _
& "values " _
& "(" & cboSystem.ItemData(cboSystem.ListIndex) & ", " _
& "'Profile', " _
& "'" & Trim$(txtQuery.Text) & "', " _
& "'" & Trim$(txtSelect.Text) & "', " _
& "'" & Trim$(txtFrom.Text) & "', " _
& "'" & Trim$(txtWhere.Text) & "', '" _
& Trim$(txtOrderBy.Text) & "', '" _
& Trim$(txtStoredProc.Text) & "')"
Here is the result of this query..
objADOCon.Execute "insert into MEQUERY (MESystemListCode, MEQueryName , " _
& "SystemListDesc, MESelect, MEFrom, MEWhere, MEDefaultOrder, " _
& "MEStoreProc) " _
& "values " _
& "(3, 'Profile', 'Merchant Search', 'merchant', 'merchants', " _
& "'merchant like '%Bob%'', 'merchant', '')
give this error:
Error #: -2147217900
Error Desc: Line 1: Incorrect syntax near '%Bob%'.
Error Source: Microsoft OLE DB Provider for SQL Server
How can I execute this proc with out having the '' in the query...
Latter
Confusios say "Man who run in front of car get tired, Man who run behind car get exhausted."
|
|
|
|
|
'merchant like '%Bob'' needs to look like this:
'merchange like ''%Bob'''
Basically you want to check all your textboxes for single quotes and replace any single quotes with two single quotes.
You could also try making this a stored procedure and using an ADO command object, it *might* make things easier but I'm not guaranteeing anything. Good luck!
Andy Gaskell, MCSD
|
|
|
|
|
Thanks Andy,
Worked great.
latter
Confusios say "Man who run in front of car get tired, Man who run behind car get exhausted."
|
|
|
|
|
I am trying to use Vb6 to count the number of records of a particular set of fields in Access.So i did the following:-
1) Inserted MSFlexGrid on the form.
2) added a data control to the same form.
3) Set the "DatabaseName" property of the Data control to the name of the database(in Access) from which i'm trying to count the records.
4) Set the "RecordSource" property of the Data control to the name of the table(in the database) from which i'm trying to count the records.
5)Hook up MSFlexGrid control to the data control.
6) Write a SQL statement to select the particular fields I'm Looking for.
Say for instance a table that has fields FIELD1, FIELD2 and i want to list only FIELD1 at "run time".I write the appropriate SQL Statements.
But when i run the code The MSFlexGrid shows all the Fields and not just the field i'm looking for.
SO WHAT DO I DO TO LIST ONLY THE FIELD THAT I AM LOOKING FOR AT RUN TIME IN vb6????
Thanks a lot
|
|
|
|
|
Change the recordsource during runtime.
you might have to modify your datacontrol to use sql statement instead of a table.
Confusios say "Man who run in front of car get tired, Man who run behind car get exhausted."
|
|
|
|
|
Hi,
I have some weird problem and being new to VB I have no idea why it does not work. I created a splash form with a login button. With a successful login the code goes frmSplash.Hide frmMain.Show
This works, now I am on frmMain.Show.
On this form I have 3 command buttons. All I want to do after any command button hit is do frmMain.Hide then i.e. frmAdmin.Show.
Well .Show is not available only ShowWhatsThis? I do not get the frmAdmin to display and I have no clue as to why.
What did I miss?
Thanks
samantha
|
|
|
|
|
I think you'll have to post some code as I can't see how you can be getting the .ShowWhatsThis and not .Show for a Form. How did you create the frmAdmin, using the wizard? If you used the wizard what type of Form did you create?
Michael
|
|
|
|
|
BOYAKASSHAA!!
I'ee agree with Micheal...
Need more input
Confusios say "Man who run in front of car get tired, Man who run behind car get exhausted."
|
|
|
|
|
Make 3 forms.
1 called frmSplash
1 called frmMain
1 called frmAdmin
--- frmSplash code ---
Option Explicit
Private Sub Command1_Click()
If Text1.Text = "username" And Text2.Text = "password" Then
frmMain.Show
Unload Me
Exit Sub
Else
GoTo Wrong
End If
Wrong:
If MsgBox("You have entered a wrong username or password.", vbRetryCancel, "My Project") = vbCancel Then
Unload frmMain
Unload frmAdmin
Unload frmSplash
Else
Text1.Text = ""
Text2.Text = ""
End If
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
End Sub
--- frmMain code ---
Option Explicit
Private Sub Command1_Click()
Load frmAdmin
frmAdmin.Show
Unload Me
End Sub
Thankz, Drew
|
|
|
|
|
The reason ".ShowWhatsThis" and no ".Show" happened because you mustn't of called the "form" function. ie: Command1 function has no argument of .Show, closest match is .ShowWhatsThis
Thankz, Drew
|
|
|
|
|
Has anyone got a simple implementation for this :
I'm working on a web site for a client who has some existing data in x999y format where x and y are alpha and 999 is numeric. Each part of the format varies in length.
I need to be able to sort in the proper order you would expect so that S11B comes after S1VZ (i.e, 11 > 1).
Since this has to run on an ASP page either VBScript or JavaScript would be good (if you can do it in SQL that would be excellent as the DB could do all the work!).
I haven't thought of a fast solution - I've had a looooog week and can't think anymore ....
Thanks in advance, jlb.
|
|
|
|
|
You can do it within the database, in which you may wish to include in your Select statement the same values but put together in another order(i.e. left(some_field, 1) + right(some_field, 1) + substring(some_field, 2, 2)). You would not populate that field, however when the user select the "some_field" column to sort by, you can sort your other column instead. Hope this helps some.
Nick Parker
|
|
|
|
|
Hi
Can anyone tell me how to create a multilingual application in VB?
S.S. Ahmed
ss_ahmed1@hotmail.com
http://glowbutton.faithweb.com
|
|
|
|
|