Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all 1484 articles
Browse latest View live

Delete this post


Access the VBIDE library without add-ins

$
0
0
I recently had to document the methods of a vast class module. Means I wanted the names of all public functions listed in the module itself in a special procedure to give the opportunity to call them by name (CallByName used; could also be DispCall).
I could use a VB6 documenter for this, but asked myself if there is any way to access the VB6 Extensibility Library from inside the IDE apart from using an add-in, which seems to be the only way to get the instance's VBE Application object - other than in VBA Office where you can access VBIDE at any time. Investigated all over the net but could not find any solution. So here is mine.

It's so small that I can post the only important code routine here:
Code:

Private ThisVBE As VBIDE.VBE

Function GetVBIDE() As VBIDE.VBE
    Dim hwndMain As Long
    Dim sTitle As String
    Dim ret As Long
    Dim hProp As Long
    Dim ObjW As Object
   
    On Error GoTo ErrHandler
   
    If ThisVBE Is Nothing Then
        hwndMain = FindWindow("wndclass_desked_gsk", vbNullString)
        If hwndMain <> 0 Then
            sTitle = String(255, 0)
            ret = GetWindowText(hwndMain, sTitle, 255)
            If ret > 0 Then
                sTitle = Left(sTitle, ret)
                If InStr(1, sTitle, "Microsoft Visual Basic") > 0 Then
                    hProp = GetProp(hwndMain, "VBAutomation")
                    If hProp <> 0 Then
                        CopyMemory ObjW, hProp, 4&    '= VBIDE.Window
                        Set ThisVBE = ObjW.VBE
                        CopyMemory ObjW, 0&, 4&
                    End If
                End If
            End If
        End If
    End If
    Set GetVBIDE = ThisVBE
    Exit Function
   
ErrHandler:
    MsgBox Err.Description, vbCritical, "GetVBIDE()"
    Resume Next
End Function

Explanation:
  • With the help of some API functions receive the window of VB's IDE (class wndclass_desked_gsk; top level window)
  • Check if it's the right one ('Microsoft Visual Basic' in caption)
  • All IDE windows expose a windows property (long value) called "VBAutomation". I found out this to be the object pointer of the related VBIDE.Window
  • Get the pointer with GetProp
  • Turn the pointer into an object (CopyMemory)
  • Get the root VBE from property Window.VBE


Attached is a little project to demonstrate the usage. Hope it works in your environment.
If you want to implement this in your own project just copy the one routine and the API declarations into some module.
Attached Files

webBrowser Control Transparent

$
0
0
WPF ChromiumWebBrowser,Web Page Background Transparency

HTML Code:

<style>
        html, body {
            margin: 0px;
            height: 100%;
            width: 100%;
            overflow: hidden;
            background: rgba(0, 0, 0, 0);
        }
</style>

dose anybody test it?

Making Picturebox transparent,Set Alpha Channel Image

$
0
0
Making Picturebox transparent(support PNG alpha)

https://forums.codeguru.com/showthre...ox-transparent
Quote:
My transparent approach now is to let UserControl Transparent and supports container functionality
Programming Challenge:How to make Picturebox1 control truly transparent.Remove the background color, set the transparency of the PNG channel as a background image function.
Code:

SetWindowLong Picturebox1.hwnd, GWL_EXSTYLE, GetWindowLong(Picturebox1.hwnd, GWL_EXSTYLE) Or WS_EX_TRANSPARENT
    Set mSubclass = New clsTrickSubclass
    mSubclass.Hook Me.hwnd

VB6 Transparent Textbox By API(WM_CTLCOLOREDIT)
https://www.vbforums.com/showthread.php?891144-VB6-Transparent-Textbox-By-API(WM_CTLCOLOREDIT)

Quote:

Originally Posted by iPrank View Post
@Napoleon,
You can do so without regioning - by using a transparent usercontrol instead.

1. Create a UserControl.
2. Set it's ControlContainer = True and BackStyle = Transparent
3. FILL the usercontrol with a Rounded Rectangle shape. (For smoother effect,set the Shape's BorderStyle to Transparent.)
4. Set the shape's FillStyle to Solid.
5. Now use this user control as the container of your WebBrowser Cotrol.


PS. It is better idea to create a new thread (with link to the original one) rather than digging up an old one. :)
(Possibly CodeBank threads are only exceptions)

