15,910,878 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Elman90 (Top 22 by date)
Elman90
20-Dec-11 12:22pm
View
yes i got to that conclusion myself too.
Thx
Elman90
5-Dec-11 7:45am
View
Deleted
John, i d like to ask another question if it isnt a bother for you, i see from ur profile that u are experienced, and i d like an opinion. I am a graduating cpu engineering student, and i d like to dive myself in microsoft environment software development for now. i have been studying and intend to continue studying WPF, Silverligt and .Net apps overall. I have been reading lately that with this new outcome in this "Metro Style" apps of windows 8, WPF and Silverlight are been downlayered (not sure if that is entirely true). So, in your opinion, is it worth for me to learn how to practice WPF enviroment of programming now, or should i start some other topic.
Elman90
5-Dec-11 7:33am
View
Web server unavailable, the link is incorrect i presume. I have tried amazon ,searchin for either "Windows 8" or "Metro application" , but didnt find anything on the topic...
Elman90
14-Nov-11 16:35pm
View
And YES i HAVE confirmed fully with a breakpoint that the event gets the correct handler at that point, but it becomes null later, even if i never invoke it, strange
Elman90
14-Nov-11 16:33pm
View
Ok so i created an event to try.
private void dataGrid1_PreviewMouseRightButtonDown_1(object sender, MouseButtonEventArgs e)
{
datagridMouseClick(sender, e);
}
This handles the right mouse click. I added a breakpoint to the line
search.datagridMouseClick += new MouseButtonEventHandler(search_datagridMouseClick);
So. before entering to this line the datagridMouseClick is null, after it, it gets its correct value ,(and the program keeps running normally) but then, When i use right click to get to the handler above,judgin from the breakpoint the datagridMouseClick is null (???) .
Elman90
14-Nov-11 16:20pm
View
Yes i have tried that. The breakpoint hits inside the (search_datagridMouseClick) actually that code works ok till it gets to fire the event. Actually the exception gets generated inside that. When it arrives to this.datagridMouseClick(sender, e);
Generates a NullReferenceException, I have also tried deleting all tho other code except this line and gives the same error. (But the event should be already be subscribed by the search.datagridMouseClick += new MouseButtonEventHandler(search_datagridMouseClick) at this point)
Elman90
14-Nov-11 15:53pm
View
I didnt put too much info thinking was just something easy that i was missing. will update the question to be a little more clear
Elman90
14-Nov-11 15:51pm
View
I think i used the wrong word, will update the question to clear the doubts.
Elman90
14-Nov-11 10:57am
View
I understand, but the event handler i want to subscribe is in another project. And if i assign a handler to this event in this class, the other eventhandler in the other class is nt executed
Elman90
14-Nov-11 10:26am
View
Hmm i think the problem here is that the listener is in another project since this is a .dll, but with another event this mothod worked, hmmm... how can i fire an event to be heard from another class/project
Elman90
14-Nov-11 8:27am
View
This method has worked when i had a routed event fired exactly the same way ,,,
Elman90
14-Nov-11 8:26am
View
hmm all i do in the other Project is
search.datagridMouseClick += new MouseButtonEventHandler(search_datagridMouseClick);
void search_datagridMouseClick(object sender, MouseButtonEventArgs e)
{
....
}
Where search is the object name that contains this code, i dont have much exp on events , so any help d be appreciated
Elman90
14-Nov-11 8:15am
View
and the event WILL be listened in another class, i cant post the ENTIRE code here, , its smth like 10 k lines,, but trust in the other class i take that public event from my usercontrol and assign it to another function, the only prob here is that it is null, i have used this method before and HAS worked perfectly. Can ANYONE help or have any idea on that?
Elman90
14-Nov-11 8:13am
View
I dont quite understand
Elman90
14-Nov-11 8:12am
View
I know that, it was originally on the code and i took it off. But thats not the point! By using it that way the event would never be fired, cause its always started at null, i need smthing to initialize the event...
Elman90
14-Nov-11 7:26am
View
At the breakpoint it says its value is null and type System.Input...MouseButtonEventHandler, nothing else
Elman90
14-Nov-11 6:59am
View
hello i build this code in an external dll, and i am debugging another application, so cant use breakpoints on this (as far as i know).
Elman90
14-Nov-11 6:54am
View
Yes i have tried that but that way the event is not fired, since the event is started at null.. I have used the same identical method with a public RoutedEventHandler and worked perfectly, so dont quite get what is the prob here
Elman90
14-Nov-11 6:47am
View
Yes u r right on that, but its not the point. The event doesnt use dep to be fired, i have even tried to cancel all the code above and leave only "this.datagridMouseClick(sender,e)" and still gives me the exception
Elman90
21-Oct-11 11:31am
View
Thanks! Havent tried but that must be it.
Best Regards man ;)
Elman90
21-Oct-11 11:22am
View
Thaknks for the reply, but thats basically what i wrote, (the only diff is ExecuteScalar() instead of ExecuteNonQuery() ) Still i tried that too to be sure, Doesnt work. BTW its a WPF application,, if that makes a difference
Elman90
16-Oct-11 15:11pm
View
Deleted
Reason for my vote of 5
A very useful Style, i used it for my program and i like
it
Show More