CodingSup3rnatur@l-360's Profile
Reputation: 916
Master
- Group:
- Mentors
- Active Posts:
- 921 (0.96 per day)
- Joined:
- 30-September 10
- Profile Views:
- 22,349
- Last Active:
Today, 02:53 PM- Currently:
- Offline
Previous Fields
- Country:
- GB
- OS Preference:
- Windows
- Favorite Browser:
- Chrome
- Favorite Processor:
- Intel
- Favorite Gaming Platform:
- XBox
- Your Car:
- Who Cares
- Dream Kudos:
- 425
- Expert In:
- C#
Latest Visitors
-
actionjcl 
13 May 2013 - 10:40 -
Zereo 
12 May 2013 - 04:38 -
CodMnk2b 
05 May 2013 - 19:00 -
vks.gautam1 
05 May 2013 - 07:36 -
VeronicaB 
02 May 2013 - 10:51 -
DtP1337 
17 Apr 2013 - 15:02 -
EmbraceTheNight 
13 Apr 2013 - 10:25 -
trevster344 
10 Apr 2013 - 09:55 -
carnivroar 
02 Apr 2013 - 13:18 -
Flukeshot 
01 Apr 2013 - 13:18
Posts I've Made
-
In Topic: DispatcherTimer thread Question
Posted 5 Apr 2013
Quote
i know that the DispatcherTimer will run on it on seperate thread
Actually, the DispatcherTimer's Tick event is raised on the UI thread.
Quote
would the getX function be running on the same thread as the DispatcherTimer thread
Yes. -
In Topic: WPF Minimize window when windowstyle ="None"
Posted 2 Apr 2013
To get the hosting window, you can use the window.GetWindow() method, passing in a reference to the hosted DependencyObject (your Page in this case). -
In Topic: Using Generic List
Posted 23 Mar 2013
This:
Dim p2 As People
is just declaring a variable that points to nothing. You need to instantiate a People object to be able to use it, like so:
Dim p2 As New People("Name")
Now p2 refers to the new Person object, and you can use it.
If, on the other hand, GetCustomer() is meant to be a Factory Method that creates a new People object with the specified name, you want GetCustomer() to be marked as Shared, and you want it to return a Person object, rather than a String.
For example (I've changed the name of the method to reflect what it now does):
Public Shared Function CreateCustomer(ByVal name As String) As People Return New People("New " & name) End Function
You can then call it like this:
Dim p As New List(Of People) Dim p2 As People = People.CreateCustomer("Howard") p.Add(p2)
However, having a method called CreateCustomer() that returns a People object is a bit bizarre, as is having a People class that takes a single name in its constructor (should the class be called Person instead?), so you may have to explain what you are trying to do a bit more. -
In Topic: C# - Detecting key press in text box and receiving EventHandler errors
Posted 22 Mar 2013
The EventHandler delegate is expecting you to pass it a method with the following signature and return type:
void YourMethod(object sender, EventArgs e)
Compare that to the signature of your TextBox_KeyDown method.
Happily, there is a built in delegate that can reference a method with a signature and return type like your method's that you can you use instead - KeyEventHandler.
If you look at the MSDN pages for a given delegate (like the two I linked above), you can see the signature and return type of the method they can handle from their declaration displayed in the 'Syntax' section of the page. Also, in Visual Studio, if you type this.TextBox.KeyDown +=, and then hit tab, it should insert the right hand operand of the += operator for you. EDIT 2: Finally, note that you can get the delegate type that backs a given event on the event's MSDN page - Control.KeyDown. Note the KeyEventHandler part in the declaration of the event. You should use the same delegate type when subscribing to an event as is used in the declaration of the event.
EDIT:
Note that if you are using C# 2.0 or above, you can let the compiler decide what delegate to use using the method group conversion feature, as so:
this.TextBox.KeyDown += this.TextBox_KeyDown;
-
In Topic: Should I Use Classes The Ways I Have Been?
Posted 22 Mar 2013
Yes, I think you've got it. The rich text box is ultimately contained in the form, so it won't outlive the form.
My Information
- Member Title:
- D.I.C Addict
- Age:
- 20 years old
- Birthday:
- June 11, 1992
- Gender:
-
- Location:
- United Kingdom
- Interests:
-
Rock/metal music - Led Zeppelin, Guns N' Roses, Metallica, Nirvana, AC/DC etc
Sport
Coding. Love C#, in particular.
Watching Supernatural.
Online gaming (Xbox 360). - Full Name:
- Jason
- Years Programming:
- 3
- Programming Languages:
- C#, a bit of Actionscript 3.0 ,SQL,Progress4GL, VB.NET. Learning Java, and Assembly/C/C++ when I can.
Contact Information
- E-mail:
- Click here to e-mail me
Friends
-

louis2003b
-

sisqo
-

jelskie
-

raziel_
-

Neetu sharma
-

Curtis Rut...
-

mon mon
-

Gudger
-

RetardedGe...
-

MATTtheSEA...
-

scolty
-

CryptochildXR
-

_HAWK_
-

htrac7
-

mahor1989
-

saleem_deek
-

pcboyyyy
-

m_wylie85
-

Elcric
-

brep
-

RexGrammer
-

linuxnut
-

trevster344
-

nK0de
-

nelboy
-

JoePatriot
-

strawhat89
-

lucky3
-

wanabavbcoder
-

AnalyticLu...
-

IronRazer
|
|


Find Topics
Find Posts
View Reputation Given
|
Comments
strawhat89
13 Aug 2012 - 06:01raziel_
13 Sep 2011 - 11:31smohd
03 Jul 2011 - 15:49CodingSup3rnatur@l-360
03 Jul 2011 - 08:25macosxnerd101
02 Jul 2011 - 19:19MATTtheSEAHAWK
07 May 2011 - 12:26CodingSup3rnatur@l-360
04 May 2011 - 13:32Curtis Rutland
04 May 2011 - 06:30ishkabible
27 Apr 2011 - 13:19MATTtheSEAHAWK
24 Apr 2011 - 14:45I was like "I have to finish this!". Are you doing one?
ishkabible
20 Apr 2011 - 19:23Curtis Rutland
21 Mar 2011 - 10:42Curtis Rutland
01 Mar 2011 - 12:04CodingSup3rnatur@l-360
25 Feb 2011 - 15:54Neetu sharma
25 Feb 2011 - 11:52