IP Based SEVERLESS Chat.. - Page 4
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 4 of 4 FirstFirst 1234
Results 46 to 56 of 56

Thread: IP Based SEVERLESS Chat..

  1. #46
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,723

    Re: IP Based SEVERLESS Chat..

    Well, seems to be still some problem there.
    When I try to compile the exe, which I must, to run it on my second PC, it gives me an error: "Wrong number of dimensisons" in this line:

    For SNo = 0 To UBound(Smilie(0))

    Edit: in the Private Sub Do_Smilie(StartLoc As Long, Length As Long) which appears two times within the program.

    I first thought UBound was used wrong here and changed it to Ubound(Smilie, 0) which should deliver the UBound of the first dimension in the array (being 1, I guess since it is dimmed Smilie(1,9)). With this it compiles, but then giving me a runtime error.
    I changed it to UBound(Smilie, 1) which should produce the UBound of the second dimension. Therewith it compiles and runs.

    Is that ok, Gremmy? The chat works then as expected.

    And if so, I still have no idea as how to use and produce the smilies now...
    (Maybe I'm just blind or don't get what is meant. I thought you could now integrate smilies into your messages, but I don't find how???)

  2. #47
    Join Date
    Sep 2000
    Location
    FL
    Posts
    1,451

    Re: IP Based SEVERLESS Chat..

    And if so, I still have no idea as how to use and produce the smilies now...
    (Maybe I'm just blind or don't get what is meant. I thought you could now integrate smilies into your messages, but I don't find how???)
    I haven't looked at the code, but I think I get the gist of it. The chat box is a RTF textbox.

    Code:
    {\nonshppict{\pict\picscalex100\picscaley100\piccropl0\piccropr0\piccropt0\piccropb0\picw423\pich423\picwgoal240\pichgoal240\wmetafile8\bliptag1128540368{\*\blipuid }0100090000030c0300000000a202000000000400000003010800050000000b0200000000050000000c02100010000500000007010400000046000000430f8600ee00000010001000000000001000100000000000280000001000000010000000010001000000000040000000c40e0000c40e0000020000000200000000000000ffffff0007e000001ff800003ffc00007ffe09007ffe0c00ffff0c00ffff0b00ffff0f00ffff1300ffff1300ffff14007ffe16007ffe17003ffc1f001ff82f0007e02700a2020000430fc6008800000010001000000000001000100000000000280000001000000010000000010008000000000040010000c40e0000c40e0000"
    The above is how a smile : ) is coded into the RTB (he took this from Word). So when someone sends you a message with " : ) " in it, you replace it with the above string and you get a Smilee.

  3. #48
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,723

    Re: IP Based SEVERLESS Chat..

    Right. I took a look at the coding, too, and found the mistake.
    That's how the UBound statement works: Ubound(Smilie, 2)
    You have to change it in both Do_Smilie subs.

    What a fancy coding with that RTF pictures, but curiously I like it.

  4. #49
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: IP Based SEVERLESS Chat..

    Well oooops is all i can say ...

    Sat and looked at the problems posted and realised that I've lost my mind and put this in the wrong context/Syntax.. Or just plain wrong...

    WOF.. thanks for finding the error, I've corrected it now..

    But this is one of the reasons why i like to have the code posted on an open forum. Other can rip your code appart and find all the stupid things you do...

    Hopefully this one is correct...
    Attached Files Attached Files
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  5. #50
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,723

    Re: IP Based SEVERLESS Chat..

    Well done so far, Gremmy, but you are not done yet. There's still some oooops pending.

    Ok, it's not too grave. When I send Otto or Dummy, the first letter gets mingled with the colon from the senders name and becomes a smilie. Maybe after the username's colon to write a blank would remedy matters... but I couldn't find the proper place ad hoc. There are so many ":" written...

    And even if I really admire the way, the smilies are coded , as an afterthought I might have put the images in a ressource file, which would allow to replace them with own images in, cause I never knew how I would transfer one of my favourite smilies in the program.

    But anyway it's a very nice program. Well done.

  6. #51
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: IP Based SEVERLESS Chat..

    Ahh.. thanks for the update...I didn't think about the Side effects of the smilie use, will have to look into sorting that one out..

    I'm thinking more on putting the Smilies in an INI file.. Easier to switch over and change on the fly..

    Also thinking of adding the ability to Send pic's in much the same way...
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  7. #52
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,723

    Re: IP Based SEVERLESS Chat..

    Yeah, but putting them in an .ini file would also require that fancy RTF coding, isn't it?

    When I want to change smilie image, I think I'd like to see the actual image I'm replacing. Sure, the ressource file cannot be changed at runtime without more effort.

    Otherwise you'd need a utility to convert images into RTF code.

    BTW: would an animated smilie work, too? Like

  8. #53
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: IP Based SEVERLESS Chat..

    Hmm.. i might have to write in some code to do the RTF coding for any specified image, My prelim tests with animated smilies shows that it wont work... RTF is not able to cycle gif images.. If seems to hold a single image (Looks like first only).

    Using a resource file i'd still need to store images in the RTF coding, unless i write somthing that can convert them at a reasonable speed...

    So much to do so little time to do it in .. ...
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  9. #54
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,723

    Re: IP Based SEVERLESS Chat..

    Yeah. It's a pity. Lack of time is also called "Programmers Disease".

    How did you convert the smilies to RTF in the first place?

  10. #55
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: IP Based SEVERLESS Chat..

    Quote Originally Posted by WoF
    Yeah. It's a pity. Lack of time is also called "Programmers Disease".

    How did you convert the smilies to RTF in the first place?
    Okay so i got PD ..
    I used MS word and saved in RTF format, then extracted manually with the Hex Editor...
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  11. #56
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,723

    Re: IP Based SEVERLESS Chat..

    Oh, well. I shall try that.

Page 4 of 4 FirstFirst 1234

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center