Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: BorT on June 15, 2004, 12:34 PM

Title: Freeze a richtextbox so the text doesnt appear, then unfreeze
Post by: BorT on June 15, 2004, 12:34 PM
Hey, what im basically trying to do is make it so that a certain interval it locks the richtextbox and doesnt display the text that has come through when it was locked and then unlock it, kinda like stealths Chat filters..When there enabled it doesnt display anything in the chat screen until you disable the chat filters..
Title: Re:Freeze a richtextbox so the text doesnt appear, then unfreeze
Post by: hismajesty on June 15, 2004, 12:42 PM
RichText1.Enabled = False
Title: Re:Freeze a richtextbox so the text doesnt appear, then unfreeze
Post by: CrAz3D on June 15, 2004, 01:40 PM
Don't add anything to the RTB if a public boolean = true?...
IE:

'This should be in a module
Public LockChat as boolean


'This should in you "AddChat" type function
If LockChat = True then Exit Sub
Title: Re:Freeze a richtextbox so the text doesnt appear, then unfreeze
Post by: BorT on June 15, 2004, 02:34 PM
Thanks CrAz3D, thats what I was looking for.
Title: Re:Freeze a richtextbox so the text doesnt appear, then unfreeze
Post by: CrAz3D on June 15, 2004, 03:05 PM
Straight up dawg
Title: Re:Freeze a richtextbox so the text doesnt appear, then unfreeze
Post by: Networks on June 15, 2004, 06:18 PM
Shouldn't this  be in the visual basic forum?
Title: Re:Freeze a richtextbox so the text doesnt appear, then unfreeze
Post by: hismajesty on June 15, 2004, 08:45 PM
Quote from: BorT on June 15, 2004, 02:34 PM
Thanks CrAz3D, thats what I was looking for.

That's not what you asked for, well you did but not clearly.  :-\
Title: Re:Freeze a richtextbox so the text doesnt appear, then unfreeze
Post by: Eli_1 on June 15, 2004, 09:01 PM
This whole time I thought he was asking for:


Private Declare Function LockWindowUpdate Lib "user32" Alias "LockWindowUpdate" (ByVal hwndLock As Long) As Long

' Lock
LockWindowUpdate RichTextBox1.hWnd

' Unlock
LockWindowUpdate ByVal 0&
Title: Re:Freeze a richtextbox so the text doesnt appear, then unfreeze
Post by: FrOzeN on June 16, 2004, 12:34 AM
in your AddChat function in the module just stick it in a If Then

eg..

Public Function AddChat(some stuff here etc..)
  If mnuLock.Checked = False Then

*add chat code*

  End If
End Function


that will make when the menu section "mnuLock" if its checked it will AddChat if its not it won't that enough help?
Title: Re:Freeze a richtextbox so the text doesnt appear, then unfreeze
Post by: Dyndrilliac on June 17, 2004, 01:40 PM
That's exactly what Cr4z3d posted except he used a variable instead of a menu control...