https://www.vbforums.com/showthread....e-Transparency

vb6 Transparent Control by BitBlt,Transparent Picturebox

$
0
0
vb6 Transparent Control by BitBlt,Transparent Picturebox

in form1
Code:

TransparentWithHdc Picture1.hwnd, Picture1.Hdc
in bas file:
Code:

Public Declare Function ReleaseCapture Lib "user32" () As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const WM_NCLBUTTONDOWN = &HA1
Public Const HTCAPTION = 2

Public Declare Function GetClientRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
'将客户区坐标系中的点转换为屏幕坐标
Public Declare Function ClientToScreen Lib "user32" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long
Public Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long

Public Declare Function GetParent Lib "user32" (ByVal hwnd As Long) As Long

Public Declare Function BringWindowToTop Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal Hdc As Long) As Long
Public Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Public Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type
Public Type POINTAPI
        x As Long
        y As Long
End Type
Public Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Const SW_HIDE = 0
Sub TransparentWithHdc(MyHwnd As Long, MyHdc As Long)
Dim Wnd As Long
Wnd = GetParent(MyHwnd)
ShowWindow MyHwnd, SW_HIDE
'目标图片框有边框,要计算这些数据
Dim ParentDc As Long
'MyHdc = GetWindowDC(MyHwnd) '得到dc
ParentDc = GetWindowDC(Wnd) '得到dc

Dim W As Long, H As Long, W2 As Long, H2 As Long
Dim WinRect1 As RECT, ClientWh1 As RECT, ClientXY1 As POINTAPI
Dim WinRect2 As RECT, ClientWh2 As RECT, ClientXY2 As POINTAPI

GetWindowRect Wnd, WinRect1
'获取【Form】的客户区坐标系(Right=宽度,Bottom=高度),重要,ABCD
GetClientRect Wnd, ClientWh1
'将客户区坐标系中的点p(0,0)转换为屏幕坐标(左上角位置),重要,ABCD
ClientToScreen Wnd, ClientXY1

GetWindowRect MyHwnd, WinRect2
'获取【Form】的客户区坐标系(Right=宽度,Bottom=高度),重要,ABCD
GetClientRect MyHwnd, ClientWh2
'将客户区坐标系中的点p(0,0)转换为屏幕坐标(左上角位置),重要,ABCD
ClientToScreen MyHwnd, ClientXY2


W = ClientWh1.Right
H = ClientWh1.Bottom

W2 = ClientWh2.Right
H2 = ClientWh2.Bottom

DoEvents
'重要


BringWindowToTop Wnd
BitBlt MyHdc, 0, 0, W2, H2, ParentDc, ClientXY1.x - WinRect1.Left + (ClientXY2.x - ClientXY1.x), ClientXY1.y - WinRect1.Top + (ClientXY2.y - ClientXY1.y), vbSrcCopy

ReleaseDC Wnd, ParentDc
ShowWindow MyHwnd, 5
End Sub

Attached Images
  
Attached Files

Transparent Png Control by vb6

$
0
0
PngBall2.AutoSize = False
Call PngBall2.LoadPng("", "GLOBE", "PNG")

PngBall1.LoadPng ("01Alpha_Png.png")

GetWindowRect disables the display zoom (right-click of the program) when the GetWindowRect is set to high DPI, the pixels are not correct, what is the reason?

How to get the check of "Disable display scaling when high DPI setting" is checked


'Check, the desktop size is 3840,2160
'Unchecked, desktop size 1920*1080

Code:

Public Declare Function GetClientRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
'将客户区坐标系中的点转换为屏幕坐标
Public Declare Function ClientToScreen Lib "user32" (ByVal hwnd As Long, lpPoint As POINTAPI) As Long
Public Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As Long
Public Declare Function BringWindowToTop Lib "user32" (ByVal hwnd As Long) As Long
Public Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type
Public Type POINTAPI
        x As Long
        y As Long
End Type
Declare Function GetDesktopWindow Lib "user32" () As Long
 
Sub Main()
Dim Wnd As Long
Wnd = GetDesktopWindow
Dim WinRect1 As RECT, ClientWh1 As RECT, ClientXY1 As POINTAPI
Dim WinRect2 As RECT, ClientWh2 As RECT, ClientXY2 As POINTAPI

GetWindowRect Wnd, WinRect1
MsgBox "桌面坐标:" & WinRect1.Left & "," & WinRect1.Right & "," & WinRect1.Top & "," & WinRect1.Bottom
'获取【Form】的客户区坐标系(Right=宽度,Bottom=高度),重要,ABCD
GetClientRect Wnd, ClientWh1
'将客户区坐标系中的点p(0,0)转换为屏幕坐标(左上角位置),重要,ABCD
ClientToScreen Wnd, ClientXY1

End Sub

Attached Images
 
Attached Files

VB6 RC6 Cam-Streaming (with local QRCode-Decoding)

$
0
0
Just a little demo, which shows how to use the new cVidCap-Class of the RC6-lib (a version >= 6.0.7 is needed).

It is relatively simple to set-up (basically only a connect-MethodCall with a few init-params is needed) -
and it then throws a single event at the host-form, which transports the decoded VideoFrame as a cCairoSurface-type.

This incoming Image-Surface-Object is then already pre-processed internally,
according to the different "Flip" and "Rotate"-Property-Settings on cVidCap.

Upon request, this demo also includes a "live-decoding" of QR-Codes
(not doing any "online-calls", but using cQRDecode from RC6Widgets.dll - which in turn uses the statically linked "libQuirc" from cairo_sqlite.dll)

Here is a ScreenShot:


Some advice for using the QR-Decoding:
- the Label which shows the info, is "clickable" (then placing the decoded String on the ClipBoard)
- it has 3 "BackColor-Modes" to visualize the "live-capture-status"
- <grey> nothing was found so far
- <yellow> partial success (but ECC-checksum did not yet match)
- <green> a successful decoding took place (with a matching ECC-checksum)

Ok, here the Demo-Code:
VidCapRC6.zip

Have fun,

Olaf
Attached Files

(VB6) Detect Design-time and uncompiled

$
0
0
Code can run at design time if you have UserControls or also you can type a procedure name in the immediate window and run that code.

This function takes advantage of an error that is raised only at run-time and uses code from this Codebank entry (thanks to the author).

It detects when the code is running at design time and uncompiled. It is intended to address issues that happen when the code runs in source code at design time, not at design time but compiled (in an OCX or DLL).

In the demonstration project that is attached it uses an UserControl for easy testing, but the code works without an UserControl and does not rely on the Ambient.UserMode property.

Code:

Option Explicit

Private Declare Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long)
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetProp Lib "user32.dll" Alias "GetPropA" (ByVal hwnd As Long, ByVal lpString As String) As Long

Private mIsUncompiledAndDesignTime As Boolean
Private mIsUncompiledAndDesignTime_Set As Boolean

Public Function IsUncompiledAndDesignTime() As Boolean
    If Not mIsUncompiledAndDesignTime_Set Then
        Dim iInIDE As Boolean
       
        Debug.Assert MakeTrue(iInIDE)
        If iInIDE Then
            SetIsUncompiledAndDesignTime
        End If
        mIsUncompiledAndDesignTime_Set = True
    End If
    IsUncompiledAndDesignTime = mIsUncompiledAndDesignTime
End Function

Private Sub SetIsUncompiledAndDesignTime()
    Dim hwndMain As Long
    Dim hProp As Long
    Dim iObjIDE As Object
    Dim iObjVBE As Object
   
    hwndMain = FindWindow("wndclass_desked_gsk", vbNullString)
    If hwndMain <> 0 Then
        hProp = GetProp(hwndMain, "VBAutomation")
        If hProp <> 0 Then
            CopyMemory iObjIDE, hProp, 4&    '= VBIDE.Window
            On Error Resume Next
            Set iObjVBE = iObjIDE.VBE
            mIsUncompiledAndDesignTime = True
            If Err.Number = 70 Then ' run time raises an access denied error
                mIsUncompiledAndDesignTime = False
            End If
            On Error GoTo 0
            CopyMemory iObjIDE, 0&, 4&
        End If
    End If
End Sub
   
