Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all 21394 articles
Browse latest View live

[RESOLVED] Date difference in weeks and days?

$
0
0
Hello Vbforums community.
I need an expert in date functions to help me calculate the the number of weeks and days from a datepicker.
If I input this date 23/06/2018 in the datepicker, I should get 4 weeks and and 2 days.
Thank you in advance

Vb6 – late-binding with COM objects(flexgrid) 2 times slower

$
0
0
Code:

Public Function gridloop(MSFG1 As Object) As Long
                  For  i= 0 To MSFG1.rows - 1
                            A = MSFG1.TextMatrix(i,1)
                    Next
End Function

The above code is 2 times slower than below

Code:

Public Function gridloop(MSFG1 As MSHFlexGrid) As Long
Public Function gridloop(MSFG1 As MSFlexGrid) As Long

Any solution to speed-up?

learning vbFCGI

$
0
0
Hi.
I am learning the use of VBFCGI.
In the VbFcgiApp demo application in the ProcessRequest routine there is this piece of code
Code:

     
' *** JSON RETRIEVE
      l_ContentType = po_Request.Fcgi.Params.ValueByEnum(stdparam_ContentType)
      If Not stringIsEmptyOrWhitespaceOnly(l_ContentType) Then
        If LCase$(Split(l_ContentType, ";")(0)) = "application/json" Then
            ' JSON body content received
            Set lo_Json = po_Response.Builders.Builder(builder_Json)
            ' initializes the json object with the contents of the request
            lo_Json.Initialize po_Request.Fcgi.Stdin.Content
            Set lo_IBuilder = lo_Json
             
            lo_Json.Finish
             
            GoTo Cleanup
        End If
      End If


What this object does:
Code:

Dim lo_IBuilder As VbFcgiLib.IBuilder
and
Code:

Set lo_IBuilder = lo_Json
Many thanks

multi loop file wnot work

$
0
0
hello members

my file is not working check its what wrong

Number = 1
While Number <= 12
filesave = Text5.Text + "_" + Number
Print filesave
Number = Number + 1
Wend

[RESOLVED] Sending a KeyDown code to an external application

$
0
0
How do I send a keydown code to an external application which I shelled and I only know the exe name.

For example: My app shells ShowTime.exe to play movies and I need to send to ShowTime certain keydown codes while ShowTime is running like the space bar code to tell ShowTime to pause the movie

Where is *.exe file from Full Compile?

$
0
0
Using VB5, under "Run" on the menu, I choose "Start with Full Compile", expecting to produce an executable (*.exe) file—but I can't find that product. Where on my machine is it deposited?

VB6 CRC calculation wrong output

$
0
0
I am trying to figure out a CRC check for a serial controlled device. I have an example, when i send this example to the device, it responds correctly.

This is the complete serial string wich the device responds to:

Code:

\x00\x17\x3d\x30\x32\x32\x30\x39\x39\x30\x30\x30\x30\x30\x30\x30\x30\x30\x37\x34\x30\x30\x30\x30\x30\x01\x28
(The last 2 bytes (\x01\x28) are the CRC outcomes).

Code:

This is my code:

Dim Send As String
Dim CRC1 As String
Dim CRC2 As String
Dim TEMP As String

Private Sub Command1_Click()

Send = &H0 & &H17 & "=" & "022" & "099" & "00" & "00" & "0000074" & "00000"

CRC1 = &H0
CRC2 = &H0
TEMP = &H0

For i = 1 To Len(Send)
    TEMP = CRC1
    CRC1 = CRC2 Xor Asc(Mid$(Send, i, 1))
    CRC2 = TEMP

Next i

Text1.Text = "CRC1= " & CRC1 & " / CRC2= " & CRC2

End Sub

The output should be: CRC1 = 1 (decimal) and CRC2 = 40 (decimal) But i am getting 51/60.

I think is has somnething to do with datatypes.

This is the original CRC formule from the device:

Code:

