Valhalla Legends Forums Archive | Visual Basic Programming | Better way to do this?

AuthorMessageTime
Barabajagal
I just finished one of the most useful features ever in a chat client, which is preventing the chat textbox from scrolling down when the user has scrolled up, either to read or copy text. Everyone knows what I'm talking about, I'd guess. I just want to know if this is the best way to go about this, though.

First, I found out how to detect if the scrollbar is at the bottom of the textbox (using the GetScrollInfo API). That code looks a bit like:
[code]Public Function DetectScrollLoc(ByVal rtb As Long) As Boolean
Dim sInfo As SCROLLINFO
    sInfo.cbSize = Len(sInfo)
    sInfo.fMask = &H1 Or &H2 Or &H4
    GetScrollInfo rtb, 1, sInfo
    If sInfo.nPos >= sInfo.nMax - sInfo.nPage Then
        DetectScrollLoc = True
    Else
        DetectScrollLoc = False
    End If
End Function[/code]

Then, I of course, needed to apply this function. At first, I tried locking the chat RTB, but that made it look like crap, and removed the useful feature of the scrollbar on the right getting smaller when new text appears. So, I set out to find a way to add formatted text to the bottom of a rich text box without selecting it. However, selecting appears to be the only way to set colors in RTBs.

So what'd I do? I created a second rich text box, which I used as a "buffer" box. First, I set the TextRTF of the buffer box to the TextRTF of the normal box. Then, I add the new text to the buffer RTF like I would have normally for the regular one. Then, I set the TextRTF of the normal box to the TextRTF of the buffer box, thereby adding formatted text to the end without selecting anything in the normal text box. This worked fine for the first few minutes of chat. However, running times of the function soon reached 400 milliseconds. So, to fix this problem, I set up the function to apply all text formatting to a variable declared as a rich text box, which was set as the normal or buffer box, depending on if the function displayed above returned true or false. Now, the function runs at 16 ms on average (which is what it originally ran at) when the scrollbar is normal, and it runs a bit laggy when scrolled up a bit. However, that lag is unnoticeable since you're scrolled up :)

Anyway, is there a better way to do this in VB6? Maybe an API call that can be used to set the color of text from one location to another without selecting it or something along those lines?
September 8, 2007, 7:24 PM
Myndfyr
The way that I've done this in the past is to detect scroll and selection events, and delay the addition of new text until no text is selected and the scroll position is reset to the bottom.

This seems similar to what you're doing, but I noticed that you said something about 400ms.  I'm not really sure what that's about (I just kind of skimmed your post).

Might be something of interest to you.
September 9, 2007, 4:03 AM
Camel
I came up with some really long-winded solution that worked well. If I can find the CD with the source code to my old bot on it, I'll look it up.

By the way,
[code]
    If sInfo.nPos >= sInfo.nMax - sInfo.nPage Then
        DetectScrollLoc = True
    Else
        DetectScrollLoc = False
    End If
[/code]

can be condensed to:
[code]
    DetectScrollLoc = (sInfo.nPos >= sInfo.nMax - sInfo.nPage)
[/code]

While I doubt it will actually make any difference in the generated assembly, it will streamline your code a bit. There are schools of thought that say that's bad design though, so it's all just a matter of opinion/preference.
September 9, 2007, 6:58 AM
Barabajagal
I think I'll choose readability. Thanks for the suggestion, though.

MF: [quote author=Andy link=topic=17010.msg172465#msg172465 date=1189279444]
At first, I tried locking the chat RTB, but that made it look like crap, and removed the useful feature of the scrollbar on the right getting smaller when new text appears.[/quote]
September 9, 2007, 8:53 AM
FrOzeN
I wrote this at the start of August last year for StealthBot, and Stealth made a small correction to my code. You can find it here. The AddChat procedure only pulls you to the bottom of the RichTextBox when the scrollbar is at the bottom, if your haven't got the scrollbar at the bottom then it continues to add text correctly, but doesn't draw you to it. Enjoy. :)

EDIT - Added code to post.

Code:
[code]Option Explicit

'Code written by FrOzeN on 2/8/06
'Small correction by Stealth on 5/8/06

'Note: If your form (in this case, frmMain) is using Twips instead of pixels then line 5 should look like:
'  If (lngVerticalPos + (frmMain.rtbChat.Height / Screen.TwipsPerPixelY)) <= intRange Then

