|
hi all.
i want to add items and sub items to menu strip dynamically
how can i do that??
thanks all;
|
|
|
|
|
if you can do it with Visual Designer, you can do it with code as well. Have a look at what designer puts into its Xyz.Designer.cs file; and/or read the MSDN documentation.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
I have an article explaining how to do that
Dynamic Menu Strip[^]
Hope it helps
Harvey Saayman - South Africa
Software Developer
.Net, C#, SQL
you.suck = (you.Occupation == jobTitles.Programmer && you.Passion != Programming)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
Hello Guys,
At work I am developing a new reporting system where this small application will generate the report from an XML file and then gather the data from a database and the process the report in WORD Format. Now after i developed this application and tested it on my development machine it worked compleetly fine. But when i put it into production it was always giving me the same error "Object not set to an instance of an object". After investigating more i found out that it was crashing when it was trying to query how many boookmars there are in the word document, I found out that the Document was not being opend.
This is my code below:
Microsoft.Office.Interop.Word.ApplicationClass WordApp = new Microsoft.Office.Interop.Word.ApplicationClass();
object filename = System.Configuration.ConfigurationSettings.AppSettings["ReportPath"].ToString() + @"\template\" + TemplateNode.Attributes["path"].Value;
object _readonly = false;
object isVisable = true;
object missing = System.Reflection.Missing.Value;
Microsoft.Office.Interop.Word.Document WordDocument = WordApp.Documents.Add(ref filename, ref missing, ref missing, ref missing);
This code is resulting in the Object "WordDocument" being null. Now the funny thing is that this works fine in my developemtn machinie but id dosent work correctly on the server.
My Development Machine = Windows XP
Server = Windows server 2003
Anonye has any ideas as i am lost?
Regards,
Christian Pace
|
|
|
|
|
wrong file path?
access restrictions?
wrong Office version?
a code bug?
you need to open your eyes and debug the situation.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
I did the file path is correct, there are no restrictions and the office version is correct i am using the same installation on both the development machine and the server so the word version is the same. and how can it be a code bug when i went trough it on the development machine and it worked fine.
|
|
|
|
|
a program that has run as anticipated once or twice in a single environment has not proven to be correct.
Anyway, something is apparently wrong, so you should doubt all your assumptions one by one, and only trust hard observations.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
Hi again,
I found the following error message in the Event log:
The description for Event ID ( 2001 ) in Source ( Microsoft Office 11 ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Microsoft Office Word, .
Have any idea how i can proceed on this?
Thank you very much for your help
Regards,
Christian Pace
|
|
|
|
|
cdpace wrote: Have any idea how i can proceed on this?
idea[^]
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
Hi Guys
I have the most annoying problem. I have written a very simple program that uses SQL Compact as it's data store. It works fine on Win 7, XP and Win 2k3. But when I install it on Vista (basic) I get the error message "Attempted to read or write protected memory" when ever I try and do anything with squirrel compact.
I've made sure that this problem laptop is up to date with updates, I have disabled DEP, and I am still getting the error.
The only other thing I can find is that the Memory is corrupt, but I do not know how to fix this (if this is the actual problem)
Has anyone else experianced this problem? Any idea's on how to fix it? I'm really at my wits end, and there is money at stake!!!
Thanks,
oooo, the Jedi's will feel this one....
|
|
|
|
|
|
Sorry... I was hoping that there was something that I could change in my C# application to get around this problem...
oooo, the Jedi's will feel this one....
|
|
|
|
|
Try running the app (under Vista) with XP compatibility set
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
How to set the form's color to transparent ?
|
|
|
|
|
Set the form's Back Color and Transparency Key property value to the be the same color.
That is all that you need to do!
I personally prefer to use magenta, as its an unlikely color to cause other issues.
Dax Frost
There Are 10 Kinds Of People,
Those That Understand Binary,
And Those That Don't
|
|
|
|
|
How to locate a form in screen "right down-Conner" position?
|
|
|
|
|
point p=new point(Screen.PrimaryScreen.WorkingArea.Width-this.Width,Screen.PrimaryScreen.WorkingArea.Height-this.Height-30);
this.location=p;
|
|
|
|
|
in the first form i have a table of labels of categories(history, geography, etc...)and a label that counts the money that i have (we start by a certain number of money) so when i click on a label a question must appear in a new form, i answer the question and i claculate the new amout of money, i close the new form and return to the initial form where the label that counts the money must be uptadeted... the problem is when i come back to the initial form the label shows the initial amout that i have initially entered without being uptated.. even though i declared a public class
|
|
|
|
|
Hi,
could you send code, how you open the 2nd form? That would help
bye
|
|
|
|
|
in the event label_click (first form)
{
form2 f2=new form2();
f2.ShowDialog();
}
that's all ....
|
|
|
|
|
Hi,
after ShowDialog() you should update your label manually. The event will stop until your form closed, at ShowDialog()
hope it helps
bye
|
|
|
|
|
You need some method to actually trigger the update of the label. If you've used databinding against the label, you can update it using INotifyPropertyChanged . Alternatively, you have to manually trigger the update yourself.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
i want to check if a given point (x,y) lies inside a region. I know only the edge coordinates of the region( a list of points). the region is an irregularly shaped region.
i have tried out many solutions but havent got a proper answer yet. pls help me out.
thank u.
|
|
|
|
|
Try here[^]
All those who believe in psycho kinesis, raise my hand.
My 's gonna unleash hell on your ass. tastic!
|
|
|
|
|
thanks.
the solution looks great. my region is actually a curve and i know the coordinates of every pixel. can i consider the curve to be a polygon??
can i form the arrays polyX and polyY from the coordinate values of every pixel??
|
|
|
|