Set <CRC1> and <CRC2> to zero.
For every <CHAR> in <MSG> do
<TEMP> = <CRC1>
<CRC1> = <CRC2> XOR <CHAR>
<CRC2> = <TEMP>

Thanks in advance!

how compare and use the last value?

$
0
0
i have a variable NewPosition3D(0) it's Position3D type.
when the NewPosition3D(0).z is more big than camera.z, the NewPosition3D(0) must be the last position... so i did:
Code:

If ((NewPosition3D(0).Z) > Camera1.Position.Z) Then 'testing if the position is inside the camera
        If (blFixedPoint = True) Then blFixedPoint = False
        Me.Caption = "inside " & CStr(NewPosition3D(0).Z)
    Else 'if ins't, so save the last position for be used while it's outside
        If (blFixedPoint = False) Then
            FixedPoint = NewPosition3D(0)
            blFixedPoint = True
        Else
            NewPosition3D(0) = FixedPoint
        End If
       
        Me.Caption = "outside" & CStr(NewPosition3D(0).Z)
        If (((NewPosition3D(0).Z + NewPosition3D(1).Z) < Camera1.Position.Z) Or (NewPosition3D(0).Z + NewPosition3D(1).Z) = 0) Then
            Exit Sub
        End If
       
    End If

seems that the last position or isn't saved or is always save... the line is drawed entirely, instead only from camera1.z...
can anyone explain to me what i'm doing wrong with these simple 'IF'?

Inno Setup Script (VB6 + MySQL Installation)..... Help !!!

$
0
0
Dear gurus,

I already tried this script for almost one week, and still can't find the best to resolve this.
I am making installation package application VB6 along with MySQL installation (service, odbc, etc)

Code:


; Install Script for icDagangv1
;  [Inno Setup Toolbar Advanced - Script Wizard]
;
; Generated by the 'Inno Setup Toolbar Advanced for Visual Basic 6.0'
; Written and Programmed by Brian Haase and Martin Rizal
;
; Generated for Inno Setup Compiler, Version 4+
;
 
[Setup]
AppName=Sistem POS icDagang
AppVerName=Sistem Pos icDagang
AppPublisher=I-CON
DefaultDirName={pf}\icDagangv1
DefaultGroupName=icDagangv1
Compression=lzma
SolidCompression=yes
PrivilegesRequired=admin
WizardImageFile=C:\Program Files (x86)\Inno Setup 6\WizModernImage-IS.bmp
WizardSmallImageFile=C:\Program Files (x86)\Inno Setup 6\WizModernSmallImage-IS.bmp
 
[Tasks]
;Installation Task
Name: vb6; Description: Visual Basic 6.0 Core Runtime Library; GroupDescription: Install Component(s):; Check: NeedVB('6.0.98.15');
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: installmysql; Description: "Install MySQL"; GroupDescription: "Installing MySQL 8.0"; Flags: checkedonce
 
[Files]
;Program files for deployment


;Executable File or Main Component
Source: "icDagangv1.exe"; DestDir: {app}; Flags: ignoreversion 32bit

;Visual Basic 6.0 Runtime Files
Source: MSVCRT40.DLL; DestDir: {sys}; Flags: onlyifdoesntexist uninsneveruninstall sharedfile 32bit allowunsafefiles; Tasks: vb6
Source: OLEPRO32.DLL; DestDir: {sys}; Flags: restartreplace uninsneveruninstall sharedfile regserver noregerror 32bit allowunsafefiles; Tasks: vb6
Source: COMCAT.DLL; DestDir: {sys}; Flags: restartreplace uninsneveruninstall sharedfile regserver noregerror 32bit allowunsafefiles; Tasks: vb6
Source: ASYCFILT.DLL; DestDir: {sys}; Flags: restartreplace uninsneveruninstall sharedfile 32bit allowunsafefiles; Tasks: vb6
Source: OLEAUT32.DLL; DestDir: {sys}; Flags: restartreplace uninsneveruninstall sharedfile regserver noregerror 32bit allowunsafefiles; Tasks: vb6
Source: STDOLE2.TLB; DestDir: {sys}; Flags: restartreplace uninsneveruninstall sharedfile 32bit allowunsafefiles; Tasks: vb6
Source: msvbvm60.dll; DestDir: {sys}; Flags: restartreplace uninsneveruninstall sharedfile regserver noregerror 32bit allowunsafefiles; Tasks: vb6

