In VB5 I have two (let's say, to simplify my question) ListBoxes, call them A and B.
They both contain exactly and always 21 elements, all in the visible zone, no scrolling necessary.
They necessarily use different fonts: A is Arial, and B is Symbol.
I have two wishes:
(1) The elements in their displays, side by side, should line up together, 0 with 0, 1 with 1,...20 with 20.
(2) The lists should use the largest FontSize(s) possible (i.e. with all elements visible) in the Height allotted to them, _on_ _any_ _size_ _of_ _screen_.
Regarding wish (1), FYI, if I give them both the same FontSize, with some sizes they match and with others they don't. The matchup is good only for sizes 8, 7, 5, and possibly 3 (too small to be sure). For sizes 9, 10, 11, 12, and presumably up, as well as for 4, Symbol is larger than Arial, while for 6, Symbol is smaller than Arial. I would be willing to replace Arial with another not-too-stylized font if you know of one that matches Symbol in size more consistently.
Regarding wish (2), I'm testing them on two different monitors, with ScreenHeights respectively 9,216 and 10,800, and would like to display them as large as possible on both (or others) without falling off the screen.
Any ideas for making all this happen within the resources of VB5?
↧
FontSize in ListBoxes
↧
Upload documents to Google Drive / Dropbox / One Drive
Friends,
I have been requested to look into the possibility of uploading files to Google Drive / Dropbox / One Drive. can we achieve this using VB6?. I shall start developing only after knowing the possibility.
Thanks in advance!!
↧
↧
DHTMLMessage Compiler Error - Variable not defined
I'm trying to resurrect an application that was written many years ago. Having worked through I now have come across an error on the following line ;
Set mDom = DHTMLMessage.DOM
Compiler Error - Variable not defined (referring to DHTMLMessage)
Is this a proprietary dll that has not been included in the project (cannot find anything resembling this in the source files) or is this a system dll that I need to reference in the project.
I've done a decent amount of googling but cannot seem to find anything that would help me.
thanks in advance
↧
[RESOLVED] DHTMLMessage Compiler Error - Variable not defined
I'm trying to resurrect an application that was written many years ago. Having worked through I now have come across an error on the following line ;
Set mDom = DHTMLMessage.DOM
Compiler Error - Variable not defined (referring to DHTMLMessage)
Is this a proprietary dll that has not been included in the project (cannot find anything resembling this in the source files) or is this a system dll that I need to reference in the project.
I've done a decent amount of googling but cannot seem to find anything that would help me.
thanks in advance
↧
This Control is beyond Screen.Height at design time
I have an array of 91 small Labels, grouped together in a 9x10 block at design time,
which are deployed otherwise at runtime.
But there's a gap: somehow Label #14 has escaped the boundaries of the screen!
I've used a MsgBox to query where #14 is initially located,
and it says #14's Top is at 45,545! No, that's not a typo.
(Screen.Height = 9,216 in this case.)
Further complication: #14 is AutoSize = True, but I want them all to be AutoSize = False,
a property that can't be changed at runtime.
I don't have a clue as to why this happened.
Is there a way to retrieve #14 or delete it and make a new one?
(I suppose I could make just the first Label at design time
and use ReDim to create the others at runtime,
but the old #14 would still be stranded out there,
so I would have to change the Name of the array, wouldn't I.)
↧
↧
VB6 MS Word Font Color automation
I need to insert some formatted text into MS Word document. I started MS Word Macro and entered this code:
Code:
---------
Selection.TypeText Text:="Test Macro Color Red "
Selection.Font.Size = 20
Selection.TypeText Text:="Size Changed "
Selection.Font.ColorIndex = wdGreen
Selection.TypeText Text:="ColorIndex set "
Selection.Font.Bold = True
Selection.TypeText Text:="Bold "
Selection.Font.Underline = wdUnderlineSingle
Selection.TypeText Text:="Undeline "
Selection.Font.ColorIndex = wdRed
Selection.TypeText Text:="TextColor set"
---------
When I run this macro I get what I wanted:
Attachment 35115 (http://forums.codeguru.com/attachment.php?attachmentid=35115)
If I use very similar code in VB6 statement for Size and Bold work, the lines containing ColorIndex assignment and Underline do not work, produce errors:
Attachment 35117 (http://forums.codeguru.com/attachment.php?attachmentid=35117)
How do I set the color of text and some other properties of font in Word in VB6?
Thank you
↧
VB6 Programs now requring compatibility mode in Windows 10
Has anyone else experienced the issue of a VB6 program that has worked in Windows 10 since it came out which now requires that Compatibility mode be set to either Windows 8 or Windows 7 to work? One of my programs started crashing on startup (in Windows 10, shortly after a recent Win10 update) with the message "(program name) software has stopped working."
After lots of troubleshooting with a customer, the only solution was to set compatibility mode for the program to Windows 7 or 8. Of course this is not occurring on the only Windows 10 machine that I have so I am unable to explore the system logs to see perhaps what is causing the crashing.
RCox
↧
Why is the file not uploaded
I want to upload a file to a ftp-server in a sub-folder.
I tried several ways but the file was never uploaded.
Pls. help
This is my code:
Code:
---------
UploadFile = WgBestandsPad & "\PfDetailVerzendTKP" & frmPfDetailhandel.txtLoonTijdVak(0).text & ".xml"
RemoteFileName = "PfDetailVerzendTKP" & frmPfDetailhandel.txtLoonTijdVak(0).text & ".xml"
' I want the remotefile to be placed in the sub-folder: "www.herman.nl\detailhandel"
With Inet1
.Protocol = icFTP
.RemoteHost = "www.herman.nl"
.UserName = "herman123"
.Password = "Pwd00000"
.Execute .url, "Put " + UploadFile + " " + RemoteFileName
Do While .StillExecuting
DoEvents
Loop
UploadFile = (.ResponseCode = 0)
End With
---------
↧
Copy or Move some record from Table to another Table
Hi Everyone,
How i need Copy or Move some record from Table to another Table
For Example i select here to rows how to copy or move to another Table
![]()
I need copy and move only Listview rows selected not all.
How i need Copy or Move some record from Table to another Table
For Example i select here to rows how to copy or move to another Table

I need copy and move only Listview rows selected not all.
↧
↧
How to Share this line for Social Media (Facebook or twitter, etc..)
Hi Everyone,
How to Share this line for Social Media (Facebook or twitter, etc..)
![]()
How to Share this line for Social Media (Facebook or twitter, etc..)

↧
how to create toal exe file
I wrote a vb6 program many, many years ago and need it now.
the file I wrote has no mistakes in it.
I want to create a exe file with everything in it.By that I mean all active x files plus all the other file to make a program I can send to a client with everything in it.
I have forgotten the method of doing this.
IN ADVANCE, THANKS FOR YOUR HELP.
the file I wrote has no mistakes in it.
I want to create a exe file with everything in it.By that I mean all active x files plus all the other file to make a program I can send to a client with everything in it.
I have forgotten the method of doing this.
IN ADVANCE, THANKS FOR YOUR HELP.
↧
Any Developer Familiar with Source RCon??
Hi im trying to make a RCon Tool to could remotely manage my Rust Experimental Dedicated Server and Counter Strike: Global Offenssive, they both uses the Source RCon Protocol https://developer.valvesoftware.com/..._RCON_Protocol
so till now i manage myself to make a function that works great with Rust Experimental Dedicated Server but when i tried the same function with Counter Strike: Global Offenssive it doesn't so, maybe any of u guys could point me if im missing something in my code??
here is what i have so far
and the way to use it:
'Auth against the Dedicated Server
sendCommand("password", 3)
'Send Command after we authenticated
sendCommand("status", 3)
Thanks in advance
so till now i manage myself to make a function that works great with Rust Experimental Dedicated Server but when i tried the same function with Counter Strike: Global Offenssive it doesn't so, maybe any of u guys could point me if im missing something in my code??
here is what i have so far
Code:
Private Function sendCommand(ByVal command As String, ByVal ServerData As Integer) As Byte
Dim i As Integer
Dim packet() As Byte
Dim strCommand() As Byte
id = id + 1
strCommand = StrConv(command, vbFromUnicode)
ReDim packet(Len(command) + 13) As Byte
packet(0) = Len(command)
packet(4) = id
packet(8) = ServerData
For i = 0 To Len(command) - 1
packet(12 + i) = strCommand(i)
Next
Winsock1.SendData packet
End Function
'Auth against the Dedicated Server
sendCommand("password", 3)
'Send Command after we authenticated
sendCommand("status", 3)
Thanks in advance
↧
VB6 does not know "MID", Time, Date
Hi,
after intalling VB6 on a new machine (Win7, the old one showed the "BlueScreenOfDeath") i have Problems with my in-use Programs i tried to reload:
VB6 does not know normal commands like "Mid" and "Time" and "Date" and so on.
When i type "VBA.Mid" it works.
But in another Application these command work properly...i ran out of any idea...
BR
Elex
after intalling VB6 on a new machine (Win7, the old one showed the "BlueScreenOfDeath") i have Problems with my in-use Programs i tried to reload:
VB6 does not know normal commands like "Mid" and "Time" and "Date" and so on.
When i type "VBA.Mid" it works.
But in another Application these command work properly...i ran out of any idea...
BR
Elex
↧
↧
[RESOLVED] On x GoTo s1, s2, s3, s4
Hello.
I´m trying to translate a code to Java but it´s a long time ago that I worked with Basic.
In this (simplified) code, I have something like
Code:
---------
Private Sub Form_Load()
x = 5
Debug.Print "---------------"
On x GoTo s1, s2, s3, s4
s1:
Debug.Print 11
s2:
Debug.Print 22
s3:
Debug.Print 33
s4:
Debug.Print 44
s5:
Debug.Print 55
End Sub
---------
When I write x = 0, it will print in the immediate window
11 22 33 44 55
When I write x = 1, 11 22 33 44 55
When I write x = 2, 22 33 44 55
When I write x = 3, 33 44 55
When I write x = 4, 44 55
When I write x = 5, 11 22 33 44 55
When I reverse the order of the labels in the on GoTo line everything changes.
What are the rules here? I can´t find anything in the reference.
Thanks in advance,
Emmanuel
↧
License information not found
Can anyone out there help me with this.
I am running VB6 with WindowsXP.
On starting a new application I tried to add a dbgrid control to a form, and received the message:
"License information for this component not found".
I have been on many web sites looking for an answer to this problem, but all I get is offers to download some software that does absolutely nothing.
If anyone knows what is causing this and how to resolve it, would they please send me step by step instructions on how to fix it.
Thanks in advance for any help.
Anthony Steventon.
I am running VB6 with WindowsXP.
On starting a new application I tried to add a dbgrid control to a form, and received the message:
"License information for this component not found".
I have been on many web sites looking for an answer to this problem, but all I get is offers to download some software that does absolutely nothing.
If anyone knows what is causing this and how to resolve it, would they please send me step by step instructions on how to fix it.
Thanks in advance for any help.
Anthony Steventon.
↧
controlling windows media player with vb6
Hi gang. Here is my issue. I have created an application that lets me browse through a list of videos, then play the one I wish. Usually this is done via a foot switch the program is reading. Normally it just plays the next video. I have a projector hooked up and have designed the form so that it plays the video on the second screen (external hdmi). I implemented this by creating a separate form (form2) from the form that has the list of videos (in a list box). This form contains a windows media player control On bootup, I simply move the container form2 to the other screen and push it as far down into the task bar as it will go. Each time a new video is selected it plays it in full screen mode. All of it works great. But there is one thing. When it goes from one video to another, the control shrinks and you see the top of form 2 at the bottom of the screen for about a second while the mediaplayer control loads the new video. Apparently there is no way to keep mediaplayer in fullscreen mode unless it is in playstate 3 (i have code to handle this). I have tried minimizing the form, hiding it, and setting the visible property to false. All of these hide the form BUT, the control will never go to fullscreen in that case. Interestingly if form2 is on the main laptop screen and set to invisible the mediaplayer control will go to full screen but not if form2 is on the screen for the projector. I know that sounds nuts but I have tested this several times. Any ideas would be appreciated.
Thanks,
Jeff
↧
Who does change?
I have forms with multiple controls. Most Controls when their property (for text box it's Text, for CheckBox it is Value etc.) is changed set the flag named blnDataChanged controlling the changes to TRUE. Based on that some other processes go different way (If blnDataChanged = True Then...). When form is loading and loads data to controls all controls set blnDataChanged = True and after loading blnDataChanged = False.
I'd like to run some process when any data in controls is changed by user, not by program. If I select using Key_Up, Key_Press or some other events I will need to write huge amount of code.
Is there any way to know who changes data in controls, user or program?
Thank you.
↧
↧
VB6 Question
Hey Guys,
I'm looking for some code that works as follows:-
I have a click box, whenever I press the button it creates a file in c:/results called results1.txt.
the second time I press the button, if the file results1.txt exists it creates a new file called results2.txt and so on increasing the number.
Would anybody be able to help please?
↧
Please help to find errors
Hi,
I am new to VB, can anyone explain the concept on this code.
Code:
---------
Public Sub resultsto(rpath As String, tabname As String)
Dim exapp As Object
Dim wb As Workbook
Dim ws As Worksheet
Dim i As Long
Dim j As Long
Dim resultssplit As Variant
Dim fieldssplilt As Variant
Dim hrs As Variant
Set exapp = CreateObject("Excel.Application")
exapp.DisplayAlerts = False
If Dir(rpath) <> "" Then
Set wb = exapp.Workbooks.Open(rpath)
Else
Set wb = exapp.Workbooks.Add
End If
Set ws = wb.sheeets.Add
ws.Name = tabname
c = 1
hrs = Split(strsomerecordset, vbLf)
If UBound(hrs) <> -1 Then
For i = 1 To Len(hrs(0))
If (Mid(hrs(0), i, 1)) = "," Then
c = c + 1
End If
ws.Cells(1, c).Value = ws.Cells(1, c).Value & Mid(hrs(0), i, 1)
Next i
End If
r = 2
c = 1
If UBound(hrs) > 0 Then
resultssplit= split(hrs(1),""
For i = 0 To UBound(resultssplit)
fieldssplit = Split(resultssplit(i), "")
For j = 0 To Split(resultsplit)
ws.Cells(1, c).Value = Replace(fieldssplit(j), "", "")
c = c + 1
Next j
c = 1
r = r + 1
else
ws.Cells(1, c).Value = "no results returned"
end if
If Dir(rpath) <> "" Then
wb.Save
Else
wb.SaveAs rpath
End If
exapp.Quit
End Sub
---------
Thanks
↧
Drag document for open
Hey all,
I want to replace then classical way to open a file (MSWordDoc)
DriveListBox, DirListBox, ListBox, with a drag action.
When I drag the file over my application I need to find/parse the file path and then load the file in an RichTextBox to fill some data.
So, how it's possible that?
What controls must I use and what events?
Some code examples or some links will be fine.
Thanks in advance for any opinion.
↧