16,012,821 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 .NET 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 Frans Jan (Top 24 by date)
Frans Jan
14-Jan-13 2:55am
View
I don't know about that, but maybe this post helps: http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/464d3388-0db9-4755-8d5f-ebe2593ce8c2
or: http://stackoverflow.com/questions/896574/forcing-a-wpf-tooltip-to-stay-on-the-screen
I also found that you can click through a label when you set the property "Enabled" to false
Frans Jan
30-Nov-12 7:47am
View
Yes you have parameters to be passed, no you don't use them. This means that you can use the second solution. Simply call: KeyBoard_Lock(null, null);
To use my first solution do this (you can name SomeFunction() to whatever you like):
public void SomeFunction()
{
if (receivedData == "###LOCK###")
{
actHook = new UserActivityHook();
// crate an instance with global hooks
// hang on events
//actHook.OnMouseActivity+=new MouseEventHandler(MouseMoved);
actHook.KeyDown += new KeyEventHandler(MyKeyDown);
actHook.KeyPress += new KeyPressEventHandler(MyKeyPress);
actHook.KeyUp += new KeyEventHandler(MyKeyUp);
}
}
Then do this:
private void ListenToServer()
{
SomeFunction();
}
public void KeyBoard_Lock(object sender, System.EventArgs e)
{
SomeFunction();
}
So now, you call your SomeFunction() in ListenToServer(), but as you see, KeyBoard_Lock(object sender, System.EventArgs e) does the same.
Frans Jan
30-Nov-12 7:03am
View
AA23 is not empty. It has a IF statement, with 0 when true and 1 when false. Default is true, so it's default value is zero, not empty.
object oMissing = Type.Missing;
Frans Jan
30-Nov-12 6:46am
View
In my example I wanted to call the button click EventHandler in the KeyDown EventHandler, but why? I asked myself. Why should I want to call a buttonClick EventHandler in a KeyDown EventHandler, that's too confusing, because, after all, one EventHandler is for a buttonClick where the other is for the KeyDown, right? So why would I want to call a buttonClick EventHandler in my KeyDown EventHandler. Or, if you are not calling it in an other EventHandler, but in a function, why would you want to call the buttonClick EventHandler (or some other EventHandler) if you are not performing that action? So that's why I decided to put my code of the button click EventHandler in it's own function, and then have my button click EventHandler and my KeyDown EventHandler to call that function. Both are calling the same function, so both are doing the same.
Calling an EventHandler when you are not raising that event is confusing.
Frans Jan
30-Nov-12 6:11am
View
Already worked on that ;)
Frans Jan
30-Nov-12 6:03am
View
I think you're missing the constructor?
Frans Jan
20-Nov-12 10:24am
View
Thanks for the answer and tip about XML. I gave it a try, but it turns out, the best way is to use a database. So I will put my focus on that.
Frans Jan
10-Oct-12 4:58am
View
Since I'm a beginner in C# I didn't know the options. I was just thinking to difficult, that I had to compare the value of the textboxes. Yes, I need to do this, but I didn't think of the Math.Min() method from below answer.
Frans Jan
9-Oct-12 6:25am
View
Sorry, but we can't help you with this kind of question. Please provide us more information about your problem. I suppose something is flickering in your winform application? If so, is it a textbox/label/button/etc..? Or is your entire application flickering? Please add some details.
Frans Jan
8-Oct-12 5:29am
View
I thought of that as well, but actually I don't want the input fields to have '0' as default string.
But if this is the only way, is there a way to preset this? Else I need to change this every time in the designer. (for about 200+ controls...)
Frans Jan
8-Oct-12 5:21am
View
I want to avoid coding like this, becasue I need to do lots of calculations with the textboxes. In this way, I still need to add the Convert.ToDouble() every time I use the control. As said, I'm trying to avoid this, and that's why I chose to use a usercontrol, hoping I could handle the parsing/converting to double only there :)
Thanks for your answer though!
Frans Jan
28-Sep-12 4:04am
View
Sorry, forgot to add that tag
Frans Jan
27-Sep-12 7:39am
View
Problem is already solved, I'd forgotten to call the FormCheck function...
Frans Jan
21-Sep-12 6:05am
View
I guess you need to find a way to get it worked with mouse events yes. Think you should create a button that needs to be pressed if the user wants to draw a line (if you don't have already). Then set visibility of lineshape to false, make it visible when draw button is clicked. Also, set default X1,X2,Y1,Y2 to 0, so you won't see any line when the button is clicked (although you've set the visibility true). set LineShape1.X1 = Mouse.Position.X; and LineShape1.Y1 = Mouse.Position.Y;
From here you need to figure a way to set the LineShapeX2 and the LineShape.Y2 to the new position of the mouse. Perhaps work with left-button for start position and right-button for end position?
Frans Jan
21-Sep-12 5:58am
View
OK clear, but how do I use PDFSharp in my project? Do I need to add reference? If so, what reference do I need to add?
Frans Jan
21-Sep-12 5:26am
View
But I see it won't cover the part on drawing from the users mouse... Sorry, read your question too fast I guess
Frans Jan
14-Sep-12 8:27am
View
Thanks for all the options though :)
Frans Jan
14-Sep-12 8:22am
View
already did ;)
Frans Jan
14-Sep-12 8:18am
View
Well, I find the solution
Frans Jan
14-Sep-12 8:17am
View
Well that's the fun part of it. There are no events/methods at all untill now, I'm just designing the forms. I noticed the warning I recieve:
Warning 1 There is already a command handler for the menu command '5efc7975-14bc-11cf-9b2b-00aa00573819 : 17'. 0 0
Frans Jan
14-Sep-12 8:06am
View
Yes it does. But it still doesn't in design view
Frans Jan
14-Sep-12 7:39am
View
Even more frustrating: When debugging and I call this form to open, it shows the form as it's supposed to look. Now I want this in my design view too :(
Frans Jan
14-Sep-12 7:35am
View
I did the clean and rebuild solution, but unfortunately without result. Still seeing the HTML code...
Frans Jan
14-Sep-12 6:51am
View
Well, to make it short and simple:
I create a windows form in VisualBasic (baseForm).
Then I created an other form (childForm), which is an inherited form from baseForm. No problem until now, I can design my form just as always in the design view.
Now I created an other form (newForm), which is also an inherited form, but this newForm is inherited from childForm. When I want to design this form in the design view, I see this: <html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"><title></title><style>.ErrorStyle { font-family: tahoma; font-size:.... and the rest of this HTML-code, instead of my form. But I want to see my form, so that I can design it.
Show More