;daftar file MySQL
Source: mySQL8\bin\*; DestDir: {app}\mysql\bin; Flags: ignoreversion; Tasks: installmysql
Source: mySQL8\Docs\*; DestDir: {app}\mysql\Docs; Flags: ignoreversion; Tasks: installmysql
Source: mySQL8\lib\*; DestDir: {app}\mysql\lib; Flags: ignoreversion recursesubdirs; Tasks: installmysql
Source: mySQL8\include\*; DestDir: {app}\mysql\include; Flags: ignoreversion recursesubdirs; Tasks: installmysql
Source: mySQL8\share\*; DestDir: {app}\mysql\share; Flags: ignoreversion recursesubdirs; Tasks: installmysql
Source: mySQL8\etc\*; DestDir: {app}\mysql\etc; Flags: ignoreversion recursesubdirs uninsneveruninstall; Tasks: installmysql
Source: mySQL8\*; DestDir: {app}\mysql; Flags: ignoreversion; Tasks: installmysql
 
;daftar file MySQL ODBC 8.0
Source: "C:\Program Files (x86)\MySQL\Connector ODBC 8.0\myodbc8a.dll"; DestDir: {sys}; Flags: onlyifdoesntexist
Source: "C:\Program Files (x86)\MySQL\Connector ODBC 8.0\myodbc8s.dll"; DestDir: {sys}; Flags: onlyifdoesntexist
Source: "C:\Program Files (x86)\MySQL\Connector ODBC 8.0\myodbc8w.dll"; DestDir: {sys}; Flags: onlyifdoesntexist
Source: "C:\Program Files (x86)\MySQL\Connector ODBC 8.0\myodbc8a.lib"; DestDir: {sys}; Flags: onlyifdoesntexist
Source: "C:\Program Files (x86)\MySQL\Connector ODBC 8.0\myodbc8s.lib"; DestDir: {sys}; Flags: onlyifdoesntexist
Source: "C:\Program Files (x86)\MySQL\Connector ODBC 8.0\myodbc8w.lib"; DestDir: {sys}; Flags: onlyifdoesntexist
Source: "C:\Program Files (x86)\MySQL\Connector ODBC 8.0\myodbc8a.pdb"; DestDir: {sys}; Flags: onlyifdoesntexist
Source: "C:\Program Files (x86)\MySQL\Connector ODBC 8.0\myodbc8s.pdb"; DestDir: {sys}; Flags: onlyifdoesntexist
Source: "C:\Program Files (x86)\MySQL\Connector ODBC 8.0\myodbc8w.pdb"; DestDir: {sys}; Flags: onlyifdoesntexist
Source: "C:\Program Files (x86)\MySQL\Connector ODBC 8.0\myodbc-installer.exe"; DestDir: {sys}; Flags: onlyifdoesntexist


