|
Would this cancel the checking or unchecking of an item in the listview?
|
|
|
|
|
Have you tried it? If it does, handle it in your double click event.
|
|
|
|
|
Hi,
Im again here, the n00b. I have a strange problem now with Visual Studio, im working in design mode placing setting my Columns on a DataGrid and when i have it setup and goodlooking then I press F5 like usual :P and meanwhile my app starts running i saw in the back window Visual Studio changing Column positions again, it also happens when I edit for example the Expression of a Column in the Dataset view.
Anybody knows how to solve it ? due it happens everytime and everytime i had to re-sort the columns in design mode.
... many many thanx
|
|
|
|
|
Are you using AutoGenerated columns?
|
|
|
|
|
omg,
I never saw that option, where is it ?
Hope thats the reason,
thx
|
|
|
|
|
it's a property of the gridview.
MyDataGridView.AutoGenerateColumns = true;
|
|
|
|
|
Yes i saw it, and turned off at Form_Load, but cannot understand it, that means that when app is running it gets the columns from the ds and changes the design... weird tbh
Anyway, if it works, but i dont like it at all,
Edboe, if you come someday to spain take my word you will have a home in barcelona, you helped me a lot latelly...
|
|
|
|
|
|
It happens again, and also i checked in the code generated by VisualStudio and that property was false too. (
I just changed the headertext of a Column and then my 1st one becomes the 3rd. Why ????
|
|
|
|
|
Hi,
Iam using the C# assembly,i've already created the one version and then updated the version and after that i want to use that Update the Version...So pls help How to use that Updated the Version.....
Thanking you ,
Somasundaram
|
|
|
|
|
Iam using the C# assembly,i've already created the one version and then updated the version and after that i want to use that Update the Version...So pls help How to use that Updated the Version.....
|
|
|
|
|
I really tried to, but I don't understand a word of what you're saying... Please explain a bit more what you want and what exactly does not work...
|
|
|
|
|
|
Hello,
I need to remove the taskbar icon for my application and run it from System tray only. The menu is a context menu on the system tray icon and I want it to have no icon in the taskbar (no long bar with the application name on it).
I have figured out how to have the system tray icon, but how do I make it so that the app does not have a taskbar icon even when running normally or maximized (not just when its minimized ).
Thanks
|
|
|
|
|
Set the Form.ShowInTaskbar property to false .
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thanks for a fast and good answer
|
|
|
|
|
Hi all,
I have just read the following article: http://www.codeproject.com/csharp/printhml.asp[^]
Here it describes how to print a html document and it works BUT it works in the same way as the following piece of code:
Process myProcess = new Process();<br />
myProcess.StartInfo.FileName = TemplatePath + "\\Invoice.HTML";<br />
myProcess.StartInfo.Verb = "Print";<br />
myProcess.StartInfo.CreateNoWindow = true;<br />
myProcess.StartInfo.UseShellExecute = true;<br />
myProcess.Start();
Is there someone who used the code from the article and would any one know how to specify a printer as to not make the "select printer" screen come up? Both of these two ways bring up the screen where the user needs to select the printer... I've been stuck with this one a while now.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Hello,
I don't know if this solution also works for printing of files.
I used it for directprint a bitmap.
PrintDocument pd = new PrintDocument();
pd.PrinterSettings.PrinterName = "youreprinter";
PageSetupDialog psd = new PageSetupDialog();
psd.Document = pd;
psd.PageSettings.Landscape = true;
pd.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(PrintCurrentPage);
pd.Print();
private void PrintCurrentPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
}
Again, I don't know if it works for you but maybe it helps.
All the best,
Martin
|
|
|
|
|
Okay thanks, i'll give it a try.
Thank you for your time...
Enjou the rest of your day.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
thank you but i can't seem to find a way to specify a file and not a graphic. But thank you any ways... I guess it's back to the drawing board for me......
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
After a few months of using OOP and C#, there is one thing I can't get my head round:
* I've got the main form (Form1).
* Form1 contains two user controls (UserControl1 and UserControl2), both of which have some code associated with them.
* When UserControl1 is operated, I want (under certain circumstances) to refresh UserControl2.
UserControl1 does not know of the existence of UserControl2, so the call has to somehow go through Form1. I could solve this by having a static method in Form1 that will refresh UserControl2, but that wouldn't be very OOP.
What's the correct way of doing this? Am I missing the point somewhere?
Thanks for your help.
|
|
|
|
|
Raise an event in UC1, handle that event in Form, and update UC2.
|
|
|
|
|
Or use Parent.Refresh(), not very elegant since it'll refresh all child controls in your form, but it works.
|
|
|
|
|
Thanks for both your answers.
It works now.
|
|
|
|
|
You can also create a handler object that handles updating the user controls on the form.
|
|
|
|