Private Function MakeTrue(value As Boolean) As Boolean
    MakeTrue = True
    value = True
End Function

Attached Files

(VB6) Add-In to change the default font of new forms

$
0
0
It changes the default font from 'MS Sans Serif' to other font of new Forms, UserControls and PropertyPages that are added to the project.

You can configure the font that you want, the default one is Segoe UI 9.

Name:  def.font-config.png
Views: 49
Size:  3.7 KB

Download from GitHub

Note: To change the fonts of existent forms, you can use the add-in Project Examiner.
Attached Images
 

how to transparency Button like Listbox by vb6?

$
0
0
Code:

Option Explicit
 
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_NCLBUTTONDOWN = &HA1
Private Const HTCAPTION = 2
 
 
 
Private Declare Function CreatePatternBrush Lib "gdi32" (ByVal hBitmap As Long) As Long
Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
Private Declare Function SetBrushOrgEx Lib "gdi32" (ByVal hdc As Long, ByVal nXOrg As Long, ByVal nYOrg As Long, lppt As Any) As Long
Private Declare Function MapWindowPoints Lib "user32" (ByVal hwndFrom As Long, ByVal hwndTo As Long, lppt As Any, ByVal cPoints As Long) As Long
Private Declare Function InvalidateRect Lib "user32" (ByVal hwnd As Long, lpRect As Any, ByVal bErase As Long) As Long
Private Declare Function SetBkMode Lib "gdi32" (ByVal hdc As Long, ByVal nBkMode As Long) As Long
Private Declare Function SetTextColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
 
Private Const TRANSPARENT          As Long = 1
Private Const WM_CTLCOLORLISTBOX    As Long = &H134
Private Const WM_CTLCOLORSTATIC    As Long = &H138
Private Const WM_VSCROLL            As Long = &H115
 
Dim WithEvents WndProc  As clsTrickSubclass ' Объект для сабклассинга формы
Dim WithEvents lstProc  As clsTrickSubclass ' Объект для сабклассинга списка
 
Dim hBackBrush  As Long ' Фоновая кисть
 Private Sub list1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 1 Then

    Call ReleaseCapture
    SendMessage List1.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&
    List1.Refresh
End If
End Sub

Private Sub Form_Load()
'Set a larger background image test.jpg for the form, and move the text box to see the transparency effect
    Me.Picture = LoadPicture(App.Path & "\test.jpg")


    ' Создаем кисть для отрисовки фона на основе фонового изображения формы
    hBackBrush = CreatePatternBrush(Me.Picture.Handle)
    ' Сабклассинг формы
    Set WndProc = New clsTrickSubclass
    Set lstProc = New clsTrickSubclass
   
    WndProc.Hook Me.hwnd
    lstProc.Hook List1.hwnd
   
    ' Добавляем в список тестовые значения
    Do While List1.ListCount < 100
        List1.AddItem Format(List1.ListCount, "ITE\M 00")
    Loop
   
End Sub
 
Private Sub Form_Unload(Cancel As Integer)
    ' Удаляем кисть
    DeleteObject hBackBrush
End Sub
 
' Оконная процедура списка
Private Sub lstProc_wndProc(ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long, Ret As Long, DefCall As Boolean)
   
    Select Case Msg
    ' При прокрутке списка
    Case WM_VSCROLL
        ' Объявляем всю область списка недействительной и требующей перерисовки
        InvalidateRect hwnd, ByVal 0&, 0
    End Select
    ' Вызов по умолчанию
    DefCall = True
   
End Sub
 
' Оконная процедура формы
Private Sub wndProc_WndProc(ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long, Ret As Long, DefCall As Boolean)
   
    Select Case Msg
    ' При запросе кисти фона списка или слайдера
    Case WM_CTLCOLORSTATIC, WM_CTLCOLORLISTBOX
        Dim pts(1)  As Long
        ' Получаем координаты элемента
        MapWindowPoints lParam, Me.hwnd, pts(0), 1
        ' Сдвигаем точку отсчета координат кисти, чтобы она совпадала с фоновом изображением под контролом
        SetBrushOrgEx wParam, -pts(0), -pts(1), ByVal 0&
        ' Если это список
        If lParam = List1.hwnd Then
            ' Устанавливаем прозрачный фон для текста
            SetBkMode wParam, TRANSPARENT
            ' Устанавливаем цвет текста
            SetTextColor wParam, vbWhite
       
        End If
        ' Возвращаем кисть
        Ret = hBackBrush
       
    Case Else:  DefCall = True  ' Остальное оставляем без изменений
    End Select
   