;Dependencies and Files
Source: "arpro2.dll"; DestDir: {cf}\Data Dynamics\ActiveReports Pro; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{cf}\Data Dynamics\ActiveReports Pro\arpro2.dll'));
Source: "MSBIND.DLL"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\MSBIND.DLL'));
Source: "MSStdFmt.Dll"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\MSStdFmt.Dll'));
Source: "ARVIEW2.OCX"; DestDir: {cf}\Data Dynamics\ActiveReports Pro; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{cf}\Data Dynamics\ActiveReports Pro\ARVIEW2.OCX'));
Source: "ardespro2.dll"; DestDir: {cf}\Data Dynamics\ActiveReports Pro; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{cf}\Data Dynamics\ActiveReports Pro\ardespro2.dll'));
Source: "exclexpt.dll"; DestDir: {cf}\Data Dynamics\ActiveReports Pro; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{cf}\Data Dynamics\ActiveReports Pro\exclexpt.dll'));
Source: "htmlexpt.dll"; DestDir: {cf}\Data Dynamics\ActiveReports Pro; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{cf}\Data Dynamics\ActiveReports Pro\htmlexpt.dll'));
Source: "pdfexpt.dll"; DestDir: {cf}\Data Dynamics\ActiveReports Pro; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{cf}\Data Dynamics\ActiveReports Pro\pdfexpt.dll'));
Source: "rtfexpt.dll"; DestDir: {cf}\Data Dynamics\ActiveReports Pro; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{cf}\Data Dynamics\ActiveReports Pro\rtfexpt.dll'));
Source: "textexpt.dll"; DestDir: {cf}\Data Dynamics\ActiveReports Pro; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{cf}\Data Dynamics\ActiveReports Pro\textexpt.dll'));
Source: "tiffexpt.dll"; DestDir: {cf}\Data Dynamics\ActiveReports Pro; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{cf}\Data Dynamics\ActiveReports Pro\tiffexpt.dll'));
Source: "MSCOMCTL.OCX"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\MSCOMCTL.OCX'));
Source: "LaVolpeImageList.ocx"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\LaVolpeImageList.ocx'));
Source: "jcMDITabs.ocx"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\jcMDITabs.ocx'));
Source: "LaVolpeAlphaImg2.ocx"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\LaVolpeAlphaImg2.ocx'));
Source: "vkusercontrolsxp.ocx"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\vkusercontrolsxp.ocx'));
Source: "prjXTab.ocx"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\prjXTab.ocx'));
Source: "EyeDropper.ocx"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\EyeDropper.ocx'));
Source: "MSCAL.OCX"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\MSCAL.OCX'));
Source: "COMDLG32.OCX"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\COMDLG32.OCX'));
Source: "COMCT232.OCX"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\COMCT232.OCX'));
Source: "MSCOMCT2.OCX"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\MSCOMCT2.OCX'));
Source: "OsenDatel.ocx"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\OsenDatel.ocx'));
Source: "MSHFLXGD.OCX"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\MSHFLXGD.OCX'));
Source: "COMCT332.OCX"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\COMCT332.OCX'));
Source: "ComboBoxLB.ocx"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\ComboBoxLB.ocx'));
Source: "HookMenu15.ocx"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\HookMenu15.ocx'));
Source: "VBFLXGRD14.OCX"; DestDir: {sys}; Flags: regserver noregerror 32bit allowunsafefiles; Check: FileNotFound(ExpandConstant('{sys}\VBFLXGRD14.OCX'));

Source: "vcredist\vc_redist.x86.exe"; DestDir: "{tmp}";

; NOTE: Don't use "Flags: ignoreversion" on any shared system files
 
[Icons]
;Shortcut Icons
Name: "{userstartmenu}\icDagangv1\icDagangv1"; Filename:"{app}\icDagangv1.exe"
Name: "{userdesktop}\Sistem icDagang"; Filename: "{app}\icDagangv1.exe"; Tasks: desktopicon

[INI]
;Filename: {app}\mysql\my.ini; Section: mysqld; Key: basedir; String: {app}\mysql; Tasks: installmysql
;Filename: {app}\mysql\my.ini; Section: mysqld; Key: datadir; String: {app}\mysql\data; Tasks: installmysql

[Registry]
;For accessing Windows registry


[Run]

; Installing MySQL installation package, which by default goes to C:\Program Files\MySQL\
; /qn also makes msiexec go quiet and unattended.
;Filename: msiexec.exe; Parameters: "/i ""{tmp}\mysql-installer-community-8.0.20.0.msi""/ qn";WorkingDir: {tmp};StatusMsg: "Sedang menginstall MySQL Server Installer 8.0";Flags: runhidden

