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

Calendar control not showing the number of days(date value) in window7

$
0
0
Hello


I have a VB application and using calendar control. It working fine on window xp (development machine) but when I try to run it on window 7 (32 bit), it is not showing the days and number of date. It show only dot (.) in date columns of calendar.

I have also checked that mscal.ocx and mscomct2.ocx are proper registered. I have also checked the fonts that it resides on the system.

Someone help me that why calendar control behave like this, not showing the number date/days.


Thanks
Regards
Mudasser

Graphical drawing issue

$
0
0
Hi,

we have on some computer the problem that the GUI are not displayed correct (See Attachment).
The Operatingsystem ist Windows 7. Not all computer have the Problem.

Attachment 97885
Attachment 97887

Has anyone an idea what could be the reason for this error?
Best Regards
ToBs
Attached Images
   

Writing to document, tabulation not working properly

$
0
0
I am trying to write some text to a document, separated by tabs. It works fine until a certain point, where I get the error: "The field is too small to accept the amount of data you attempted to add. Try insterting or pasting less data".

The message is pretty clear. However, I don't know why it occurs. My code is as follows. The error occurs in the line marked in bold.

Plotdata.AddNew
Plotdata!Command = "\tqr\tx" & 0 * twips & "\tab Km_start" 'Km_start
Plotdata!Command = Plotdata!Command & "\tqr\tx" & Round(3 * twips, 0) & "\tab Afst1" 'KH
Plotdata!Command = Plotdata!Command & "\tqr\tx" & Round(4 * twips, 0) & "\tab L1" 'SH

Plotdata!Command = Plotdata!Command & "\tqr\tx" & Round(6 * twips, 0) & "\tab Afst2" 'KH
Plotdata!Command = Plotdata!Command & "\tqr\tx" & Round(7 * twips, 0) & "\tab L2" 'SH

Plotdata!Command = Plotdata!Command & "\tqr\tx" & Round(9 * twips, 0) & "\tab Afst3" 'KH
Plotdata!Command = Plotdata!Command & "\tqr\tx" & Round(10 * twips, 0) & "\tab L3" 'SH

Plotdata!Command = Plotdata!Command & "\tqr\tx" & Round(12 * twips, 0) & "\tab Afst4" 'KH
Plotdata!Command = Plotdata!Command & "\tqr\tx" & Round(13 * twips, 0) & "\tab L4" 'SH

Plotdata!Command = Plotdata!Command & "\tqr\tx" & Round(15 * twips, 0) & "\tab Afst5" 'KH
Plotdata!Command = Plotdata!Command & "\tqr\tx" & Round(16 * twips, 0) & "\tab L5" 'SH
Plotdata.Update


The strange thing is that this error does NOT occur, if I comment out the lines above, and only execute the following code:

Plotdata!Command = Plotdata!Command & "\tqr\tx" & Round(15 * twips, 0) & "\tab Afst5"
Plotdata!Command = Plotdata!Command & "\tqr\tx" & Round(16 * twips, 0) & "\tab L5"


This works fine, even though I do not change how far the text is tabulated (15*twips).
All this seems VERY strange to me! Did I miss anything?

Best regards