Private Const EM_GETTHUMB = &HBE
Private Const SB_THUMBPOSITION = &H4
Private Const WM_VSCROLL = &H115
Private Const SB_VERT As Long = 1

Private Declare Function GetScrollRange Lib "User32" (ByVal hWnd As Long, ByVal nBar As Integer, ByRef lpMinPos As Integer, ByRef lpMaxPos As Integer) As Boolean
Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function LockWindowUpdate Lib "User32" (ByVal hwndLock As Long) As Long

Public Sub AddChat(ParamArray saElements() As Variant)
    Dim blUnlock As Boolean, lngVerticalPos As Long, intRange As Integer
   
    GetScrollRange frmMain.rtbChat.hWnd, SB_VERT, 0, intRange
    lngVerticalPos = SendMessage(frmMain.rtbChat.hWnd, EM_GETTHUMB, 0&, 0&)
   
    If (lngVerticalPos + frmMain.rtbChat.Height) <= intRange Then  'Line 5
        LockWindowUpdate frmMain.rtbChat.hWnd
        blUnlock = True
    End If
   
    '// Your code here -------------------------------------------------
    Dim i As Integer
    For i = LBound(saElements) To UBound(saElements) Step 2
        With frmMain.rtbChat
            .SelStart = Len(.Text)
            .SelLength = 0
            .SelColor = saElements(i)
            .SelText = saElements(i + 1) & Left$(vbCrLf, -2 * CLng((i + 1) = UBound(saElements)))
            .SelStart = Len(.Text)
        End With
    Next i
    '-----------------------------------------------------------------//
   
    If blUnlock = True Then
        SendMessage frmMain.rtbChat.hWnd, WM_VSCROLL, SB_THUMBPOSITION + &H10000 * lngVerticalPos, Nothing
        LockWindowUpdate 0&
    End If
End Sub[/code]
September 9, 2007, 10:17 AM
Barabajagal
That screws up horribly when you try to select text...
September 9, 2007, 10:44 AM
BreW
not to mention that it doesn't work one bit :P...
And the code where it actually appends the text to the RTB should look something more like this.
[code]
    Dim i As Long
    For i = LBound(saElements) To UBound(saElements) Step 2
        With rtbChat
            .SelStart = Len(.Text)
            .SelColor = saElements(i)
            .SelText = saElements(i + 1)
        End With
    Next i
    rtbChat.SelText = vbCrLf