; Using the MySQLInstallerConsole.exe to install the MySQL server. We need to set the type of installation
; ( -t ) to Custom to make it install only the server ( and omit for example Workbench ). We need to set the
; initial root password ( below set to root ). Lack of --nowait makes the console wait for user input.
;Filename: "C:\Program Files\MySQL\MySQL Installer for Windows\MySQLInstallerConsole.exe";Parameters: " --action=install -t=Custom --config=mysql-server-5.7-win32:passwd=root --product=mysql-server-5.7-win32 --catalog=mysql-5.7-win32 --nowait";StatusMsg: "Installing MySQL Server";Flags: runhidden
                     
; Quite self explanatory, we just add mysql service to services currently running on the pc
;Filename: "C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe"; Parameters:" --install";WorkingDir: {app};StatusMsg: "Installing MySQL Service";Flags: runhidden

; Starting the service
;Filename: net.exe;Parameters: start mysql;StatusMsg: "Memulai MySQL Server";Flags: runhidden

;Run misc. process
;Addtional Task
;run MVC++ 2015 Redist
Filename: "{tmp}\vc_redist.x86.exe"; Parameters: "/Silent"; StatusMsg: "Sedang menginstall Microsoft VC++ 2015"; Flags: runhidden; MinVersion: 0,5.01.2600sp2; Tasks: installmysql

;install service MySQL
Filename: "{app}\mysql\bin\mysqld.exe"; Parameters: "install ""MySQL"""; StatusMsg: "Sedang menginstall service MySQL 8.0..."; Flags: runhidden; MinVersion: 0,5.01.2600sp2; Tasks: installmysql
;initialize the service
Filename: "{app}\mysql\bin\mysqld.exe"; Parameters:" --initialize";WorkingDir: {app};StatusMsg: "Initializing MySQL Service";Flags: runhidden
 
;jalankan service MySQL
Filename: {sys}\net.exe; Parameters: "Start ""MySQL"""; StatusMsg: "Sedang menjalankan service MySQL 8.0..."; Flags: runhidden; MinVersion: 0.0,4.0.1381; Tasks: installmysql
 
;mendaftarkan port default mysql (3306) ke firewall
Filename: "{sys}\netsh.exe"; Parameters: "firewall add portopening TCP 3306 ""Port MySQL"""; StatusMsg: "Sedang mendaftarkan port MySQL ..."; Flags: runhidden; MinVersion: 0,5.01.2600sp2
Filename: "{sys}\netsh.exe"; Parameters: "firewall set service type = fileandprint mode = enable"; StatusMsg: "Mengaktifkan File and Printer Sharing ..."; Flags: runhidden; MinVersion: 0,5.01.2600sp2
 
;mengganti password default root (blank). ex : masterkey
Filename: "{app}\mysql\bin\mysqladmin.exe"; Parameters: "-uroot password masterkey"; StatusMsg: "Mengganti password root"; Flags: runhidden; MinVersion: 0,5.01.2600sp2
 
;menghapus user default1 (user=blank, password=blank)
Filename: "{app}\mysql\bin\mysql.exe"; Parameters: "-uroot -pmasterkey -e ""DELETE FROM mysql.user WHERE Host='localhost' AND User=''"""; Flags: runhidden; MinVersion: 0,5.01.2600sp2
Filename: "{app}\mysql\bin\mysql.exe"; Parameters: "-uroot -pmasterkey -e ""FLUSH PRIVILEGES"""; Flags: runhidden; MinVersion: 0,5.01.2600sp2
 