Webbrowser Control Hung On Specific Page :(

$
0
0
Greetings everyone ..

hope all are fine on this forum.

i am facing a wired issue..

am i tiring to load a page in web browser control but it goes hung for few sec 10-25sec then it get ready/loads..
but in Firefox the page loaded instantly..

can any one tell me where is the issue?

i have attached the web page that i trying...

thanks in advance for upcoming help..

best regards
Attached Files

can't find entry point of procedure lstrcatI in MSDART (windows 7)

$
0
0
Hello,

We are currently changing the standard OS on all new computers from windows xp to windows 7. When I installed the program in question (a vb6 application) on older pc's with XP, both the setup and program worked fine but when I try to install it on windows 7 I get the following error: "can't find entry point of procedure lstrcatI in MSDART.dll".

Any help would be greatly appreciated.

Kind regards,

Bart

trying to copy entire floppy to E folder

$
0
0
I am trying to move the entire floppy to network storage to make the retreival of data easier.

This is the coded i have to do it that isnt functioning, it is giving me a bad file name error.

what am i doing wrong?

Code:

Private Type Info 'general patient info
label As String * 12
Name As String * 30
gender As String * 1
addr As String * 30
Location  As String * 30
Birth As String * 8
phone As String * 12
work As String * 12
Clear As String * 28
Ephone As String * 12
Ework As String * 12
Ename As String * 38
SS As String * 11
C As String * 18
id As Integer
Email As String * 30
End Type
Private Sub Command1_Click()
Dim udtInfo As Info
Open "a:\patient.txt" For Random As #1 Len = 512
Get #1, , udtInfo
With udtInfo
FileCopy "A:\*.*", "v:\" & udtInfo.id
End With
End Sub

my 1/x button is not working

$
0
0
Hi EV1~

im trying to make the code for 1/x for my calculator somehow when i put this code there is an error says variable not defined..when im trying to define the variable still it doesnt show the answers:

Dim 1/x as double

Case 1/x : lblDisplay = CStr(1 / dblSecondOperand)

Make VB wait till a specific window closes

$
0
0
How do I make VB wait till a specific window is closed.

I call a report that is shown on the screen. I can get the handle of the window in which the report is shown. How can I make my VB6 app wait until the specific window is closed?

I need to ask the user a question once he viewed/printed the report so the program must pause right after calling the report and then continue asking the question once the user closes the report window.

Listbox ItemData Question

$
0
0
Can I put a negative value in the ItemData Property?

The listbox's ItemData is initialized with positive numbers which I will not know what they are as they are initialized in the ItemData property at the time the Listbox.AddItem is executed.

Later if certain circumstances arise I want to make the value negative to indicate that this entry is not to be used until it's ItemData property becomes positive again

If yes, how do I make a positive number negative and a negative number positive?

VB6 - ADODC - User defined type not defined - Win 7 SP1 64 bit

$
0
0
Hi Everyone,

I am getting error ‘User-defined type not defined’ on VB6 ADODC control.
I am getting this error while double-click on adodc control which is placed on a new form on a new VB6 project.
My machine is a 64 bit Win 7 SP1.

From web search results, I realised that so many people raised this issue, but didn’t found a proper solution for this issue on any of the posts.

If anyone knows how to solve this issue, please reply me at the earliest.

Thanks in advance

Regards
Joby

VB6 Reference Missing

$
0
0
Hi Guys,
I need your help badly...

Here's my setup:
VB6 Pro running in Windows 7.

I have created programs and been running them for awhile until last week where i cannot load them anymore.
No errors , it just say VB6 not responding and closes the vb6 app.

Here's some scenarios:
1. if i open my project, it doesnt continue without error, only says vb6 not responding and closes the vb6 app.
2. if i delete the comctl32.ocx from syswow64 and open the project again, it opens and prompt for missing "comctl32.ocx" and loaded the program. but cannot run due to missing comctl32.ocx.
3. reload comctl32.ocx and register thru regsvr32 command
4. run step 1, same result.
5. open new project, add component "microsoft windows common control 5.0 (sp2)" by clicking projects-components. but when checking the reference, it will say missing "microsoft windows common control 5.0 (sp2)".

Please help...
any inputs is very much appreciated.

extract url links from text1 multilin

$
0
0
hi allz need help plz
i have multiline text1 and all html data is in text1.text it is multiline , it has links i need to extract

i need to extract all links containing .rar , .html please

i need simple command1 button when i click it , the links should get populated to text2.text multiline thanks.

Make crash on windows 7 x64

$
0
0
Hi All,

Sorry if this has already been answered, but I've spent a couple of days searching and not come up with this problem anywhere else so far.

I recently setup Visual Basic 6 on windows 7 x64, which is fine. I installed sp6, everything has been done as admin, and a number of ocx's where manually registered into the syswow64 folder.

Our vb projects open fine on these machines (I have 3 setup), and build without problem.

However, when I attempt the build the application from the command line using vb6 /make, I get no output (except a blank log file when using that open), and the event log shows there was an app crash in vb6.

Faulting application name: VB6.EXE, version: 6.0.81.76, time stamp: 0x3592011f
Faulting module name: VB6.EXE, version: 6.0.81.76, time stamp: 0x3592011f
Exception code: 0xc0000094
Fault offset: 0x00082a61
Faulting process id: 0x970
Faulting application start time: 0x01ce24f8b00fdb2f
Faulting application path: C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.EXE
Faulting module path: C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.EXE
Report Id: ef0f90e7-90eb-11e2-9297-00155d002907

If I create a new vb6 app, with no ocx controls, then I have no problems. But as soon as I add the controls needed then this crash occurs again.
The following are a list of the controls. I have tried a few of these on their own, and in various combinations with no joy.

Microsoft Common Dialog Control 36.0 (SP6) - comdlg32.ocx
Microsoft Forms 2.0 Object Library - fm20.ocx
Microsoft Hierarchical FlexGrid Control 6.0 (SP4)(OLEDB) - mshflxgd.ocx
Microsoft Rich Textbox Control 6.0 (SP6) - richtx32.ocx
Microsoft Tabbed Dialog Control 6.0 (SP6) - tabctl32.ocx
Microsoft Windows Common Controls 5.0 (SP2) - comctl32.ocx
Microsoft Windows Common Controls 6.0 (SP6) - mscomctl.ocx
Microsoft Windows Common Controls-2 6.0 (SP6) - mscomct2.ocx
Microsoft Windows Common Controls-3 6.0 (SP4) - comct332.ocx
Outrider SpinButton Control - spin32.ocx
Sheridan 3D Controls - threed32.ocx

After this, I tried some other random controls, trying to use something that I did not have to manually install myself, I managed to get a test application building using;

Microsoft Calender Control 8.0 - mscal.ocx

but a number of others displayed the same issue.

This one has me stumped, and I am about to try and uninstall all the controls I manually installed and try again, but given that it fails on controls I didn't install also, I doubt this will fix. And the fact that it builds\runs fine from within the IDE just does my head in.

Does anyone have any ideas? Has anyone come across a similar issue before?

Any assistance is great appreciated.

Scaling of forms is off

$
0
0
A client got a new computer, Windows 7 with an HP TouchSmart screen. Our VB6 app is being cut off on the left and bottom on almost all screens/forms. The screen resolution is currently set to 1600 x 900 but this appears to be at any resolution and any theme, even Windows Classic.

Does anyone have any experience with this or how to resolve this issue?

Pasting a bmp or jpg into a picturebox?

$
0
0
Hello there everyone. I am working on a project that lets me draw on a picturebox so I can use it to teach lessons on a touch screen computer. I have a picturebox called DrawPicture, and I was wondering about bmp and jpg picture files. Sometimes I have to work with them, and instead of opening a separate prog to open them, is there a way to paste a picture onto the picturebox? I know VB6 can load bmp and jpg and gif pictures by doing load picture, but can I paste pictures into it?

That would be awesome, as if I needed a picture off google to show an example of something like climate change to students, I could just copy it and paste into the picturebox. Thanks!

String comparison problem

$
0
0
Hi... I am trying to make a code for a html tag validation program. I am using two text files loaded to a rich text box. One for all html tags ( such as <html>,</html> etc.,) and another file is my html coding file. When i press validate button, the tags from the html tag file is stored in an array and the texts from my html coding file will be stored as a single string in a variable and i am extracting the strings from it using Instr function.
I am using the following code

For j = 0 To (i - 1)
Open File_Path For Input As #1 ' File path is my html file's location
Do Until EOF(1)
Line Input #1, Data
If InStr(1, Data, Syntax_Array(j), vbTextCompare) Then flag = 1
Loop
Close #1
If flag = 0 Then MsgBox Syntax_Array(j) + " Error"
flag = 0
Next

My code works correctly for all conditions. My syntax file has a large syntax which may or may not be used in my html code. For example, if i am not using the tag <b> and </b> in my html code but it will be present in my syntax file. For this situation my could should say nothing but it displays "<b> Error and "</b> Error>" Please help me in resolving this issue.

How to get row property wihtout looping?

$
0
0
Using flexgrid I have this table

accno | name
001 | Jose
002 | Juan
003 | Ken

Given the accno, I can get the row of a record in the grid using For loop

For x = 1 to grid.Rows - 1
If grid.Textmatrix(x, 0) = [the given accno] Then [required row] = x
Next

Can I obtain same output without looping?

Biinary issue when try to register ocx file

$
0
0
Hi Friends,
When i tried to Register ntwdlib.dll . it says The Module "ntwdlib.dll" failed to load.Make Sure the Binary is stored at the specified path or debug it to check for problems with the binary or dependent .Dll Files . let me know please .
Attached Images
 

Is there a way to have set where the end of the mouse cursor is?

$
0
0
Hi there everyone. I have a minor issue, so it is ok if it is something that cannot be changed. I am working on a tool that I can write on when teaching on a touch screen computer, and I changed the icon for the form into a larger pencil shaped icon. This custom one, is prob about 3 times as big as the default white arrow that Windows has. It loads up great, but when I am "drawing" on a picturebox on my form. (The pic box is called DrawPicture), the mouse cursor has the "ink" coming out of the very center of the cursor, and not the top left tip of the custom pencil cursor. I was wondering if there was a way to play with the position the mouse curor edge /point is? You know what I',m talking about? I guess it is sort of the contact point or something?

Can that be adjusted? Thanks!

Printing to label printer using 'Open' and port name

$
0
0
Hi everyone. I have a label print which prints from a prn file, as in:

Code:

    Open "LPT1:" For Output As #1
    Print #1, strStringToPrint
    Close #1

On entering a valid printer port eg. USB003 or ESDPRT001 (as found on my computer) it prints text on the VB6 formAttachment 97925

I have tried
Code:

For Output Access Write As #1
but it still does send the codes to the printer.

Any help gladly received, thank you.
Attached Images
 
Viewing all 21185 articles
Browse latest View live


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