15,891,409 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 fgoldenstein (Top 11 by date)
fgoldenstein
18-Aug-11 16:39pm
View
Thanks for your answer but it's not what i'm looking for. I need something simple so users can move a TextBox or add and image using a free tool. Something like ReportViewer but with a tool to edit report design and that doesn't require Visual Studio.
Imagine that your application is going to print invoices and each customer has a different pre-printed invoice. You have to options:
1) Configuration where the user enters coordinates. It's what I have today but it's not easy for customers.
2) Tool to drag and drop data and fit the pre-printed form.
fgoldenstein
26-Jul-11 9:46am
View
I deleted the "solution" I wrote because it was a comment, as BobJanova said. This is his comment, which was deleted after I deleted the solution:
"First thing, you should respond to a solution by using 'Add Comment', not posting a new solution.
If it is not possible for references to be circular, you can solve this by pre-walking and whenever you trip over one of these, switch the order of the parents." BobJanova
fgoldenstein
26-Jul-11 9:44am
View
Thanks for your answer!
Recalculating cost and price:
I thinks recalculating the cost is an issue because of performance problems. Imagine a producto composed by many products and components. Each children (product or component) composed by many products and components and so on. When you have to calculate cost of a product, it can get really messy. And price, sometimes, depends on cost (price can be fixed or variable).
Also, I prefer to have my DB with summarized values so I can create queries faster.
UpdatePrice method:
Your implementation is OK but I'm afraid of a situation. Take a look at this example:
A------- B
| | | | |
D E E F G
A = 2B + 5D + 2E
B = E + 5F + 8G
When E changes its cost, you have to get its parents, A and B in this case. A gets updated and the B is updated to. A has no parents but B has A as its parent. So you have to update A again.
Maybe this sample is short but this can get very huge.
Thanks again for your help.
fgoldenstein
23-Feb-11 14:58pm
View
I agree that Dispose() is not calling the GC but it's disposing any resource you need to get disposed. Calling GC is not a solution because even when you call it, it doesn't mean it's going to run. It runs when GC thinks it's time to run. My solution releases attached resources but it doesn't clean the object from memory.
Anyway, how many instances of a class should you create in order to fill the memory? I think that using the "using" block you can be sure that no memory leak or dead lock will occur. I think that the GC is going to be smart enough to run when the memory is almost full.
fgoldenstein
17-Feb-11 18:32pm
View
They're not the same because if you have a concrete class with a virtual method and you call that method there's no late binding. Late binding occurs when you have inheritance and you are calling an abstract or a virtual method with overriden method.
Do you agree?
fgoldenstein
17-Feb-11 16:14pm
View
I don't like hybrids, that's why I don't want to host a WPF Control in a WinForms project. Why should I avoid using PictureBox? You should give reason after saying something like that.
Scaling can be done with PictureBoxes, but you have to do it manually.
In the future I will migrate this project to WPF but now I can't.
Thanks for your interest but I would also appreciate that you give reasons when you say something.
fgoldenstein
17-Feb-11 15:09pm
View
I definetely prefer to use images because a graphic design can create a wide variety of tables to represent tables. Thanks anyway.
fgoldenstein
17-Feb-11 14:14pm
View
It has to be done in Winforms because the project is a Winforms project and this is only a new feature, not the entire system. The questions are:
1) How to resize a PictureBox at run-time to allow the user to decide the size
2) Drag&Drop (there're lots of articles in CodeProjects about it so it's not a problem)
3) Scaling: the user drags a PictureBox to X=1000, Y=10 (right upper corner) and it's ok. But when other users open the map in this 800x600 screen resolution he can't see the table. Scaling is necessary to avoid this problems. I have thought of a relative position (proportion) instead of an absolute position. X=1000, Y=10 could be X=90%, Y=5%. The same with the size of each object, it's not only important to adapt the location but the size too.
Thanks
fgoldenstein
17-Feb-11 14:08pm
View
Thanks for your answer. I'm not sure if working with Graphics is the best approach because of user interaction. I think it's easier to work with a PictureBox because it already has events and you can change the image to whatever you want. If I use Graphics I have to draw the figure. I'm still not decided.
fgoldenstein
26-Jan-11 6:26am
View
Maybe you use a tool (Visual Studio) to encapsulate a field but encapsulation is a concept. It's hiding implementation details (you make a field private).
fgoldenstein
21-Jan-11 7:20am
View
I recommend you to take a look at my answer. I think it's a little bit more general. The focused control should be a Control, not a TextBox. Why? because TextBox aren't the only inputables controls. Maybe you want to delete a row of a DataGridView with the keyboard, or move up and down.
Show More