;menghapus user default2 (user=root, password=blank)
Filename: "{app}\mysql\bin\mysql.exe"; Parameters: "-uroot -pmasterkey -e ""DELETE FROM mysql.user WHERE Host='127.0.0.1' AND User='root'"""; Flags: runhidden; MinVersion: 0,5.01.2600sp2
Filename: "{app}\mysql\bin\mysql.exe"; Parameters: "-uroot -pmasterkey -e ""FLUSH PRIVILEGES"""; Flags: runhidden; MinVersion: 0,5.01.2600sp2
 
;set agar user root bisa login dari mesin lain (kalo diperlukan)
Filename: "{app}\mysql\bin\mysql.exe"; Parameters: "-uroot -pmasterkey -e ""GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY 'masterkey'"""; Flags: runhidden; MinVersion: 0,5.01.2600sp2
Filename: "{app}\mysql\bin\mysql.exe"; Parameters: "-uroot -pmasterkey -e ""FLUSH PRIVILEGES"""; Flags: runhidden; MinVersion: 0,5.01.2600sp2
 
;install driver myodbc
Filename: "{sys}\myodbc-installer.exe"; Parameters: "-d -a -n ""MySQL ODBC 8.0 ANSI Driver"" -t ""DRIVER=myodbc8a.dll;SETUP=myodbc8a.dll"""; StatusMsg: "Tunggu sedang mendaftarkan driver MySQL Connector ANSI ODBC 8.0"; Flags: runhidden
Filename: "{sys}\myodbc-installer.exe"; Parameters: "-d -a -n ""MySQL ODBC 8.0 Unicode Driver"" -t ""DRIVER=myodbc8a.dll;SETUP=myodbc8w.dll"""; StatusMsg: "Tunggu sedang mendaftarkan driver MySQL Connector UNICODE ODBC 8.0"; Flags: runhidden

[UninstallRun]
Filename: {sys}\net.exe; Parameters: "stop ""MySQL"""; StatusMsg: "Menghentikan Service MySQL ..."; Flags: runhidden; MinVersion: 0.0,4.0.1381
Filename: "{app}\mysql\bin\mysqld.exe"; Parameters: "remove ""MySQL"""; StatusMsg: "Sedang menghapus service MySQL ..."; Flags: runhidden; MinVersion: 0,5.01.2600sp2

Filename: "{sys}\myodbc-installer.exe"; Parameters: "-d -r -n ""MySQL ODBC 5.1 Driver"""; StatusMsg: "Tunggu sedang menghapus driver MySQL Connector ODBC 5.1.5"; Flags: runhidden

[UninstallDelete]
Type: files; Name: {app}\mysql\bin\*.*
Type: files; Name: {app}\mysql\Docs\*.*
Type: files; Name: {app}\mysql\lib\*.*
Type: files; Name: {app}\mysql\share\*.*

Type: files; Name: {sys}\myodbc5S.dll
Type: files; Name: {sys}\myodbc5S.lib
Type: files; Name: {sys}\myodbc5.dll
Type: files; Name: {sys}\myodbc5.lib
Type: files; Name: {sys}\myodbc-installer.exe

Here is the step for installation :
1. Install Program
2. Install MySQL
3. Install ODBC
4. Running MySQL along with services
5. Define the ODBC MySQL 8.0 ANsi Driver

What I didn't do in installation is "Creating Database" because my app will create database and tables.

My Problem :
If I am not mistaken, the mySQL service will have user :root and password : masterkey, but I tried to connect with my program and unable to connect.
When I checked the ODBC via Control Panel->Administrative.. I can't find the ODBC for mySQL
But If I am using the command prompt "odbcad32" (somehow it show ODBC dialog) and I can see the MySql ODBC installed in drivers.

Please help, what's wrong with my script. Anyone can suggest what the best way to install mySQL during installation app (with silent and no need user interaction).

Thanks

[RESOLVED] DELETE the last carriage return

$
0
0
Code:


Set RS = CNN.Execute(SQL)
TESTO=""
                Do While Not RS.EOF
               
                TESTO = TESTO & RS.Fields(0).Value & vbCrLf
               
                    RS.MoveNext
                Loop

