Re: Code not running Win98
Maybe Win98 has an older RichTextBox control.
Compare the files RICHTX32.ocx of both operating systems.
You find them in c:\windows\system32 folder. I guess the Win98 one might be older.
To try it, unregister the old ocx, (keep a copy of RICHTX32.ocx as .old to be able to restore matters).
To unregister type regsvr32 /u richtx32.ocx at the dos prompt
copy the newer richtx32.ocx to the windows\system32 folder of your win98 system
Register it: type regsvr32 richtx32.ocx at the dos prompt.
If all was successful you might try your app now in win98.
If you make an installation package using the PDWizard, it will include the new ocx in the package anyway. When installing on Win98 I think the user will be asked if the newer file is to be installed or the older one to be kept. So if your proof has been successful, an installation would be possible on Win98 system.
Re: Code not running Win98
i will check it tommorw in office. thanks WoF
1 Attachment(s)
Re: Code not running Win98
i hve matched both ocx but they are same, im also uploading them
Re: Code not running Win98
Ok, so we obviously are at the wrong end.
The SendMessage() function resides in the user32.dll, maybe this is the traitor.
But replacing the user32.dll sounds a little dangerous to me, since a lot of other functions in Windows OS relate on it.
You could try to replace the dll on an experimental base with the new one from WinXP, but keep the old one in case you have to switch back.
You need not register the dll, simply replace it in the system32 folder.
On the other hand: what exactly is the error?
I remember the problem. You resize a RTB until the first line is visible.
So check what f = SendMessage(RichBox.hWnd, EM_GETFIRSTVISIBLELINE, 0&, 0&) returns with the debugger.
Re: Code not running Win98
You don't want to replace the file. They're not the same.
Re: Code not running Win98
Thought so. :rolleyes:
Better to go deeper into debugging to find out what's going wrong.
Re: Code not running Win98
I think the rtb is different as well, even if you replace it. It doesn't install.
Re: Code not running Win98
WoF, if you tell me then i will try to replace the User32.dll from XP to 98. there is no error in the code i have just set the height of RTB to 255 at design time and its height is changes itself by the code you gave me. it works fine in XP but in 98 it does not change its height itself by the above written code.
i will replace the user32 if you tell me to do it in your next post because im afraid to do it :(
dglienna,
did you mean that both ocx files are not same?
actully i did not replaced ocx file from XP to 98, i just checked their properties and version and all, i found everything same even size. thats y i thought they are same. i also downloaded richtx32.ocx from internet and found that one similar to the both of 98 and XP.
i dont know what to do
Re: Code not running Win98
Re: Code not running Win98
Shall i change SendMessage to SendNotifyMessage Or SendMessageCallback?
in XP code is working fine with these three API functions. shall i try this on 98 also?
Re: Code not running Win98
i changed SendMessage to SendNotifyMessage And SendMessageCallback in 98 but still the same problem :cry:
Re: Code not running Win98
i got this in MSDN, may be it has some hint
Code:
EM_GETFIRSTVISIBLELINE
This message is sent by an application to determine the uppermost visible line in an edit control.
EM_GETFIRSTVISIBLELINE wParam = 0; lParam = 0;
Parameters
This message has no parameters.
Return Values
The return value is the zero-based index of the uppermost visible line in a multiline edit control. For single-line edit controls, the return value is the zero-based index of the first visible character.
Requirements
Runs on Versions Defined in Include Link to
Windows CE OS 1.0 and later Winuser.h
Note This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.
1 Attachment(s)
Re: Code not running Win98
i tried the code in a new project as trial basis on Win98, and it is working, but why it is not working in my real project?
i tell you what problem it is having, i have this code in the Change event of RTB, and in RTB im putting data from another form on Form_Load event, and change event of RTB is Fired but code does not executes, if i type something in RTB then code executes and also code executes if i put above code on CommandButton and click it, but i dont want to click anything, i want it to work on Change Event.
this is the problem i have found yet. Pls solve this :(
Re: Code not running Win98
The code in this zip file... is it the code that does not work on Win98?
If so, I'll take it home tonight, where I still have an old Win98 computer and try it.