|
workbook.Worksheets.Add(Missing.Value, Missing.Value, Missing.Value, Missing.Value);
The MS example was incomplete. The line above works.
|
|
|
|
|
I am trying to make an application, and I want to have a menu at the top, and then when i click on lets say Start on the menu bar, it changes the window, so that it still has the menu at the top but everything else has changes. I dun want to remake the window, and i dun want to have all of the things in code and just change the visibility.
here is what i thought would work, creating UserControls and then change the UserControl.
UserControl replace = new CreatePage();
this.C = replace;
CreatePage is a page that asks for a bunch of items. Please let me know what i should do.
I do not get any sort of error, but nothing actually changes. Thanks for everyone helps
|
|
|
|
|
Throw your controls on a panel of some sort. When you want to hide them, hide the panel. Voila it's all gone.
WPF forum is over there[^], by the way.
Life, family, faith: Give me a visit.
From my latest post: "When Constantine severed the Hebrew origins of this faith in Messiah, a new religion was officially created. It is this religion that Orthodox Jews fear their relatives and friends becoming members of."
Judah Himango
|
|
|
|
|
thanks for the advice, i put it in the C# section because the coding i had was C#.
Still looking for maybe a better solution tho
|
|
|
|
|
I'm not sure I follow, but you should have some type of control (grid, canvas, etc) for your main window. Then based on the event (start menu click, for instance), add or remove your user controls.
For example: You have a Grid named MyGrid in your window, which has multiple row definitions and you want to add a user control (your replace control):
CreatePage replace = new CreatePage();
replace.SetValue(Grid.RowProperty, 2);
this.MyGrid.Children.Add(replace);
|
|
|
|
|
thanks your comments were helpfull, but here is my main predicament. I want to have a starting window. if you click a button it will show you something different. this different thing is called, and is a UserControl.
How it is Called:
void New_Click(object sender, RoutedEventArgs e)
{
this.Grid.Children.Remove(UC);
this.Grid.Children.Add(create);
}
create was already initialized up top, and it has its own xaml and code behind file.
So now the window is populated with all the original information but instead of UC in the main text area, i have put this new createplayer UserControl. Now its going to fill out some information in a form. then you would hit a submit button. I then want it to go back so that UC is the UserControl not create. Everything you entered into this form, is then saved into a class.
What is the best way to do this? Let me know if anything is unclear
|
|
|
|
|
In a mail merge task i am doing, it is desired to have one large file that holds all the merged documents for easy printout. Is there a quick and dirty way to append RTF files together? Thanks.
|
|
|
|
|
Read every file into a rich text box and copy and paste everything together.
Regards,
Thomas Stockwell
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.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
I'm currently developing a desktop application in C# that will be installed on a network drive.
This will cause FileIOPermission error because the users don't have the Full Trust on the Intranet Zone.
I don't want that the user should have to install the SDK to change the settings and wonder then if it possible to change the settings to Full Trust thrue the application?
|
|
|
|
|
Phrone,
I'd think this wouldn't be possible, else you could run any code you want on a persons computer.
Also, you dont need to do this. See link.
MSDN[^]
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
i highly doubt you can change to full trust via an application, i've tried to programatically change a handful of security settings all with negative results. Are you talking about the error you get running a .net program from a network drive because windows doesnt trust .net apps executing from a network drive, or your app is trying to write a file and the user doesnt have write permissions to the network drive? in either event i dont think theres any way to change it from the app, but you may convince whoever is deploying it to give write access to that directory for the latter problem. to solve the former you'll have to deploy it to each computer, or manually tell windows to trust that app on each system. I've had a similar problem before 6 mo or a year ago and couldnt find a work around aside from changing the setting on each computer, so i just told the users they had to locate the app on the system that would run it tho it doesnt sound like that solution will work for you.
|
|
|
|
|
NO AND IT ABSOLUTELY SHOULD NOT BE ALLOWED TO HAPPEN.
Being able to do this would be a road paved in gold for malware writers. "No need to worry about user security settings we can just turn it off for them WOOHOO!"
You know, every time I tried to win a bar-bet about being able to count to 1000 using my fingers I always got punched out when I reached 4....
-- El Corazon
|
|
|
|
|
Due to user feedback, Microsoft will be adding this to .NET 3.5 Service Pack 1: .NET 3.5 SP1 apps will run with full trust from the Intranet Zone[^].
.NET 3.5 SP1 will be released this summer, so if you can wait until then, you're all set. Until then, you'd have to setup a .NET security policy.
Life, family, faith: Give me a visit.
From my latest post: "When Constantine severed the Hebrew origins of this faith in Messiah, a new religion was officially created. It is this religion that Orthodox Jews fear their relatives and friends becoming members of."
Judah Himango
|
|
|
|
|
It's Through , not Thrue.
There, I'm happy.
My current favourite word is: I'm starting to run out of fav. words!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Hi All,
I have a timer with a interval of 1000 ms and a eventhandler :
timer_updateinterval = new System.Windows.Forms.Timer();
timer_updateinterval.Interval = 1000;
timer_updateinterval.Start();
timer_updateinterval.Tick += new EventHandler(RunTik);
in my RunTik methode i m checking the DateTime.now time and when it's equal to the DateAndTime setted on a lable, there most happen some action:
private void RunTik(object sender, EventArgs e)
{
DateTime now = DateTime.Now;
DateTime start = Convert.ToDateTime(lblStarttime.Text);
if (now.ToString() == start.ToString() | now > start)
{
///do something
}
}
Bud i m gettin the error: index was ouside the bounds of the array on the line:
DateTime now = DateTime.Now;
Can anyone tell my what the problem is and how to slove this?
Thanx.
|
|
|
|
|
Pankach Udhas,
I dont get the error, but i'd suggest some changes.
1) move the += new EventHandler() above the .Start() call
2) change Convert.ToDateTime to DateTime.TryParse
3) change the if statement to be:
if (now >= start)
{
}
Regards,
Gareth.
(FKA gareth111)
|
|
|
|
|
|
Hi folks,
I want to create a trigger using C# and execute using ExecutenonQuery.I can have TableName on which i've to Create a trigger at Runtime. I need to Create a trigger for both insert and update.Can anyone help me?
Appreciate any help.
Thanks in advance
sri
|
|
|
|
|
You need to generate sql command that creates a trigger in database during runtime programmatically and issue the command using SqlCommand class.
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
Hello,
I have a C# application that uses SoapFormatter.Deserialize (Stream) to persist a stored object. It used to work perfectly.
Then I made the application into a managed DLL, and called it from an unmanaged C++ DLL, which was invoked by an unmanaged C++ application:
C++ App => C++ DLL => C# DLL
Now, when I try to deserialize objects that used to work perfectly, I get:
"Parse error, no assembly associated with Xml key ..."
Microsoft documentation is unhelpful for this. Another web site suggested the problem is caused by "... changing the assembly name of your class...", but I haven't changed any name (that I'm aware of).
Does anyone have any insights into what's going on here?
Thanks!
|
|
|
|
|
|
Can anyone tell me if it is possible to programatically select a portion of a datagridview text box column? For example, the standard text box has SelectionStart and SelectionLength properties that can be used to programatically select a portion of its text, but I don't see those properties available with the DataGridViewTextBoxColumn. Am I missing something, or is selecting the entire column/cell my only alternative, even if I only wish to select a portion?
Thank you...
|
|
|
|
|
Hi,
I'm was wondering if LinkedIn has published its open-social APIs.
While searching i came across a article many times stating LinkedIn's founder declaring that these APIs will be publised in next 9 Months. This article was dated June 2007. So i guess by now they should have published it.
But i'm not able to get it any where on the net.
My main purpose is to use the APIs to get the list of contacts for LinkedIn user.
Google has publiehed such APIs.
If any one have any idea about this, please mail me at sunit_82@yahoo.com.
Thanx,
Sunit.
s.a.w.
|
|
|
|
|
There's an email link at the bottom right of this page[^] that seems to be the place to ask for API access
|
|
|
|
|
sunit_82 wrote: please mail me at sunit_82@yahoo.com.
No. That would defeat the purpose of community discussion boards. When an assistance is sent to your private email, only you benefit. When it is posted as a reply, you and posterity benefit from the post which becomes on par a valuable Kb.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|