[/code]
September 9, 2007, 1:56 PM
Barabajagal
Brew, it works fine. Download the example program. The only problem is selection.
September 9, 2007, 7:54 PM
St0rm.iD
[quote author=Andy link=topic=17010.msg172501#msg172501 date=1189328026]
I think I'll choose readability. Thanks for the suggestion, though.
[/quote]

RONG.
September 10, 2007, 2:53 AM
Barabajagal
[quote author=Banana fanna fo fanna link=topic=17010.msg172520#msg172520 date=1189392786]
[quote author=Andy link=topic=17010.msg172501#msg172501 date=1189328026]
I think I'll choose readability. Thanks for the suggestion, though.
[/quote]

RONG.
[/quote]

Care to mention what's wrong, besides your spelling?
September 10, 2007, 3:00 AM
FrOzeN
Eh, when I originally wrote it for StealthBot it was designed on the basis that when you try to view previous conversations the scrollbar keeps jumping to the bottom which got annoying. When schools over (just over 6 weeks from now) I'm going to write a whole set of classes, one of which will be a huge focus on the RichEdit control, in that I'll look into appending text to a RichEdit box without affecting the user's current selection. I'll bring this topic up again if I solve it, and you haven't posted a solution by then.
September 10, 2007, 4:32 AM
Barabajagal
My current system is a solution. It just may or may not be the best one.
September 10, 2007, 4:42 AM
St0rm.iD
[quote author=Andy link=topic=17010.msg172521#msg172521 date=1189393210]
[quote author=Banana fanna fo fanna link=topic=17010.msg172520#msg172520 date=1189392786]
[quote author=Andy link=topic=17010.msg172501#msg172501 date=1189328026]
I think I'll choose readability. Thanks for the suggestion, though.
[/quote]

RONG.
[/quote]

Care to mention what's wrong, besides your spelling?
[/quote]

if x then
y = true/false
else
y = false/true

is universally recognized as bad code that should be written as y = x or y = not x. much more poetic that way, too
September 10, 2007, 7:55 PM
Barabajagal
I suppose. But I think it's easier to read, which is important in undocumented code ;)
September 10, 2007, 8:00 PM
Camel
[quote author=Andy link=topic=17010.msg172563#msg172563 date=1189454432]
I suppose. But I think it's easier to read, which is important in undocumented code ;)
[/quote]

If that's your issue, you could wrap the condition with CBool(...) so it's clear what it's doing.
September 10, 2007, 8:24 PM
Barabajagal
I suppose that'd work better, yes.

On a similar note, is it still correct to do it if it looks like this:
[code]
CheckIdleUser = CBool(ReadINI("Main", "UserIdleTime", "20", strConfig) > 0 And ReadINI("Main", "UserIdleGray", "Y", strConfig) = "Y" And GetTickCount \ 1000 - lvChannel.ListItems(UserIndex).SubItems(4) > ReadINI("Main", "UserIdleTime", "20", strConfig) * 60 And lvChannel.ListItems(UserIndex).ForeColor <> OtherApp.Error)
[/code]
?
September 10, 2007, 8:39 PM
Camel
Congratulations, you totally missed the point.

Replace the code you just cited without the convention, and it's still atrocious. GG no re.
September 10, 2007, 9:12 PM
Barabajagal
Naw, I used variables for the ReadINI values before.
September 10, 2007, 9:24 PM
BreW
[quote author=Andy link=topic=17010.msg172563#msg172563 date=1189454432]
I suppose. But I think it's easier to read, which is important in undocumented code ;)
[/quote]
see: https://davnit.net/bnet/vL/index.php?topic=16677.msg168793#msg168793
from that post on
September 10, 2007, 10:13 PM
Barabajagal
Brew... despite the minor topic relevance, wtf?
September 10, 2007, 10:24 PM
Camel
[quote author=Andy link=topic=17010.msg172573#msg172573 date=1189459487]
Naw, I used variables for the ReadINI values before.
[/quote]

And you should use variables in the contraction, as well. Your example is bad because of the lack of variables, not because of the contraction. Furthermore, no dimwit would be fooled by that logic trap. I'm not sure why you even post it.
September 10, 2007, 11:28 PM
BreW
[quote author=Andy link=topic=17010.msg172578#msg172578 date=1189463095]
Brew... despite the minor topic relevance, wtf?
[/quote]
My point was that throughout that entire topic, you said how you had no need for code readability, comments, documentation and anything like that at all, yet in this topic you argue that your version of that code is superior because of readabilty? IIRC you're the code poet, you don't need any amount of readabilty. And compressing your code as camel suggested would not only help make your code much more efficient (the vb6 compiler would actually product very different results) but make it not look plain stupid. Thanks. To be completely honest, I used to make code blocks like that myself... when i just started vb6...
September 10, 2007, 11:33 PM
Camel
[quote author=brew link=topic=17010.msg172581#msg172581 date=1189467237]
(the vb6 compiler would actually product very different results)
[/quote]
Can you support that statement? Not that I don't believe it, I just don't like to jump to conclusions.
September 11, 2007, 12:10 AM
Barabajagal
I don't need readability, other people might. And no, I've tried both ways, and the end compile result is the same.
September 11, 2007, 12:22 AM
St0rm.iD
[code]
CheckIdleUser = CBool(ReadINI("Main", "UserIdleTime", "20", strConfig) > 0
    And ReadINI("Main", "UserIdleGray", "Y", strConfig) = "Y"
    And GetTickCount \ 1000 - lvChannel.ListItems(UserIndex).SubItems(4) > ReadINI("Main", "UserIdleTime", "20", strConfig) * 60
    And lvChannel.ListItems(UserIndex).ForeColor <> OtherApp.Error)
[/code]

Not too bad.
September 11, 2007, 5:28 PM
Camel
You could accomplish the identical result with:

[code]
CheckIdleUser = CBool(ReadINI("Main", "UserIdleTime", "20", strConfig) > 0
CheckIdleUser = CheckIdleUser And ReadINI("Main", "UserIdleGray", "Y", strConfig) = "Y"
CheckIdleUser = CheckIdleUser And GetTickCount \ 1000 - lvChannel.ListItems(UserIndex).SubItems(4) > ReadINI("Main", "UserIdleTime", "20", strConfig) * 60
CheckIdleUser = CheckIdleUser And lvChannel.ListItems(UserIndex).ForeColor <> OtherApp.Error)
[/code]

Of course, in a language that short-circuits boolean operators, you'd want to put your safest/fastest operations first. Since VB doesn't, it doesn't matter unless the order of operations is relevant.
September 11, 2007, 6:01 PM
BreW
That code wouldn't work. You're forgetting a ) on the first line. Not only that, but also why would you be CBool()ing a value that's already a boolean...? And I'm not even mentioning half the other bad coding habits in that sample. I sware to god. If there were no such things as code optimizers we would all be dead because of crappy code. Back in the 70-80s if you wrote it like that you would have been shot.
September 11, 2007, 7:23 PM
Barabajagal
brew. Stuff it.

"Antiquis temporibus, nati tibi similes in rupibus ventosissimis exponebantur ad necem"
September 11, 2007, 7:43 PM
UserLoser
use constants make code cleaner and easier to read.
September 11, 2007, 7:54 PM
Barabajagal
*sigh* none of this is the important part. Can we try getting back to the topic of this topic?
September 11, 2007, 7:57 PM
FrOzeN
Horrible code. Just one thing I'll bother pointing out, the only thing that you are actually forcing a data type conversion (CBool()ing the whole equation) is already a boolean. You'd be better of forcing CInt() on your 1st and 3rd call to ReadINI().

Also, @Banana fanna fo fanna: When running code over numerous lines in VB6 you need to add " _" to the end of each line.
September 11, 2007, 8:46 PM
BreW
[quote author=Andy link=topic=17010.msg172631#msg172631 date=1189539795]
"Antiquis temporibus, nati tibi similes in rupibus ventosissimis exponebantur ad necem"
[/quote]

YAY

"In the times of old, the children like you were left to perish on the windiest crags."
September 11, 2007, 9:50 PM
Barabajagal
I'm not posting any more in this (or any topic) unless it's relevant to the topic's original post.
September 11, 2007, 9:55 PM
LW-Falcon
[quote author=Andy link=topic=17010.msg172652#msg172652 date=1189547747]
I'm not posting any more in this (or any topic) unless it's relevant to the topic's original post.
[/quote]And people would care why?
September 12, 2007, 4:02 AM
JoeTheOdd
[quote author=brew link=topic=17010.msg172628#msg172628 date=1189538626]
That code wouldn't work. You're forgetting a ) on the first line. Not only that, but also why would you be CBool()ing a value that's already a boolean...? And I'm not even mentioning half the other bad coding habits in that sample. I sware to god. If there were no such things as code optimizers we would all be dead because of crappy code. Back in the 70-80s if you wrote it like that you would have been shot.
[/quote]

I'm rolling on the floor laughing. Did you just tell Camel he has bad coding habits?!
September 12, 2007, 8:15 AM
BreW
[quote author=Joe[x86] link=topic=17010.msg172668#msg172668 date=1189584917]
[quote author=brew link=topic=17010.msg172628#msg172628 date=1189538626]
That code wouldn't work. You're forgetting a ) on the first line. Not only that, but also why would you be CBool()ing a value that's already a boolean...? And I'm not even mentioning half the other bad coding habits in that sample. I sware to god. If there were no such things as code optimizers we would all be dead because of crappy code. Back in the 70-80s if you wrote it like that you would have been shot.
[/quote]

I'm rolling on the floor laughing. Did you just tell Camel he has bad coding habits?!
[/quote]
...I guess. Realityripple too.

[code]
CheckIdleUser = CBool(ReadINI("Main", "UserIdleTime", "20", strConfig) > 0
     And ReadINI("Main", "UserIdleGray", "Y", strConfig) = "Y"
     And GetTickCount \ 1000 - lvChannel.ListItems(UserIndex).SubItems(4) > ReadINI("Main", "UserIdleTime", "20", strConfig) * 60
     And lvChannel.ListItems(UserIndex).ForeColor <> OtherApp.Error)
[/code]
i would rewrite like so
[code]
Public Function CheckIdleUser(blahblah) As Boolean
   If CLng(ReadINI("Main", "UserIdleTime", "20", strConfig)) Then 'wtf? the user is really going to have a negative idle time, huh. especially when your configuration dialog box is supposed to handle that. You should compare that value to 0. Actually, why not use the windows registry for something like this? It's made for this kind of thing. Even better, prefetch those values to global variables on startup.
      If ReadINI("Main", "UserIdleGray", "Y", strConfig) = "Y" Then
         If GetTickCount \ 1000 - lvChannel.ListItems(UserIndex).SubItems(4) > CLng(ReadINI("Main", "UserIdleTime", "20", strConfig)) * 60 Then
            If lvChannel.ListItems(UserIndex).ForeColor <> OtherApp.Error) Then CheckIdleUser = True
         End If
      End If
End If
End Function
[/code]

Efficiency is the key to productivity, and productivity is the key to success.
VB6 code, although very inefficient itself, should be optimized. Stop forcing your optimizer to do extra work for the sake of code readabilty. Keep it up, and the next generation of programmers might be that much more stupid.
September 12, 2007, 10:48 PM
FrOzeN
brew, shut up. Camel was posting code for readability, not minor changes to efficiency. Being that you are so genius at VB6, why didn't you pick up the slow string comparison?

[code]If ReadINI("Main", "UserIdleGray", "Y", strConfig) = "Y" Then[/code]
Should be:
[code]If AscW(ReadINI("Main", "UserIdleGray", "Y", strConfig) = 89 Then[/code]

EDIT - To be fair, I reread your post brew, and have to give you some credit for what you said. Based on the skill level I've seen you at, no comment, it's actually nice to see people such as you learning to optimize their code.
September 13, 2007, 12:28 PM
BreW
[quote author=FrOzeN link=topic=17010.msg172706#msg172706 date=1189686528]
brew, shut up. Camel was posting code for readability, not minor changes to efficiency. Being that you are so genius at VB6, why didn't you pick up the slow string comparison?

[code]If ReadINI("Main", "UserIdleGray", "Y", strConfig) = "Y" Then[/code]
Should be:
[code]If AscW(ReadINI("Main", "UserIdleGray", "Y", strConfig) = 89 Then[/code]

EDIT - To be fair, I reread your post brew, and have to give you some credit for what you said. Based on the skill level I've seen you at, no comment, it's actually nice to see people such as you learning to optimize their code.
[/quote]

Oh wow, I really didn't think about using Asc(). I'm not a genius at vb6, I'm just not stupid. The language itself is stupid. People who make stupid mistakes with such a stupid language really need to get smart.
And what is the skill level I'm at ? (well, what you say i am at, actually) Please, do tell.
September 13, 2007, 7:12 PM
MysT_DooM
lol
September 13, 2007, 9:02 PM
FrOzeN
[quote author=brew link=topic=17010.msg172679#msg172679 date=1189637309]Efficiency is the key to productivity, and productivity is the key to success.
VB6 code, although very inefficient itself, should be optimized. Stop forcing your optimizer to do extra work for the sake of code readabilty. Keep it up, and the next generation of programmers might be that much more stupid.[/quote]
[quote author=brew link=topic=17010.msg172714#msg172714 date=1189710749]Oh wow, I really didn't think about using Asc(). I'm not a genius at vb6, I'm just not stupid. The language itself is stupid. People who make stupid mistakes with such a stupid language really need to get smart.[/quote]First you said Camel has bad coding habits, and then all you really change from his code is a breaking it up into a few If statements and then through in some CLng()'s and talk about how efficient your code is. So I pointed out a simple flaw that any good coder who is optimizing code should pick up. Secondly, a string comparison isn't just a VB6 related thing, anyone should know comparing numbers is always faster than comparing strings regardless of the language (may* be some exceptions depending on how a string is defined in that language).

[quote author=brew link=topic=17010.msg172714#msg172714 date=1189710749]And what is the skill level I'm at ? (well, what you say i am at, actually) Please, do tell.[/quote]No comment was my comment, it was a sarcastic way of saying "shit".

Oh finally, if you carefully reread your sentence, you just told yourself to get smart.
"People who make stupid mistakes (like you did) with such a stupid language (what you called it) really need to get smart."
September 14, 2007, 5:51 AM
BreW
[quote]
First you said Camel has bad coding habits, and then all you really change from his code is a breaking it up into a few If statements and then through in some CLng()'s and talk about how efficient your code is. So I pointed out a simple flaw that any good coder who is optimizing code should pick up. Secondly, a string comparison isn't just a VB6 related thing, anyone should know comparing numbers is always faster than comparing strings regardless of the language (may* be some exceptions depending on how a string is defined in that language).
No comment was my comment, it was a sarcastic way of saying "shit".

Oh finally, if you carefully reread your sentence, you just told yourself to get smart.
"People who make stupid mistakes (like you did) with such a stupid language (what you called it) really need to get smart."
[/quote]

My version of the code is much different if you look closer, I wouldn't be surpised if it shaves an entire millisecond off of the execution time. Yeah, I know that a string comparison is slower. thanks. I just didn't SEE that or even think about that, one simple mistake. I was talking about the people who don't make an effort to make a program actually nice, so on.
By the way, I have reviewed your posts. From what I've seen, it appears that I'm actually on a much higher skill level then you. The first post you talk about code in was showing someone how to use an "If" statement. The last post where you actually spoke of code was a visual basic 6 implementation of creating a rich edit box. In C++, too. Come on, I've done that about a year ago. And I didn't have any problems with it either. It's very easy, actually. Throughout your posts, you just talk about visual basic, visual basic, blah blah, and nothing ever about C or a better language ? Oh sorry, PHP too. a web *scripting* language. Not to bash PHP or anything, but the average PHP developer has the IQ of a stone. And they generally don't have any idea of what they're doing. So please, if you want to flame me, put in more effort at least. And consider your own skill level before posting about someone else's skill level.
September 14, 2007, 7:31 PM
Barabajagal
NONE OF THIS IS IMPORTANT. I WANT TO KNOW IF THERE'S A BETTER WAY THAN USING A SECOND RICH TEXT BOX, NOT HOW TO NITPICK VB CODE. ARGH~!
September 14, 2007, 7:36 PM
Spht
[quote author=Andy link=topic=17010.msg172767#msg172767 date=1189798582]
NONE OF THIS IS IMPORTANT. I WANT TO KNOW IF THERE'S A BETTER WAY THAN USING A SECOND RICH TEXT BOX, NOT HOW TO NITPICK VB CODE. ARGH~!
[/quote]

Yes, of course there are.  there are much better ways.  now, back to the nitpicking vb code
September 14, 2007, 7:40 PM
Barabajagal
Fuck it. I give up on asking here for help.
September 14, 2007, 7:56 PM
FrOzeN
[quote author=brew link=topic=17010.msg172766#msg172766 date=1189798292]From what I've seen, it appears that I'm actually on a much higher skill level then you.[/quote]Granted. From what you've seen of me I say your assumption is feasible. That however, does not make it correct. Being that I can't really back any statement of me being a more skillful than you as a programmer without going out of my way, I'll leave you to believe what you like. Though, being that you say you could create things like RichEdit boxes in C++ about a year ago, I find it funny how you still don't know how to use debugging tools in C++. :-\
September 14, 2007, 8:54 PM
BreW
[quote author=brew link=topic=17010.msg172766#msg172766 date=1189798292]Though, being that you say you could create things like RichEdit boxes in C++ about a year ago, I find it funny how you still don't know how to use debugging tools in C++. :-\
[/quote]
Simple. I don't make a mistake. If I do happen to make a mistake, then I review the code I believe to be at fault. When I find the problem, and usually I do, I fix it. Nothing more. The only time I've ever had to actually debug, is when I had that nasty sprintf problem (my value was -1 and it was converted from an unsigned char to a long, therefore overflowing my buffer, i had to just add a cast to an unsigned char (even though it was declared that from the beginning)).
September 15, 2007, 12:19 AM
Explicit[nK]
[quote author=brew link=topic=17010.msg172778#msg172778 date=1189815583]
[quote author=brew link=topic=17010.msg172766#msg172766 date=1189798292]Though, being that you say you could create things like RichEdit boxes in C++ about a year ago, I find it funny how you still don't know how to use debugging tools in C++. :-\
[/quote]
Simple. I don't make a mistake.[/quote]

I'm sorry, but LOL!

Gone off-topic, anyway.
September 15, 2007, 3:17 AM
BreW
[quote author=Explicit[nK] link=topic=17010.msg172788#msg172788 date=1189826274]
[quote author=brew link=topic=17010.msg172778#msg172778 date=1189815583]
Simple. I don't make a mistake.
[/quote]
I'm sorry, but LOL!
Gone off-topic, anyway.
[/quote]

[quote author=brew link=topic=17010.msg172778#msg172778 date=1189815583]
If I do happen to make a mistake, then I review the code I believe to be at fault. When I find the problem, and usually I do, I fix it.
[/quote]
September 15, 2007, 2:14 PM
Explicit[nK]
[quote author=brew link=topic=17010.msg172806#msg172806 date=1189865651]
[quote author=Explicit[nK] link=topic=17010.msg172788#msg172788 date=1189826274]
[quote author=brew link=topic=17010.msg172778#msg172778 date=1189815583]
Simple. I don't make a mistake.
[/quote]
I'm sorry, but LOL!
Gone off-topic, anyway.
[/quote]

[quote author=brew link=topic=17010.msg172778#msg172778 date=1189815583]
If I do happen to make a mistake, then I review the code I believe to be at fault. When I find the problem, and usually I do, I fix it.
[/quote]
[/quote]

LOL x2!
September 15, 2007, 8:09 PM
BreW
Name one time when I haven't.
September 15, 2007, 11:17 PM
Barabajagal
Sooo.... Back on topic.
Should I make it automatically scroll to the bottom if the user sends text themselves, or should it stay scrolled up? I can see reasons for either way.

And if this topic keeps going the way you guys are taking it, I'll lock it -.-
September 16, 2007, 12:06 AM
warz
Generally, when you're faced with a decision that should be left up to the user, because it's entirely preferential, it's best to make this something alterable through a configuration setting.
September 16, 2007, 1:16 AM
Barabajagal
Most things are, but they confuse the user (and many users ignore all the settings altogether). What should the default be, then?
September 16, 2007, 1:54 AM
warz
Well, mirc's default is to preserve scroll bar positioning, even through text being sent or received. Like I said, it's all preference. You're writing the client - you decide.
September 16, 2007, 3:03 AM
Barabajagal
First, I need to find room for one more checkbox... My settings window is WAY overpopulated, and I've got other things I want to make optional, too. I suppose I'll make it scroll down on sending by default, since that's what the official clients do.
September 16, 2007, 3:19 AM
rabbit
[quote author=Andy link=topic=17010.msg172826#msg172826 date=1189912747]
First, I need to find room for one more checkbox... My settings window is WAY overpopulated, and I've got other things I want to make optional, too. I suppose I'll make it scroll down on sending by default, since that's what the official clients do.
[/quote]Tabs.
September 16, 2007, 4:05 AM
Barabajagal
...I don't think you understand... My options window has nearly maxed out the number of elements allowed on a form in VB6.

My Options Window: http://realityripple.com/Uploads/Options
September 16, 2007, 5:23 AM
BreW
[quote author=Andy link=topic=17010.msg172829#msg172829 date=1189920237]
...I don't think you understand... My options window has nearly maxed out the number of elements allowed on a form in VB6.

My Options Window: http://realityripple.com/Uploads/Options

[/quote]

Oh wow, your client selection takes up 15x more controls then it should... I recommend using a ComboBoxEx.
September 16, 2007, 2:07 PM
rabbit
[quote author=Andy link=topic=17010.msg172829#msg172829 date=1189920237]
...I don't think you understand... My options window has nearly maxed out the number of elements allowed on a form in VB6.

My Options Window: http://realityripple.com/Uploads/Options

[/quote]O god..not only is that totally inefficient, it's totally hideous!
September 16, 2007, 3:54 PM
Barabajagal
I'm not gonna use a combo box! I love that layout for selecting clients. It looks much friendlier.
September 16, 2007, 6:42 PM
rabbit
You have stuff in there that has no purpose (spawn?  Starcraft Shareware?)  You could also merge Public and Private greetings (* for user = anyone not specified maybe?)  And you should take out "Partings" altogether.
September 16, 2007, 7:06 PM
Barabajagal
I support every form of every client. I'm not removing support for no reason.
The greetings idea may not be such a bad idea, and I've had numerous request for partings, which is why they're there.
September 16, 2007, 7:17 PM
rabbit
Starcraft Shareware was REPLACED, by STARCRAFT.  It's not even officially supported anymore.  And spawn was blocked long ago.  Its only use in the first place was to play games, and never to chat or use Battle.net as a normal user would.
September 16, 2007, 8:32 PM
Barabajagal
You can still connect and chat with them, so I support them.
September 16, 2007, 8:42 PM
BreW
my bot supports starcraft shareware too....
September 16, 2007, 10:27 PM
rabbit
And guess what?  I group both of you into the same group: stupid programmers.
September 17, 2007, 4:00 AM
Barabajagal
Not my fault your grouping is t3h fail. And this topic is once again not on the topic at hand, so locked.
September 17, 2007, 4:08 AM

Search