Actually have:
But how to suppress the last vbCrLf?

in effect i have

AAAAA
BBBBB
BBBBB
CARRIAGE RETURN

i need

But how to delete the last vbCrLf?

in effect i have

AAAAA
BBBBB
BBBBB

Usercontol to show rows and auto wrap text issue

$
0
0
I have created a user control that will load a small image, draw a text Title and then draw text into a rectangle. see below
I will eventually make it so that i can scroll these usercontrols.

Problem i have is that the more usercontrols there are the slower they load and when i resize the form, each usercontrol gets resize
and this in turn runs a redraw on each control.

Is there any way to redraw only controls that are in the viewable area.

Code:

  With UserControl
        .FontBold = False
        .FontName = "Tahoma"
        .FontSize = 8
        .ForeColor = m_Summary_Font_Col
        '.AutoRedraw = True
        .ScaleMode = vbPixels    '3
        If isOver = True Then
            .BackColor = m_Highlight_Backcol
        Else
            If m_Selected = True Then
            .BackColor = m_Selected_BackCol
            Else
            .BackColor = m_BackCol
            End If
           
        End If

        rc.Top = 25
        rc.Left = 90
        rc.Right = .ScaleWidth
        rc.Bottom = .ScaleHeight
        DrawText .hDC, strText, -1, rc, DT_WORDBREAK    'Or DT_CENTER

    End With

Name:  image.jpg
Views: 31
Size:  56.9 KB
Attached Images
 

Handle of external app

$
0
0
If I use Shell or CreateProcess to launch an external application is it possible to get the handle of that app?

border on entire row in listview

$
0
0
Possible to have a thiny border arround a complete row in listview instead the dark row select....?
Tks.

vbKeyControl issue in keydown event

$
0
0
Hello all
Code:

Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyControl
MsgBox "you pressed ctr key"
End Select

This code is supposed to respond to (ctrl key) only but when I press the Alt key (which is used for typing the @ symbol), I get the message: "you pressed ctr key".
Any idea why this happen.
thank you

AppActivate

$
0
0
I use AppActivate to send keys to another app like this

Code:

  '
  '
ProcID = Shell "App2"

AppActivate ProcID, True
SendKeys "x"
  '
  '

It appears that when I do this the other app takes the focus but I need the focus back to my app so my question is can I get the ProcID of my app (App1) and use AppActivate to give my app the focus

I can't click on my app because the other app occupies the entire screen and it is running on top of all other apps

SendKeys on Win 8.1

$
0
0
Why do I get a Permission denied error when I run my program and it tries to execute SendKeys while running it in the IDE on Windows 8.1 but it's OK when I run the program as an EXE

Cannot open a .frm file in the VB 6.0 compiler

$
0
0
When I click on the .vbp file in the file default manager, nothing happens. When I try to open the .vbp file from the VB 6.0 compiler, it says that it can't open the .frm file. It is there and I have permission to open it.

SendMessage

$
0
0
Can I use the SendMessage API to send key codes to another application and if so how. I have the handle of the other application

How can I disable a messagebox beep?

$
0
0
How can I disable a messagebox beep?

I know it comes from the operating system (Windows 10).
But, when I go to Control Panel -> Change system sounds -> Sound tab, and look at those Program Events, none of them appears to be the one that VB6 uses for Msgbox beeping.

I can write a form to simulate the messagebox, but that would be too extreme.
There should be a simpler way to disable that beep.

Does anybody know how to do this?
Thanks.

Accesing form menu estructure from a UserControl

$
0
0
Hi guys! I want to recreate inside my usercontrol the form menu where it is placed and then disable the actual form menu.

With this code Im able to get all the Menus

Code:

Dim o As Object
    For Each o In Controls
        'Debug.Print TypeName(o)
        If (TypeName(o) = "Menu") Then
            Debug.Print o.Caption
        End If
    Next


But Im failing to find a way to access the relation between them.

Any suggestions?
Viewing all 21394 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>