yes this is the code you gave me on other thread, and im using this code in my real project and this is working in XP, but not working in 98
pls take this to home and solve this issue :(
Printable View
yes this is the code you gave me on other thread, and im using this code in my real project and this is working in XP, but not working in 98
pls take this to home and solve this issue :(
Right.
I went to my old Win98 system, where I found RICHTX32.OCX in windows\system (not in system32).
It is a completely different file. So I opened a Command window and cd'd to \windows\system.
Then regsvr32 richtx32.ocx /u to unregister the old one
ren richtx32.ocx richtx32.old to keep it in case of problems
Then copy the new richtx32.ocx to c:\windows\system
Then regsvr32 richtx32.ocx to successfully register the new ocx
After that your little testprogram worked like a charm.
Check out what Win98 you have. Mine wasn't even Win98SE. So if you have SE, things might be different, but still I think the RICHTX32.ocx is to be replaced in much the same manner as I described.
WoF,
you gave me some releaf by saying it worked in your Win98 by replacing the ocx, i will do all the steps tommorow. And then i will tell you, what do you mean by Win98SE?
It was called Windows 98 Second Edition, or short Win98 SE.
There were lots of improvements implemented. I think Networking was more reliable, and whatnot...
There might be differences even in some ocx files, I'm not sure.
But replacing the RICHTX32.ocx should work in SE, too, if it worked in Win98.
They went from the RTB 2.0 to the RTB 3.0 Specifications. That's the difference, if you want to look them up.
i did everything you said but it is not working in my Win98 :cry: first i unregistered richtx32.ocx by the command you wrote. then rename it to .old after that copy new richtx32.ocx from XP to c:\windows\system and then registered new .ocx using command regsvr32 richtx32.ocx, but my sample program still not working as expected :( . Does it mean my Win98 is Win98SE?Quote:
Originally Posted by WoF
if it is then how to know it is SE
Right click on My Computer, select Properties. It should say after a few seconds down near the bottom of the window above the memory.
WinSE is second edition, so it should be more advanced than Win98
yes David,
it is Second Edition, in properties it show
what to do now, but why this code is not working in Change event if RTB is changed on Form_Load event? It works if i type something in RTB and also works if i put this code onCode:Microsoft Windows 98
Second Edition
4.10.2222 A
and also works on RTB_Mousemove event.Code:Command1_Click
Does it really work on Win XP at Form_Load()?
Seems to me, it would not work because at Form_Load() the RTB is not yet visible and therefore the code does not grip. So you'd have to make a workaround. If it works if you type in the Box, it is proven that the code is ok.
yes it is working at form_load on XP because i have this code on this event.
yes code is ok but something strange happening in SE, this code works in my Win98 on mousemove event. shall i move my mouse pointer on RTB on Form_Load(), or i should check this code on Gotfocus?Code:Private Sub Form_Load()
rtb.Text = rtb.Text + "something"
End Sub
You say the relevant code is in the RTB_Change() event?
We can try and move the code from Form_Load() to the Form_Activate event then.
The Static variable is to make sure we execute the code only once, because Form_Activate() can be called everytime the Form regaines Focus.Code:Private Sub Form_Activate()
Static PassedYet as Boolean
If Not PassedYet Then
RTB.Text = RTB.Text + "something"
PassedYet = True
End If
End Sub
still not working code is
i think we should move the mouse poiner to Rtb_mousemove on form_loadCode:Private Sub Form_Activate()
Static PassedYet as Boolean
If Not PassedYet Then
RTB.Text = RTB.Text + "something"
PassedYet = True
End If
End Sub
Private Sub RTBQUE_Change()
Dim f As Long
Dim h As Long
h = Me.TextHeight("A")
Do
rtbque.SelStart = 0
rtbque.SelStart = Len(rtbque.Text)
f = SendMessage(rtbque.hwnd, EM_GETFIRSTVISIBLELINE, 0&, 0&)
If f > 0 Then rtbque.Height = rtbque.Height + h * f
Loop While f > 0
End Sub
Why not simply Call RTBQE_Change in Form_Load() or Form_Activate()?
i will try them
i tried Call RTBQUE_Change() on Form_Load() And Form_Activate() it does not increase the height of the RTB but it moves the code to the Last line. if i use anyother code in place of above required code that code works on Rtb_Change only this code is not working as explected, But it works only on one Condition if i have a msgbox on the first line of RTBQ_CHANGE like
Code:Private Sub RTBQUE_Change()
MsgBox "Something" 'If this msgbox is removed then code will not work in Win98 if this msgbox is not removed then this code works in Win98 in all expected manner
Dim f As Long
Dim h As Long
h = Me.TextHeight("A")
Do
rtbque.SelStart = 0
rtbque.SelStart = Len(rtbque.Text)
f = SendMessage(rtbque.hwnd, EM_GETFIRSTVISIBLELINE, 0&, 0&)
MsgBox "F = " & f
If f > 0 Then rtbque.Height = rtbque.Height + h * f
Loop While f > 0
End Sub