End Sub

Simple transparent button control For VB6

$
0
0
Private Sub Form_Load()
Me.Picture = LoadPicture(App.Path & "\bg.jpg")
'MyButton1(0).FilePath = "bt1a.png"
'MyButton1(0).FileClick = "bt1b.png"
End Sub

Private Sub Form_Activate()

If Me.Tag = "" Then
Me.Tag = "a"

Picture1.AutoRedraw = True
'Picture1.Picture = LoadPicture(App.Path & "\bg.jpg")
TransparentWithHdc Picture1.hwnd, Picture1.hDC

MyButton1(0).CutBgImg
MyButton1(0).ShowImg

MyButton1(2).CutBgImg
MyButton1(2).ShowImg

End If
End Sub
Attached Images
 
Attached Files

VB6 Png Control,Simple transparent button control For VB6

$
0
0
Simulate the control transparency effect: the developed custom control usercontrol sets a screenshot function as the base image, bitblt draws the background image on the form (or screenshots with other controls), and then draws the button image or text on it, you can use it usercontrol.cls is cleared (the base map remains unchanged)

Private Sub Form_Load()
Me.Picture = LoadPicture(App.Path & "\bg.jpg")
'MyButton1(0).FilePath = "bt1a.png"
'MyButton1(0).FileClick = "bt1b.png"
End Sub

Private Sub Form_Activate()

If Me.Tag = "" Then
Me.Tag = "a"

Picture1.AutoRedraw = True
'Picture1.Picture = LoadPicture(App.Path & "\bg.jpg")
TransparentWithHdc Picture1.hwnd, Picture1.hDC

MyButton1(0).CutBgImg
MyButton1(0).ShowImg

MyButton1(2).CutBgImg
MyButton1(2).ShowImg

End If
End Sub
Attached Images
 
Attached Files

how to use alpha png for buttons,Transparent toolbar Control by vb6

$
0
0
it's use ImageList1.MaskColor ,how to use alpha png for buttons ?or use api without imagelist control ?

[VB6] ListView / TreeView Extended and Custom Checkboxes-VBForums
https://www.vbforums.com/showthread....tom-Checkboxes

Code:


Private Declare Function SetClassLong Lib "user32" Alias "SetClassLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwnewlong As Long) As Long
Private Declare Function OleTranslateColor Lib "oleaut32.dll" (ByVal lOleColor As Long, ByVal lHPalette As Long, ByRef lColorRef As Long) As Long
Private Declare Function CreateSolidBrush Lib "gdi32.dll" (ByVal crColor As Long) As Long
Private Declare Function DeleteObject Lib "gdi32.dll" (ByVal hObject As Long) As Long
Private Declare Function CreatePatternBrush Lib "gdi32.dll" (ByVal hBitmap As Long) As Long
Private Declare Function InvalidateRect Lib "user32" (ByVal hwnd As Long, lpRect As Long, ByVal bErase As Long) As Long

Private Const GCL_HBRBACKGROUND As Long = -10

Private Function GDI_TranslateColor(OleClr As OLE_COLOR, Optional hPal As Integer = 0) As Long
    ' used to return the correct color value of OleClr as a long
    If OleTranslateColor(OleClr, hPal, GDI_TranslateColor) Then
        GDI_TranslateColor = &HFFFF&
    End If
End Function

Function GDI_CreateSoildBrush(bColor As OLE_COLOR) As Long
    'Create a Brush form a picture handle
    GDI_CreateSoildBrush = CreateSolidBrush(GDI_TranslateColor(bColor))
End Function

Public Sub SetToolbarBG(hwnd As Long, hBmp As Long)
    'Set the toolbars background image
    DeleteObject SetClassLong(hwnd, GCL_HBRBACKGROUND, CreatePatternBrush(hBmp))
    InvalidateRect 0&, 0&, False
