If I wanted to have a Windows PC that only ran VB6 programs...
If I wanted to have a Windows PC that I wanted to demonstrate only VB6 programs then I'd probably have a limited set of tools and utilities, is this true?
Would I be able to create a functioning and useful system that had all the tools needed for a modern PC user? I admit a VB6 based browser might be a difficult proposition and asking too much. However, for some of the other tools? It might be possible to switch to something made solely in VB6.
So that's my question, could you?
"Would you" is another question altogether which we don't need to have answered, because of course you wouldn't - so at the moment I'm only asking "could you?".
For example: There is XYplorer, the VB6 alternative to the Windows File Explorer.
Winstep Nexus is a Windows dock alternative, written in VB5 which I reckon counts just as well
So, are there other useful VB6 alternatives to the sort of tools you would typically find on a PC?
Let's start with something simple, an editor. Is there an editor written in VB6?
Last edited by yereverluvinuncleber; Jul 14th, 2021 at 08:03 AM.
Reason: Edited to make it clear what the brief really is
Re: If I wanted to have a Windows PC that only ran VB6 programs...
Well I would say that if you wanted the pc setup to where a novice user could only run specific programs written in VB6 then that would probably be possible though a lot of work. If the user knows a few things about PCs then no not possible as there are many ways they could get around whatever you were to do.
Re: If I wanted to have a Windows PC that only ran VB6 programs...
Originally Posted by TysonLPrice
There is plenty of free VB 6.0 projects you could look at:
Yes, I know and thankyou, I am just looking for specific suggestions at the moment. It is more of a speculative question, I have an on old spec NOS laptop for running XP and I thought I'd try to use it to showcase a few VB6 apps. Recommendations for useful apps taken.
Re: If I wanted to have a Windows PC that only ran VB6 programs...
Originally Posted by DataMiser
Well I would say that if you wanted the pc setup to where a novice user could only run specific programs
No, not looking for that, just looking for good recommendations of VB6 equivalents to everyday programs, like the ones listed above in the OP. Thankyou anyway.
Re: If I wanted to have a Windows PC that only ran VB6 programs...
I'll make a list at the end of the tools available and I'll try to build that XP system with only VB6 utilities that I have been recommended to use. I need to find my XP Pro discs (wife has tidied them).
Re: If I wanted to have a Windows PC that only ran VB6 programs...
Originally Posted by Episcopal
Yereverluvinuncleber O Atube Catcher to download videos, including from youtube, it was developed in VB6 and I use it and recommend it.
Bloody ~Hell! Episcopal, that is a good suggestion. I have been looking for a decent Youtube downloader for a while now having tried several and this one is written in VB6! Impressed!
...and your own editor? Is that one that could replace, say, notepad?
Last edited by yereverluvinuncleber; Jul 14th, 2021 at 08:05 AM.
Reason: Added screenshot of Atube Catcher
Re: If I wanted to have a Windows PC that only ran VB6 programs...
i am sure at some time (several years ago) i worked with a vb6 program for a internet cafe that locked the entire computer to a limited set of programs and timed out when the tariff expired
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Re: If I wanted to have a Windows PC that only ran VB6 programs...
Originally Posted by westconn1
a vb6 program ... that locked the entire computer to a limited set of programs
Sounds a great program but... in this case the limitation is artificial and policed by me alone, in that I am only going to load VB6 programs on the machine.
The idea is to find a variety of VB6 programs that can do all the tasks that are needed, not to prevent anyone from using anything other than VB6... That would be stranger still.
Re: If I wanted to have a Windows PC that only ran VB6 programs...
This is my Correspondence Editor. This screen is from 2009 on Windows XP. It's in Portuguese. I'm currently refactoring the code, because in Runtime mode it's a bit slow when the text reaches 600 pages. I'm changing some algorithm to increase performance, because at the time I had less experience.
What gave me the most work was working with editing tables...
Menu table: Insert table, row or column, before or after.
Delete Menu: Delete Table, Row or Column.
Select: Select table, row or column.
Menu Convert text to table, and table to text.
Transform Menu: Row to Column, Column to Row.
Classification menu: Ascending or descending.
Rotate Menu: Rotate the table clockwise or counterclockwise, Converting Row to Column...
Alignment Menu: Centers or not the table.
Adjust Menu: Adjust the table, row or column, according to the size of its content.
Last edited by Episcopal; Jul 17th, 2021 at 06:26 PM.
Re: If I wanted to have a Windows PC that only ran VB6 programs...
Episscopal, It looks to be grown-up, mature and competent software by just rating the UI. Where can I find a copy? I will need one for this XP laptop that I am going to build.
IF you had to compare Correspondence Editor in functionality to another Windows tool which would it be? I have heard you previously state that is has the functionality of notepad but slightly less functionality than Wordpad? Would that be true?
Re: If I wanted to have a Windows PC that only ran VB6 programs...
Originally Posted by yereverluvinuncleber
Episscopal, It looks to be grown-up, mature and competent software by just rating the UI. Where can I find a copy? I will need one for this XP laptop that I am going to build.
IF you had to compare Correspondence Editor in functionality to another Windows tool which would it be? I have heard you previously state that is has the functionality of notepad but slightly less functionality than Wordpad? Would that be true?
I'd love to try it.
No, no....it goes beyond wordpad.....this application I developed is lost....I don't even know where the source code is....I just saved the component source for text editor. ...
I have the text editor usercontrol source, but the text editing application will have to make another one.... I'm already finalizing a widget for an Ecclesiastical Management software, where I'm going to embed this correspondence editor. When I finish it I will test it on Win11.
Re: If I wanted to have a Windows PC that only ran VB6 programs...
Actually I work in programming only in my spare time ..... sometimes it takes me to finish my applications.
This is a part of a 42 usercontrol I developed, for the Ecclesiastical Manager. This one by the way has a bluish theme....but I want to make the theme dark too...
Re: If I wanted to have a Windows PC that only ran VB6 programs...
Well, what I really care about is the usercontrol that contains the WordProcessor source, the Text Editor that will manipulate it, I'll make another one, and with much more resources...
The truth is that I still have the source recorded on a cd, but as I formatted my machine several times in these 13 years, I had to record it on the cd. The problem is locating the cd among several ...
Re: If I wanted to have a Windows PC that only ran VB6 programs...
Originally Posted by Episcopal
Yereverluvinuncleber O Atube Catcher to download videos, including from youtube, it was developed in VB6 and I use it and recommend it.
I second a vote of 'good work' for whoever created this program (Atube Catcher). I downloaded it today and am impressed as well as to its capabilities, all in one easy-to-use app.
Re: If I wanted to have a Windows PC that only ran VB6 programs...
As we have to have games, here is a shoot 'em up of the old school type, by the name of "Be Quits!". This was posted here a couple of years ago and is a tour de force in VB6 and DirectX programming that shows what the old dog can do.
I have already installed and tried this one and I have to say, it is more difficult than Quake I but the gameplay is similar. It will need a cpu at least as good as a 3.0ghz system and I imagine a decentish GPU might help. The game runs on my old Dell laptop but not quite as quick as I'd like. My old Dell is quick in the CPU department but the GPU is the lowest of the low, it is, after all a business machine.
I just checked and this game runs very well on a laptop/desktop with a decent GPU, luckily the target system I have planned to use has a decent GPU and so DirectX9 acceleration is available.
Last edited by yereverluvinuncleber; Jul 28th, 2021 at 06:58 AM.
Reason: Added directX testing on a GPU
Re: If I wanted to have a Windows PC that only ran VB6 programs...
I love your music composer Trick but I am unsure as to whether it has a place on a 'normal' desktop. I have never come across a music generator on anyone's computer before! Nevertheless, I think it is incredibly clever and has a great UI. It is more of a niche product but an amazing one. Do you have any other completed programs that a desktop user would use in his every day normal life? Non-programming utilities I mean, of course as you have dozens of advanced programming utilities and add-ons.
Re: If I wanted to have a Windows PC that only ran VB6 programs...
I'm a bit late to the party on this one, but just wanted to "second" or "third" the recommendation for PhotoDemon. It's a great program written by a great guy. If you want to support open source VB6 development I recommend heading over to Tanner's Patreon page to pitch in. I've been kicking in a few bucks a month for over a year, and it's a small price to pay for some very useful software.
Re: If I wanted to have a Windows PC that only ran VB6 programs...
OP - I would start with a secure desktop that has been initiated from a Window Station. That way it can even be set as an alternate boot shell on Windows 10 Enterprise and Education, otherwise run side-by-side with Windows. The newly created desktop is clear of any Windows 10 clutter according to an inspection with SPY++. A custom taskbar, background wallpaper, and start menu fill the empty desktop. All have been made with VB6, but the source code is not included on my Github, exe's only.
Re: If I wanted to have a Windows PC that only ran VB6 programs...
Originally Posted by TTn
OP - I would start with a secure desktop that has been initiated from a Window Station. That way it can even be set as an alternate boot shell on Windows 10 Enterprise and Education, otherwise run side-by-side with Windows. The newly created desktop is clear of any Windows 10 clutter according to an inspection with SPY++. A custom taskbar, background wallpaper, and start menu fill the empty desktop. All have been made with VB6, but the source code is not included on my Github, exe's only.
That impressive. I never knew you could do that with Window Stations. I have some VB.Net code lying around that works with Window Stations but I've only ever used it for capturing the screen of whatever desktop session is the was console session, which basically means I can capture whatever the user sees, even WinLogon.
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
Re: If I wanted to have a Windows PC that only ran VB6 programs...
Originally Posted by Niya
That impressive. I never knew you could do that with Window Stations. I have some VB.Net code lying around that works with Window Stations but I've only ever used it for capturing the screen of whatever desktop session is the was console session, which basically means I can capture whatever the user sees, even WinLogon.
I don't think you can see another desktop without a Windows Service or by registering your application as an accessibility app in the registry/ease of access. If you can find your code, try it out and let me know. I doubt it.
Re: If I wanted to have a Windows PC that only ran VB6 programs...
Originally Posted by TTn
I don't think you can see another desktop without a Windows Service or by registering your application as an accessibility app in the registry/ease of access. If you can find your code, try it out and let me know. I doubt it.
It is actually a Windows Service that runs under the LocalSystem account which I believe is the most powerful account on a Windows system, even more powerful than Administrator accounts. It's used as part of a system I created to implement my own home grown version of Team Viewer. One of the problems I ran into early in it's design was not being able to screen capture and transmit input to and from the WinLogon desktop. I had to dive into the world of Window Stations and Desktops to implement that functionality. Once I got it, I never really explored what other possiblities there were with these series of APIs. Here is a small piece of code I used to capture the screen of the console session:-
Code:
Public Class ScreenCapture
Private Shared gshr_objSync As New Object
Public Shared Function GetScreenshot() As Bitmap
'Makes this method threadsafe. Multiple threads can call it at the same time and it would be ordered.
SyncLock gshr_objSync
Dim windowStation As Win32.SafeWindowStationHandle = Nothing
Dim originalWindowStation As Win32.SafeWindowStationHandle = Nothing
Dim originalDesktop As IntPtr = IntPtr.Zero
Dim inputdesktopHdc As IntPtr
Dim inputDesktopHwnd As IntPtr
Dim ptrInputDesktop As IntPtr = IntPtr.Zero
Dim bmp As Bitmap
windowStation = Win32.OpenWindowStation("WinSta0", False, Win32.ACCESS_MASK.GENERIC_ALL)
Try
If windowStation.IsInvalid Then
Throw New ScreenCaptureException("Failed to open window station", ScreenCaptureErrorCodes.FailedToOpenWinSta)
Else
originalWindowStation = Win32.GetProcessWindowStation()
If originalWindowStation.IsInvalid Then
Throw New ScreenCaptureException("Failed to get process window station", ScreenCaptureErrorCodes.FailedToGetProcWinSta)
Else
If Not Win32.SetProcessWindowStation(windowStation) Then
Throw New ScreenCaptureException("Failed to change current process's window station", ScreenCaptureErrorCodes.FailedToChangeWinSta)
Else
ptrInputDesktop = Win32.OpenInputDesktop(0, False, Win32.ACCESS_MASK.GENERIC_ALL)
If ptrInputDesktop = IntPtr.Zero Then
Throw New ScreenCaptureException("Failed to open input desktop", ScreenCaptureErrorCodes.FailedToOpenInputDskTop)
Else
originalDesktop = Win32.GetThreadDesktop(Win32.GetCurrentThreadId())
If originalDesktop = IntPtr.Zero Then
Throw New ScreenCaptureException("Unable to get original desktop", ScreenCaptureErrorCodes.FailedToGetOriginalDesktop)
Else
If Not Win32.SetThreadDesktop(ptrInputDesktop) Then
Throw New ScreenCaptureException("Unable to change the current threads desktop", ScreenCaptureErrorCodes.FailedToChangeCurrentThreadDskTop)
Else
inputDesktopHwnd = Win32.GetDesktopWindow()
If inputDesktopHwnd <> IntPtr.Zero Then
inputdesktopHdc = Win32.GetDC(inputDesktopHwnd)
If inputdesktopHdc = IntPtr.Zero Then
Throw New ScreenCaptureException("Unable to get desktop DC", ScreenCaptureErrorCodes.FailedToAcquireDskTopDC)
Else
Try
bmp = CopyDC(inputdesktopHdc, 0, 0, Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height)
Return bmp
Catch ex As Exception
Throw New ScreenCaptureException("Failed to copy device context", ScreenCaptureErrorCodes.CopyDCFailed, ex)
End Try
End If
End If
End If
End If
End If
End If
End If
End If
Finally
Win32.ReleaseDC(inputDesktopHwnd, inputdesktopHdc)
Win32.CloseDesktop(ptrInputDesktop)
Win32.SetThreadDesktop(originalDesktop)
Win32.SetProcessWindowStation(originalWindowStation)
windowStation.Close()
End Try
Return Nothing
End SyncLock
End Function
Private Shared Function CopyDC(ByVal hdc As IntPtr, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer) As Bitmap
Dim memDC As IntPtr = Win32.CreateCompatibleDC(hdc)
Dim memhBitmap As IntPtr = Win32.CreateCompatibleBitmap(hdc, width, height)
Dim stockBitmap As IntPtr = Win32.SelectObject(memDC, memhBitmap)
Try
If Not Win32.StretchBlt(memDC, x, y, width, height, hdc, x, y, width, height, Win32.TernaryRasterOperations.SRCCOPY) Then
Throw New Exception("Failed to copy device context")
Else
memhBitmap = Win32.SelectObject(memDC, stockBitmap)
Dim returnBitmap As Bitmap = Bitmap.FromHbitmap(memhBitmap)
Return returnBitmap
End If
Finally
Win32.DeleteObject(memhBitmap)
Win32.DeleteDC(memDC)
End Try
End Function
End Class
Here's another important piece of code that allows me to execute any function as if it were being executed in the console session itself.
Code:
Private Shared Sub ExecuteOnInputDesktop(ByVal proc As Action)
Dim windowStation As Win32.SafeWindowStationHandle = Nothing
Dim originalWindowStation As Win32.SafeWindowStationHandle = Nothing
Dim originalDesktop As IntPtr = IntPtr.Zero
'Dim inputdesktopHdc As IntPtr
'Dim inputDesktopHwnd As IntPtr
Dim ptrInputDesktop As IntPtr = IntPtr.Zero
'Open the interactive Window Station of the current session. This is the only Window Station that can
'contain Desktops to be displayed.
windowStation = Win32.OpenWindowStation("WinSta0", False, Win32.ACCESS_MASK.GENERIC_ALL)
Try
If windowStation.IsInvalid Then
Throw New WindowsMessagePlayerException("Failed to open window station", ScreenCaptureErrorCodes.FailedToOpenWinSta)
Else
originalWindowStation = Win32.GetProcessWindowStation()
If originalWindowStation.IsInvalid Then
Throw New WindowsMessagePlayerException("Failed to get process window station", ScreenCaptureErrorCodes.FailedToGetProcWinSta)
Else
If Not Win32.SetProcessWindowStation(windowStation) Then
Throw New WindowsMessagePlayerException("Failed to change current process's window station", ScreenCaptureErrorCodes.FailedToChangeWinSta)
Else
'Open the Input Desktop. The Input Desktop is the one currently being
'displayed and used by the user. There can only be one at a time for obvious reasons.
ptrInputDesktop = Win32.OpenInputDesktop(0, False, Win32.ACCESS_MASK.GENERIC_ALL)
If ptrInputDesktop = IntPtr.Zero Then
Throw New WindowsMessagePlayerException("Failed to open input desktop", ScreenCaptureErrorCodes.FailedToOpenInputDskTop)
Else
originalDesktop = Win32.GetThreadDesktop(Win32.GetCurrentThreadId())
If originalDesktop = IntPtr.Zero Then
Throw New WindowsMessagePlayerException("Unable to get original desktop", ScreenCaptureErrorCodes.FailedToGetOriginalDesktop)
Else
If Not Win32.SetThreadDesktop(ptrInputDesktop) Then
Throw New WindowsMessagePlayerException("Unable to change the current threads desktop", ScreenCaptureErrorCodes.FailedToChangeCurrentThreadDskTop)
Else
proc.Invoke()
End If
End If
End If
End If
End If
End If
Finally
'Win32.ReleaseDC(inputDesktopHwnd, inputdesktopHdc)
Win32.CloseDesktop(ptrInputDesktop)
Win32.SetThreadDesktop(originalDesktop)
Win32.SetProcessWindowStation(originalWindowStation)
windowStation.Close()
End Try
End Sub
A lot of API functions like SendInput are sensitive to what Desktop/WindowStation/Session they are called from. The above function can in a sense project the function call from one session like where a Windows Service is executed to the session/Window Station/Desktop of the currently logged in user or even in WinLogon(no user logged in).
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber