|
this error does not always happen. It seems I have to close the file and then re-open it to work correctly. Is this the way it should be?
Thanks
|
|
|
|
|
hi,
This list requires int
How is this code corrected please?
Thanks
|
|
|
|
|
|
Hi,
Any way, I am now using a string such that i transfer the xml into a string, then replace, delete what I want.
This seems to work.
Do you think it is ok to use a string as explained?
Thanks
|
|
|
|
|
Please note that I do not want to use xpath or linq or database. Just the xmlDocument for business reasons Why? I can understand you don't want to upgrade to .NET 3.5 to use LINQ, but SelectNodes (that uses XPath to get child nodes) is always been available in XmlDocument.
Said that, look at the XmlNode members, and you will find these two methods: AppendChild and RemoveChild.
|
|
|
|
|
hi,
i am using a grid that have its own print method.
i am using in my application this grid several times.
i want to print all the grids in 1 time (i can do grid1.print , grid2.print but than i can't preview them both in one time)
is there any way to make a virual pritner that all the prints will go to it and than i wiil be able to preview it once and see all the output(and select copies,and the real printer that i want to print to)?
thanks,
Samy
|
|
|
|
|
You could create a PrintDocument and print your grids one per page, or if they are small enough fit two or more onto the page. You will then be able to preview them all at once.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
how can a PrintDocument be used in this case?
my grid prints automatically to the default printer(i can change the printer name to another printer not the difault and it works but a PrintDocument dosn't have a "printer name" to pretend.
thanks,
Samy
|
|
|
|
|
If you have the source code for the grid you are using, then modify it (add a method that prints to a Graphics instance).
If you do not have the code then I would look for an alternative grid that gives you the source. There are plenty of them, just google for c# print datagridview.
Other than that I have no idea.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hello,
I want to change the maxvalue of the scrollbar in a treeview. So that I can see the whole treenode.
It is in winforms.
Can anyone help me to achieve this?
Thanks,
|
|
|
|
|
Do you mean that you cannot scroll to the bottom of the tree nodes (vertically)?
Could you post some code where this problem shows?
|
|
|
|
|
In a simple dialog
namespace projectname
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void FormDataChanged(object sender, EventArgs e)
{
blah.........
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
FormDataChanged(???????????, ?????????);
}
}
}
If I want to use the FormDataChanged function when I process the change in a listbox or a checkbox or whatever, what should I supply as the arguments. I suppose I have just dived in to C# and it's a bit different to what I am used to. I am not using either "sender" or "e" in the FormDataChanged function, I just want to know what is/should be in there, is it the item on the form itself that is the object, e.g. in the example above, is it the listbox itself, should it be "this" as the 1st parameter, and where does its EventArgs come from?
thanks for any help
If I put FormDataChanged(sender, e) that seems like it should be correct, but maybe I just need to find out a bit more about how the sender/args constructs work in more detail
|
|
|
|
|
In an event handler method, sender is the object that is generating the event, and e are event-specific arguments (for example a MouseClick event sends the mouse button that was clicked). If e is of type EventArgs , that means there are no specific argument for an event.
If you don't need these informations, you can easily ignore the parameters.
|
|
|
|
|
ldsdbomber wrote: private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
FormDataChanged(???????????, ?????????);
}
Hi,
you should avoid calling event handlers directly; there are some alternatives:
1.
some events can be fired by calling a specific method, such as button.PerformClick()
2.
you can create a method that contains the bulk of the event handling and call that directly, without needing any special parameters. Example (see Timer_Tick method):
private void checkbox1_CheckChanged(object sender, EventArgs e) {
somethingHasChanged(sender as Checkbox);
}
private void listbox1_SelectionChanged(object sender, EventArgs e) {
somethingHasChanged(sender as Listbox);
}
private void Timer_Tick(object sender, EventArgs e) {
somethingHasChanged(null);
}
private void somethingHasChanged(Control c) {
if (c!=null) Console.WriteLine("Something got changed relating to Control "+c.ToString());
...
}
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Many thanks.
Do you have any opinions as to a good reference book that would include this kind of information, i.e do I want a book on C# itself, or is it Windows Forms, or Visual Studio specific?
|
|
|
|
|
Sorry, no, I don't generally recommend specific books. Some people prefer a specific author, others a publisher.
The books I own I have bought at various points in time, choosing from whatever collection was available at the nearest book store at that time.
I often like the Microsoft books, including the Step-by-Step series (which is tutorial, not reference).
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Sorry, what I meant was not a specific book, but a specific class of book. i.e. does a general purpose C# book contain details about controls and event handlers, or is that specific to windows forms etc. And for handling and tokenising strings and dialog data, are there specific types of books for that or... I realise this question is a bit wishy washy!
|
|
|
|
|
What is in a book is what an author chooses to be there (the publisher permitting).
Some books are purely language-oriented; others are technology oriented (e.g. database) but require a language for their examples, and may or may not offer an introduction to the language too.
Windows Controls have existed for a long time, but they evolve, and their capabilities may be reduced or augmented by some framework (MFC, .NET, ...).
My best advice is to go to the book store and make your own choice. That's what I do and recommend.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Hello everybody, I have started again working my own windowsmediaplayer. I had included wmplibs in my code, but I could only see the interface(control), I couldn't activate it. Internally it can play for an audio, but not with the wmp control. My question is, how to activate the control and or how to play media using the control?
|
|
|
|
|
Hi,
You might be able to get some ideas if you could go through Chapter 16 of this book
Best wishes!
|
|
|
|
|
Hi leapsword, I need free source. I am very far away from where you are or the book. Thank you
|
|
|
|
|
Yonathan1111 wrote: Hi leapsword, I need free source.
Hi,
Free source are certainly not possible to be given, cuz:
1. They require other people's hard work on;
2. We are here only for the reason to try to help each other with problems, but not for the sake of giving a solution;
So, very sorry to say, but you probably need to go and buy a book to read, or do some research by searching on internet. 
|
|
|
|
|
Hi everybody, I think you understood me in wrong way, I just want to say, I couldn't afford the book it is not for the free code. Thank you.
|
|
|
|
|
Huh, Sorry, I must have read your previous post wrong. If you need free source of that book, you can just google the name of that book with keyword "rapidshare", then you should have few links to be accessed. Good luck!
Sun
|
|
|
|
|
Hi All,
As my subject may suggest, I am having a strange problem. The latest test release of my application (WinForms) will completely freeze once the screensaver is enabled, I can also replicate this by locking the computer and unlocking, also if a change display settings it happens (this I read in a post where someone else had the issue, but could not find any solutions on the few hits I managed to find.
When I say freeze, I mean completely not responsive, even to the point of it not displaying the usual 'Not Responding' text.
This was not the case in the previous test version, but I have pretty much removed everything since that last version and still an issue.
I know it's not much help, but there is so much different code that I cannot post any examples.
Has anybody seen or heard of this before that could maybe shed some light?
Thanks
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|