 |
BOOK: Professional Visual Basic 2010 and .NET 4
 | This is the forum to discuss the Wrox book Professional Visual Basic 2010 and .NET 4 by Bill Sheldon, Billy Hollis, Kent Sharkey, Gaston Hillar, Rob Windsor, Jonathan Marbutt; ISBN: 9780470502242 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Professional Visual Basic 2010 and .NET 4 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

December 17th, 2010, 09:19 AM
|
Registered User
|
|
Join Date: Dec 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
chat
i love wrox books very much. becouse evirthing is very good explanated. but in this book on chapter 29 chat code is obscure.can anywon explain me some code? like threadpool,invoke. and book sourse and wrox site sourse is differenet .. so i'm ver confused becouse i learn vb with my own and nowan can help me ...
Last edited by virusa1; December 21st, 2010 at 07:15 AM..
|

December 17th, 2010, 09:26 PM
|
Wrox Author
|
|
Join Date: Jun 2007
Posts: 16
Thanks: 1
Thanked 1 Time in 1 Post
|
|
chapter 29 chat code
Hello,
What problems are you having with the code? I admit that it's not the easiest example, but most of the complexity is there to keep the user interface working while the app is busy.
I'll check, but the code on the site and the book should be the same.
__________________
TTFN - Kent
|

December 18th, 2010, 05:58 AM
|
Registered User
|
|
Join Date: Dec 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
yes it's hardest code whats is in the book.no can't say thats there is problem but this code isn't well explanated like other codes.. : (
in book isn't connect button click code and other little codes ..
sorry for my bad english
Last edited by virusa1; December 18th, 2010 at 06:06 AM..
|

December 18th, 2010, 07:03 PM
|
Wrox Author
|
|
Join Date: Jun 2007
Posts: 16
Thanks: 1
Thanked 1 Time in 1 Post
|
|
Quote:
Originally Posted by virusa1
yes it's hardest code whats is in the book.no can't say thats there is problem but this code isn't well explanated like other codes.. : (
|
Sorry about that. I tried to explain what everything was doing as I went along. Let me know as you're going through it for any particular problems and I'll try to help you through it.
Quote:
Originally Posted by virusa1
in book isn't connect button click code and other little codes ..
|
Yeah. Sadly, there just isn't room for every bit of code in the app to be in the book, and I guess that was one of the bits we didn't write about. The download code is complete though, and you should be able to work with it. Let me know.
Quote:
Originally Posted by virusa1
sorry for my bad english
|
Not to worry -- it's far better than my anything but English. :)
__________________
TTFN - Kent
|

December 19th, 2010, 11:38 AM
|
Registered User
|
|
Join Date: Dec 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
i have two main question
what for you need delegate functions and whats doins threadPool
thanks for so fast replys :)
|

December 19th, 2010, 04:06 PM
|
Wrox Author
|
|
Join Date: Jun 2007
Posts: 16
Thanks: 1
Thanked 1 Time in 1 Post
|
|
The biggest problem with an app like this is that you never know when a new message may come in. If the app is doing something at the time, it might miss it. The way around this is to use a separate thread in your application. This thread does nothing but listen for incoming messages, so that you don't miss any. Threads can be hard to manage and work with, so to make them easier, .NET includes the notion of a ThreadPool. This is sort of a built-in collection of threads you can use. I don't know why they chose the term "Join", but this tells the ThreadPool to start processing a block of code. It's like a new Main method for your app, but just for one block of code.
Having these threads running in the background leads to another problem. Background threads cannot directly "talk" with the user interface, only the main thread can. So, you need a way for background threads to send information to the main thread. In .NET, this is by having a delegate on the main thread that gets called. Events are also delegates behind the scenes, but VB hides that from you. In this case, the delegates are sort of like event handlers that can be called from any thread. When the background thread gets a message, it can call the delegate and pass it over to the main thread to display on the form.
Hope this helps.
Just out of curiosity, what other books have you used to learn VB?
__________________
TTFN - Kent
|

December 20th, 2010, 06:52 AM
|
Registered User
|
|
Join Date: Dec 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
thanks very much. i have readen only begining vb 2008, professional vb 2008 half and when come vb 2010 i started proffesional vb 2010 . what book can you advice me? :)
Last edited by virusa1; December 20th, 2010 at 06:57 AM..
|

December 20th, 2010, 05:05 PM
|
Wrox Author
|
|
Join Date: Jun 2007
Posts: 16
Thanks: 1
Thanked 1 Time in 1 Post
|
|
Those are all good ;)
I just wanted to make sure you didn't just dive into this one at the beginning, but the Beginning VB 2008 book is great. If you still have the Pro VB 2008 book, take a look at the Threading chapter (Chapter 26). That might also help you as you go along with that sample.
The threading chapter in the 2010 book is also good for the concepts, but it uses a slightly different API than this sample.
__________________
TTFN - Kent
|

December 21st, 2010, 07:11 AM
|
Registered User
|
|
Join Date: Dec 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
thanks for attention :) when i was posting here i hadn't big hope that someone would help me :)
Last edited by virusa1; December 21st, 2010 at 07:20 AM..
|

February 17th, 2011, 08:23 AM
|
Registered User
|
|
Join Date: Jan 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Running download
I am trying to write the app in C#.
I got to the point of debugging it (disposing and finalising are different). It didn't work so thought I would download the vb and check. When I run the VB one I only get 1 window for the conversation and if I type somethign in and press send I just get the name appearing not the text. Have I missed something in the download?
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
Chat Room |
aliusmankhan |
ASP.NET 2.0 Professional |
2 |
August 23rd, 2008 07:51 AM |
Wrox Chat in C#! |
ostwald |
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 |
13 |
December 13th, 2007 03:10 AM |
chat application |
krishna_krrish |
.NET Framework 1.x |
0 |
August 14th, 2006 12:40 PM |
Chat Application |
krishna_krrish |
.NET Framework 1.x |
0 |
August 14th, 2006 12:38 PM |
Chat Application |
sachindhillan |
Classic ASP Basics |
2 |
August 10th, 2004 12:32 AM |
|
 |
|