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..
RichText1.Enabled = False
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
Thanks CrAz3D, thats what I was looking for.
Straight up dawg
Shouldn't this be in the visual basic forum?
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. :-\
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&
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?
That's exactly what Cr4z3d posted except he used a variable instead of a menu control...