For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
I have created a form in a tabcontrol -> tabpage, it has a contract format and I need to print it. So, I heard about PrintDocument but I don't really know how should I use it to print a tabpage because it has a large height and it should be printed on multiple pages. Any suggestions please? Thanks
That's what a PrintDocument is for - it allows you to select exactly what is printed, and where it is printed, in what font, what colours, etc.
What it doesn't do is "print a control" such as a tap page - because that's silly. The control is very unlikely to conform to the form factor of the paper being printed onto (and it'll have a "screen based" resolution rather than a "printout based" resolution, which is generally a lot, lot higher.
Well, which is the right way to print a form with textboxes, labels in a specific location in form? In that example it prints a text file. But in that way, it prints the whole windows form. Or, is there any third way? For example to send data in a word document?
Just to add to what Harold said, you can do it, under very specialized circumstances.
The user has to be running IE (not likely, and soon to be even less likely with Win10/Edge released)
The user has to allow ActiveX controls to run (not likely, they are disabled by default)
The user has to allow ActiveX controls to download (not likely, that is also disabled by default)
Then all you have to do is write an ActiveX...and it will work for far less than one percent of your visitors.
And it is so easy to "spoof" MAC addresses that it isn't worth trusting them anyway!
If this is for security, forget it!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
I've been working on a C# project with WPF client, WCF server and Entity Framework 6 to get database access. I use an entity-object to communicate between server and client. Due to this the entity is detached from entity framework cache manager when transferred to the client. If there is an update the client calls a server facade through service references and sends the updated entity. Since it's detached a simple dbContext.SaveChanges() on server-side doesn't work, so I set
where 'project' is my entity I want to update. This works fine on the entity itself but I need a solution to update the entity and all corresponding entities held within this entity - a recursive update.
When I set the explicit state for each entity it works, but then again it's not as generic as I wish for. So the challange is to find a solution where I don't have to handle each property of my entity-object separately.
Currently I use the repository pattern as follows:
publicabstractclass PersistenceIntegrationService<T> : IPersistenceIntegrationService<T> where T : BaseEntity
public T Update( T entity )
if ( entity == null )
thrownew ArgumentNullException( "entity" );
this.PreUpdate( entity ); // pre-update-hook
this.AddModifyInformation( entity ); // set ModifiedOn and ModifiedBy properties
this.persistenceContext.SetModified( entity ); // calls dbContext.Entry( project ).State = EntityState.Modified;
this.PostUpdate( entity ); // post-update-hook
catch ( DbEntityValidationException e )
string message = this.PrettifyDbEntityValidationExceptionMessage( e );
thrownew EntityValidationException( message, e );
Although I have pre-persist-hooks I do not want to set the state explicitly, as mentioned earlier. I wonder if there is a built-in solution from entity framework. For my searches on the web I didn't find any hints regarding this challange.
I know that the only way to find the Separating Axis is the brute force. Is there a way to avoid this(it's true that a computer can calculate more than 10000000 dot products,with a fast result).
Seen that V-clip and gjk suck...
I was just wondring!!!
I've been working on some C++/CLI 'glue' code to make it easier for C# devs to write plugins for ToDoList[^] (just importers/exporters for now because they're the simplest).
Now I need a C# guinea-pig to create a useful importer or exporter that can be included with 7.1.
I could do it myself but that would not be nearly as worthwhile in exercising the 'glue'. I've also got a sample C# project that provides a bare-bones plugin so it's really about taking that and making it genuinely useful.
If this is a success we can then move on to writing a sample C# Task View plugin which will be much more exciting!