How can a user resize a MDIForm that has the border removed?
↧
resize with no border?
↧
VB Refresh slows control placement
I remember one machine I was on the refresh was off, so I could draw out a control without that constant shimmer that slows down the process, and without some API.
Anyone know how to shut off that redraw refresh thing in VB6? I fogot how I did it, or it was already off on the other machine.
Anyone know how to shut off that redraw refresh thing in VB6? I fogot how I did it, or it was already off on the other machine.
↧
↧
SQl Backup
Hi
I am using Sql 2008 . I want to take SQL Backup using Code . Is it possible without SqlDmo
Thanks
I am using Sql 2008 . I want to take SQL Backup using Code . Is it possible without SqlDmo
Thanks
↧
select case with listview
Hello
This in my code to transfer data from listview to textboxes
what I want to do is when I click the first time, data of the clicked row are copied to text1-
When I click the second time, data go to text2
What is happening now with this code is that whenever I click on a checked row, data go only to text1
Is there a way to correct this code please?
Thank you
This in my code to transfer data from listview to textboxes
Code:
Private Sub ListView1_Click()
Dim i As Integer
Dim clicknum As Integer
clicknum = clicknum + 1
For i = 1 To ListView1.ListItems.count
If ListView1.ListItems(i).Checked = True Then
Select Case clicknum
Case 1
Text1.Text = ListView1.ListItems(i)
Case 2
Text2.Text = ListView1.ListItems(i)
End Select
End If
Next
End Sub
When I click the second time, data go to text2
What is happening now with this code is that whenever I click on a checked row, data go only to text1
Is there a way to correct this code please?
Thank you
↧
[RESOLVED] select case with listview
Hello
This in my code to transfer data from listview to textboxes
what I want to do is when I click the first time, data of the clicked row are copied to text1-
When I click the second time, data go to text2
What is happening now with this code is that whenever I click on a checked row, data go only to text1
Is there a way to correct this code please?
Thank you
This in my code to transfer data from listview to textboxes
Code:
Private Sub ListView1_Click()
Dim i As Integer
Dim clicknum As Integer
clicknum = clicknum + 1
For i = 1 To ListView1.ListItems.count
If ListView1.ListItems(i).Checked = True Then
Select Case clicknum
Case 1
Text1.Text = ListView1.ListItems(i)
Case 2
Text2.Text = ListView1.ListItems(i)
End Select
End If
Next
End Sub
When I click the second time, data go to text2
What is happening now with this code is that whenever I click on a checked row, data go only to text1
Is there a way to correct this code please?
Thank you
↧
↧
UTF-16 BE API problem
I found the function for reading Unicode text files via API calls here, but it doesn't seem to work for the ones which are in UTF-16 Big Endian format.
I've attached the archive which contains sample project, so take a look.
I've attached the archive which contains sample project, so take a look.
↧
[RESOLVED] Move controls at runtime
Hello everyone
I got this code that allows moving controls at runtime
And I'm wondering if it is possible to save the new position
I mean even after closing the application, the control keeps its new position
Thanks
I got this code that allows moving controls at runtime
Code:
Private Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
ReleaseCapture
SendMessage Text1.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0
End Sub
I mean even after closing the application, the control keeps its new position
Thanks
↧
Timer Interval Is No Accurate! Why???
Hi Every One.
As I know 1 Sec. is 1000 milliseconds so in the code blow the final number in label must be 1000:
But the label shows 129 !!!!!!
Why???
Can any one tell me?
As I know 1 Sec. is 1000 milliseconds so in the code blow the final number in label must be 1000:
Code:
Dim a As Integer
Private Sub Form_Load()
a = 0
Timer1.Interval = 1
Timer2.Interval = 1000
End Sub
Private Sub Timer1_Timer()
a = a + 1
End Sub
Private Sub Timer2_Timer()
Timer1.Interval = 0
Label1.Caption = a
End Sub
Why???
Can any one tell me?
↧
Detect Internet Connection even if....
Hi,
I want to force an Update of my soft, but some people obliviously stop/disable internet access.
Is there a way to detect internet connection, even if your app has been blocked by an antivirus/firewall ?
So that you can warn the user and say you've blocked internet access to this software?
Thanks
I want to force an Update of my soft, but some people obliviously stop/disable internet access.
Is there a way to detect internet connection, even if your app has been blocked by an antivirus/firewall ?
So that you can warn the user and say you've blocked internet access to this software?
Thanks
↧
↧
VB6 app. affinity
no problem
↧
SYSINFO control 6 SAP6 permission denied
I have been away from my machine for a few months. Attempting to work on an existing app, there were load errors due to sysinfo control missing. This has happened before but always I could click Project, Components and check the Microsoft Sysinfo box and all was well. This time the request aborted with a Permission Denied box. Attempting to reinstall SP6 failed during the setup with no explanation.
Machine is using Windows 10, VB 6, SP6 version 9782
Would love some help on this.
Aloha - George
Machine is using Windows 10, VB 6, SP6 version 9782
Would love some help on this.
Aloha - George
↧
vb error
http://www.vbforums.com/images/smilies/smile.gif Hi, my name is Farah i am using a system designed with visual basic 6.0, recently i upgraded my server from windows server 2003 to windows server 2008 r2 standard. i also upgraded the client computers from Windows xp to windows 7 proffessional. Afterwards i started experiencing this error when printing from the desktop application ,the error reads, "a crystal report job failed because a free license could not be obtained in the time allocated. more licenses can be purchased direct from crystal decisions or through the crystal decisions online store". i had never experienced this error before with the old computers with windows xp installed. the application works with an old computer with windows xp installed but does not work with a new computer with windows 7 installed.
Moderator Action: Thread moved from VB.Net to VB6.
Moderator Action: Thread moved from VB.Net to VB6.
↧
What does this statement do ?
I recently came across a few statements in trying to understand what a function does. Here is one of those:
test = String(Len(divided), "9")
Both test and divided are of type string.
The basic version used is unknown.
Your suggestions are welcome.
NZ
test = String(Len(divided), "9")
Both test and divided are of type string.
The basic version used is unknown.
Your suggestions are welcome.
NZ
↧
↧
PREVIEW PRINT and PRINT
Hello VBForums
Hello evey one
Dear Gentelman ..
Please if you can help me to finish this project
How to add code in Command1 for print preview and for print in Command2
I put a Text1 for number document for printing
Thank you in advance for help
Cordially
MADA BLACK
Attachment 134399
Hello evey one
Dear Gentelman ..
Please if you can help me to finish this project
How to add code in Command1 for print preview and for print in Command2
I put a Text1 for number document for printing
Thank you in advance for help
Cordially
MADA BLACK
Attachment 134399
↧
VB6 IDE out of error
Good Evening to All,
This is Ravi. We developed one interface from VB6. Below is the information about the interface.
This is the fiscal printer integration. All the available api in PP7Device.dll which is not register able. So one C# dll was developed. We have to pass all the sales items to the printer it is working fine. But we are facing problem on reading the balance from the PP7Device.dll. Even it will not happened each call once in three bill or four, etc.
If any one faced this kind of issue kindly help me to come out.
This is Ravi. We developed one interface from VB6. Below is the information about the interface.
This is the fiscal printer integration. All the available api in PP7Device.dll which is not register able. So one C# dll was developed. We have to pass all the sales items to the printer it is working fine. But we are facing problem on reading the balance from the PP7Device.dll. Even it will not happened each call once in three bill or four, etc.
If any one faced this kind of issue kindly help me to come out.
↧
VB6 Code to get sum of a Field
I am using VB6., with MS Access. I have a database with a table <tblSls> fields Sales,Location, Date.I need to get the total sales when clicks a cbo drop menu item. The total to be displayed on a label
I tried this...but errors.... errors and errors
Dim TotalSum As Integer
Dim cnn As New ADODB.Connection
Dim srs As New ADODB.Recordset
'------------------------------------
Private Sub cboSlsRpt_Click()
srs.open "select Sum(Sales) as TotalSum from tblSfSls", cnn, adOpenKeyset, adLockPessimistic
Label1.Caption = srs.Fields!TotalSum
If cboSlsRpt.ListIndex = 0 Then
Label1.Caption = TotalSum
End If
I tried this...but errors.... errors and errors
Dim TotalSum As Integer
Dim cnn As New ADODB.Connection
Dim srs As New ADODB.Recordset
'------------------------------------
Private Sub cboSlsRpt_Click()
srs.open "select Sum(Sales) as TotalSum from tblSfSls", cnn, adOpenKeyset, adLockPessimistic
Label1.Caption = srs.Fields!TotalSum
If cboSlsRpt.ListIndex = 0 Then
Label1.Caption = TotalSum
End If
↧
Fill MS Word Plain Text Content Control using VB6 with MS Access Tables
I know how to create MS Word Documents using VB6. I also use Access tables from which to pull data and then code in VB6 where those items may go in a Word Document. (Using MS Word 2013).
I also can create (manually) in MS Word (using the Developer Tab) Plain Text Content Controls, which allow someone to take the Word document and click on the control and type in the appropriate information.
What I would LIKE to do is, instead of using 'regular' Word docs, use a template I created to populate the Plain Text Content Controls directly with VB6 code, pulling from data in my Access tables.
Here is an example of a Word Document with editable Plain Text Content Controls (these are editable fields in the actual Word Doc, and shown in bold red below).
Any suggestions on how to know which Plain Text Content Control is which so I can 'fill' them programmatically, yet keep the controls editable if I send the Document to someone? My goal is to have pre-prepared (data already populated) EDITABLE documents (using the Plain Text Content Controls).
Name (First and Last): Click to enter First and Last Name
Street Address/Apt: Enter Street Address.
City Enter City. State Choose a State. Zip: Enter Zip.
Home Phone: Enter Home Phone. Cell Phone: Enter Cell Phone.
Email Address: Enter Email Address.
Birth Date: Enter DOB. (Day Mon Year) Example: 12 Feb 1985
I also can create (manually) in MS Word (using the Developer Tab) Plain Text Content Controls, which allow someone to take the Word document and click on the control and type in the appropriate information.
What I would LIKE to do is, instead of using 'regular' Word docs, use a template I created to populate the Plain Text Content Controls directly with VB6 code, pulling from data in my Access tables.
Here is an example of a Word Document with editable Plain Text Content Controls (these are editable fields in the actual Word Doc, and shown in bold red below).
Any suggestions on how to know which Plain Text Content Control is which so I can 'fill' them programmatically, yet keep the controls editable if I send the Document to someone? My goal is to have pre-prepared (data already populated) EDITABLE documents (using the Plain Text Content Controls).
Quote:
Name (First and Last): Click to enter First and Last Name
Street Address/Apt: Enter Street Address.
City Enter City. State Choose a State. Zip: Enter Zip.
Home Phone: Enter Home Phone. Cell Phone: Enter Cell Phone.
Email Address: Enter Email Address.
Birth Date: Enter DOB. (Day Mon Year) Example: 12 Feb 1985
↧
↧
Drawing double-byte characters on a picturebox
Hi,
Im having another attempt to add double-byte character support to my app.
Now, my eyes are crossed from reading dozens of threads on Unicode, DBCS, etc, and I think I will be dreaming about all sorts of funny characters the next couple of weeks. So, I'm a bit afraid about posting my question, and getting all sorts of responses that go way over my head... But I'll be brave, and give it a try.
Simplified Im testing it in the following way:
- Two textboxes on the dialog.
- The user enters some data in both.
- We combine the strings: TotalString = Textbox1.Text & vbCrLf & Textbox2.Text
- And then convert to Unicode: UnicodeString = StrConv(TotalString, vbUnicode)
- As the final step we pass the Unicode string to GdipDrawstring to draw the text in a picturebox.
This all works perfectly fine with western fonts, but when testing with Korean, on a Korean PC with the locale set to Korean, and the font-fields of the textboxes set to those as well, the conversion to Unicode doesnt work properly.
Am I missing something simple, or is this an extremely difficult issue?
Thanks in advance for your help.
Regards,
Erwin
Im having another attempt to add double-byte character support to my app.
Now, my eyes are crossed from reading dozens of threads on Unicode, DBCS, etc, and I think I will be dreaming about all sorts of funny characters the next couple of weeks. So, I'm a bit afraid about posting my question, and getting all sorts of responses that go way over my head... But I'll be brave, and give it a try.
Simplified Im testing it in the following way:
- Two textboxes on the dialog.
- The user enters some data in both.
- We combine the strings: TotalString = Textbox1.Text & vbCrLf & Textbox2.Text
- And then convert to Unicode: UnicodeString = StrConv(TotalString, vbUnicode)
- As the final step we pass the Unicode string to GdipDrawstring to draw the text in a picturebox.
This all works perfectly fine with western fonts, but when testing with Korean, on a Korean PC with the locale set to Korean, and the font-fields of the textboxes set to those as well, the conversion to Unicode doesnt work properly.
Am I missing something simple, or is this an extremely difficult issue?
Thanks in advance for your help.
Regards,
Erwin
↧
PaintPicture in an ActiveX Control in VB6
First let me say that I'm largely clueless about much of VB6, though trying hard to figure stuff out on my own. I have an issue where I'm not getting the results I want from "paintpicture" in an ActiveX. In this case I'm trying to read a bitmap from a local drive and then display a portion of that image in another picture box (requiring scaling, cropping, and offsetting position). I have this working fine when I develop it as a standard vb project, but get junk with my attempts at including it in a simple ActiveX.
In this example I have an invisible picture box (with autosize on) named picSource, and a destination picture box (with autosize and auto refresh on) named picDest. The entire code is:
Private Sub Form_Load()
picSource.Picture = LoadPicture("C:\RSViewImageCache\sample.bmp")
'FORMAT IS;
'Destpic.PaintPicture sourcepic.Picture, destX, destY, destW, destH,srcX, srcY, srcW, srcH, [opcode]
picDest.PaintPicture picSource.Picture, 0, 0, 430, 316, 266, 196, 860, 632
End Sub
Again - this works as a standard VB project just great! But not so as an ActiveX control.
When this code is placed in the ActiveX as usercontrol > intialize or usercontrol > initproperties I seem to get the following behavior:
> If I set the visibility property for picSource on, I can see that the image is loading correctly in the first picture box.
> Instead of getting my scaled / cropped / and recentered image in picDest, I get a black box in the upper left part of the picture box.
If anyone has any suggestions or ideas I'd love to hear them!
And yes - I have solid reasons why I'm trying to do this in VB6 as an ActiveX (legacy stuff...).
In this example I have an invisible picture box (with autosize on) named picSource, and a destination picture box (with autosize and auto refresh on) named picDest. The entire code is:
Private Sub Form_Load()
picSource.Picture = LoadPicture("C:\RSViewImageCache\sample.bmp")
'FORMAT IS;
'Destpic.PaintPicture sourcepic.Picture, destX, destY, destW, destH,srcX, srcY, srcW, srcH, [opcode]
picDest.PaintPicture picSource.Picture, 0, 0, 430, 316, 266, 196, 860, 632
End Sub
Again - this works as a standard VB project just great! But not so as an ActiveX control.
When this code is placed in the ActiveX as usercontrol > intialize or usercontrol > initproperties I seem to get the following behavior:
> If I set the visibility property for picSource on, I can see that the image is loading correctly in the first picture box.
> Instead of getting my scaled / cropped / and recentered image in picDest, I get a black box in the upper left part of the picture box.
If anyone has any suggestions or ideas I'd love to hear them!
And yes - I have solid reasons why I'm trying to do this in VB6 as an ActiveX (legacy stuff...).
↧
VB6 Collection Object and strings
It has been many moons since I had to do something with vb6 collections.
Can someone refresh my memory?
Is the VB6 Collection object read only for the string datatype?
I can add strings to it, but it won't let me update them.
Can someone refresh my memory?
Is the VB6 Collection object read only for the string datatype?
I can add strings to it, but it won't let me update them.
↧