End Sub

Public Sub SetToolbarBK(hwnd As Long, hColor As OLE_COLOR)
    ' Set a toolbars Backcolor
    DeleteObject SetClassLong(hwnd, GCL_HBRBACKGROUND, GDI_CreateSoildBrush(hColor))
    InvalidateRect 0&, 0&, False
End Sub

Private Sub cmdBk_Click()
    Call SetToolbarBK(Toolbar1.hwnd, vbYellow)
End Sub

Private Sub Command1_Click()
    SetToolbarBG Toolbar1.hwnd, Image1.Picture
End Sub

(VB6 Add-In) Move selected controls

$
0
0
Move several controls certain left and/or top at the same time.

Not sure if other add-ins do this (probably), but one feature that the VB6 IDE lacks is the ability to move all the selected controls at the same time certain left and/or top.

Name:  MoveControls.png
Views: 25
Size:  15.0 KB

Download from GitHub.
Attached Images
  

More Misc Programs

$
0
0
Here are 8 more misc programs from my unfinished folder. They are : Create Dummy Files , DrawOnForm with floodfill, Filename generator, Morse Code, Names List Maker, On/off usercontrol, random Strings, State abbrev.
Maybe there's something here someone can use.

(VB6) Add-In - Move selected controls

$
0
0
Move several controls certain left and/or top at the same time.

Not sure if other add-ins do this (probably), but one feature that the VB6 IDE lacks is the ability to move all the selected controls at the same time certain left and/or top.

Name:  MoveControls3.png
Views: 32
Size:  20.9 KB

Sometimes it is necessary to add one or more controls to a form in the middle of other controls and you need to make room for them, so you need to shift an entire block of controls in some vertical (or horizontal, but usually vertical) space, and the IDE does not provide the ability to move them the exact offset.
You have to move them around with the mouse, but whether you have the IDE set to snap to the grid or not, the controls never end up in the right place. In the end, you have to set the position of each one by hand, and that's very cumbersome.
This add-in provides a solution for that problem.

Download from GitHub.
Attached Images
 

XML Class to read & write

$
0
0
Hi.
I am wondering if anyone has a drop in class that is easy to read & write nested xml files. Ive seen and got a few that read very basic xml files.
but i am not good enough to make it read & write nested tags.

ie
<config>
<Screen>
<Size>10</Size>
<somethingelse>blah blah</somethingelse>
<Screen>
<Next setting>test</Next setting>
<Anotherone>xxxxxxx</Anotherone>
</config>

tks

Abbreviate Text

$
0
0
This has very little use but I enjoyed the programming. Can be used to create control labels. See what you think about it.
Attached Images
 
Attached Files

VB6 SQL-queryable Resources, based on ZipContainer-Files

$
0
0
This Demo has a dependency to RC6 (but would work with RC5 as well).

The framework-dependency was included, to be able to conveniently "Select" resource-data via SQL -
(from the ZipFile - InMemory... possible via the SQLite-ZipExtension which maps a Zip-archive to a virtual table).

The Project contains a modMain.bas Startup-module, which ensures:
- an AppDB (currently InMemory, but can be easily changed to a FileDB to persist also other AppData)
- in IDE-mode, the .\Res\-Subfolder is the leading data-source (a Res.zip will be re-created on each App-Startup in the IDE)
- in compiled mode, the App will instead fill the AppDBs "Res"-table directly from Res.zip
.. (so the \Res\-Subfolder does not have to be deployed)

So, whilst your Project is still in development, you simply enhance or update new content behind your \Res\-Subfolder.
The auto-refreshing of the Res.zip in your ProjectFolder (at each test-run in the IDE) eases a few worries,
whether the Zip-content matches with the content in your \Res\-Subfolder or not.


Here the output of the SQL-based resource-readouts on the Test-Form:


And here the zipped Demo-Code:
ZipResourceHandling.zip

Have fun,

Olaf
Attached Files

Name Generator

$
0
0
Create male names, female names, with or without middle initial and can add Mr. and Mrs. Code is simple and straight forward. Names list can be saved .I'd load a snapshot but not uploading it for some reason.
Attached Images
 
Attached Files
Viewing all 1484 articles
Browse latest View live