|
Factor the code out to a method you call at the end of your refresh method.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi Christian,
could you be more specific ?
i couldn't understand what you mean by your answer.
|
|
|
|
|
It's painfully obvious. you have some code inside an event, that you need to run in a situation where the event does not fire. So take this code, move it to a new method, and then call this method from your event, and from the method which you were hoping would fire this event.
And buy a basic book like 'Code Complete', and read it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Ok mr.Graus
so if you say so, how would i get the TreeViewEventArgs if im calling a method where no such args are sent to it ?!?!?!?
|
|
|
|
|
You could build an instance of TreeViewEventArgs using tvwProjects.SelectedNode and pass it to the factored method.
|
|
|
|
|
I am running Windows Vista using Visual Studio 2008 to build a Office 2007 Plug-in making use of WPF. Everything used to work fine until I installed .NET 3.5 SP1 and the WPF Toolkit. What happens is that when I build the solution Visual Studio closes unexpectedly.
I have read up on this issue and the only related issues I could find was that the Powertools plug-in causes this problem. I do not have powertools or any other plug-ins installed. Other project types build fine... only Outlook plug-ins gives this problem.
Any help on this would be appreciated.
|
|
|
|
|
I had similar issue with, but it happened when I used SVN incorrectly. My Only solution was to create a new project and import only code files but not generated files such as .vsproj.
also don't forget to backup before doing this.
I Kinda deleted and imported from my own SVN and some files got corrupted. As described above, it helped me
|
|
|
|
|
Thank you for the reply Saksida, I have followed you're advice and now the solution builds 70% of the time. The rest of the time Visual Studio still crashes. I will do a clean install of Visual Studio and hopefully this will solve the problem.
|
|
|
|
|
Hi, all,
In WinForms with C#, a TableLayoutPanel custom control with, saying, 10 rows and 5 columns being designed in designer window. NumberOfRows was coded as a property of this custom control. I wish to change this property value and set it as a new RowCount of the TableLayoutPanel mentioned above, before the custom control running InitializeComponent() . Is this possible? I have tried to do it with a method in the SET of that property as below:
private void OnNumberOfRowsChanged()
{
tableLayoutPanel1.RowCount = numberOfRows;
}
and it didn't work while I change the value of NumberOfRows property, and set a breakpoint in the constructor method of that custom control, the RowCount remains as 10.
Btw, I tried to use tableLayoutPanel1.RowStyles.Remove() and tableLayoutPanel1.RowStyles.RemoveAt(index) as well, neither of these two works as well...
Any Idea?
Your kind help is so much appreciated!!
Br!
Sun
|
|
|
|
|
How to open a file with my c# project using open with pop up in windows?
i want to open an audio file with the media player that i have created in c#, i have deployed it and installed it on my pc. and want to open a file with my project using open with pop up for windows but it does not run my file..
can any1 help me out...
|
|
|
|
|
I can't for the life of me work out what you're talking about, or what your problem is. What is 'pop up for windows' ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
My guess is he wants OpenFileDialog.
|
|
|
|
|
Does your menu have an Open File option in the media player or at least a button to do so? If not add one.
Then add OpenFileDialog and have it fire when needed.
|
|
|
|
|
Hai friends
I've been trying to convert files (office) to pdf.
For that i installed SaveAsPDFandXPS.exe from Microsoft and iam using Office 2007, it works in office 2007 but creates problem in a machine with office 2003.
object format = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatPDF;
the code above is not supported in office 03 but s supported in 07.
Is there any way by which i can convert the file to pdf in office 03.
Thanks in advance for all your helping hands..
Santo
Santhosh
|
|
|
|
|
You probably need to buy a library that is more universally supported instead of using what you're using.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks Christian for ur prompt reply
Do you know any library.. which will b available in dotnet hence i can use that function directly.
Thanks
Santo
Santhosh
|
|
|
|
|
From Word ? I'm not sure, I think I've seen one, it was quite expensive, and I forget the name.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
If you install a pdf printer such as PDFcreator, you could simply open the word doc, then print it. Though you can print programatically in such a way as to avoid the print dialog boxes, you'll still be faced with PDFCreator's 'save as' dialog box. I don't know if it is practical to automate the 'save as' dialog interation in your situation; though, if you are just trying to convert a few hundred files or will always use this in a manual enviornment, this should solve your problem.
If you take this approach and can't/don't automate the 'save as' dialog interaction, I recommend putting the target file name and path in the clipboard so that you only 'ctrl-c' the file name and click save.
Hope this helps
|
|
|
|
|
Did u get any solution for your question if yes plz share with me also because i also have same requirement...........
thanks in advance
aashish
|
|
|
|
|
There is a dll file in a program I use that contains product information for the program to use. I was wondering is there any way I can gain access to the data in the dll file in a C# project. The file dosent contain anything that I shouldnt have, it is just catalogue information.
I have never accessed data from a dll file before and I dont know where to start. I can access the data using Resource hacker but when I tried to add it as a reference to my C# project in Visual studio it gave an error saying that the file isnt a valid com component. I am sure that this is obvious to anyone that has a clue about this, but as you can tell i dont.
Can anyone help me access the data in the dll file?
|
|
|
|
|
What DLL is that? A managed one or a native DLL?
Best wishes,
Navaneeth
|
|
|
|
|
dont really know the difference. All I know is that it is packaged with the program and it contains catalogue data .
|
|
|
|
|
If you can't import it into a .NET app, then it probably is neither COM nor .NET, meaning it's just a bog standard dll, and my answer below applies.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
If it's not a COM component, then you can try to reference it as a standard .NET dll. If that doesn't work, then it's not written in .NET, and .NET is the only way you could use reflection to read the contents of the dll. Even if it was COM, you still couldn't read the contents. Your best bet in that case, is to use a hex editor to see if what you want is sitting in there in an unencrypted state.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
yeah ok thanks, but I am really looking for an easier solution.
|
|
|
|