|
in an editor when I will click the new submenu,a dialog box will appear where I can put the filename.so when I will click the the save button in the dialog box,whatever the file name entered that will appear on the main menu.like internet explorer whatever URL we are entering that is appearing on the main menu .How to do it
|
|
|
|
|
The way you word these, it sounds like you're reading them off your spec documents at work.
sarojkumarjena wrote: How to do it
http://www.c-sharpcorner.com/winforms/MenusFunctionalityGAG.asp[^]
That was my first google hit, by the way. So, you just add the menu items according to what you're shown on that page.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
my problem is not adding the menu items.When I will click the new submenu,a dialog box will appear
where I will enter the filename.When I will click the ok button of the dialog box,that filename will appear immideately on the main bar
|
|
|
|
|
OK, I have some questions
1 - are you being paid to write this code
2 - are you typing these questions in from your clients specification
3 - what part of what you typed above is confusing you
4 - how long have you been coding for
The best long term answer to this specific question kind of depends on how you answer my questions.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
OK, if you won't answer then I'll limit myself to saying that showing a dialog box and collecting a name is a very trivial task. If this is homework, you should pay attention in class more. If this is work, you should speak to your manager, not least because he needs to know that you can't do this on your own.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Is is possible to create a grid with a checkbox at column header ? like those web form.
|
|
|
|
|
Hi,
Im used to adding controls like radio buttons on web forms in a PlaceHolder ,
1.Is there a similar control on windows form as well otherwise how can I add controls dynamically on a windows form.
2.And if I add RadioButtons I need to group them by a 2 by 2 array..
In VS 2005 there is no group property for radio buttons... How do I do it?
Help plz..
_____________________________________________________
Yea! I could be wrong...
|
|
|
|
|
1 - There is a panel, but in Windows Forms, you can specify the location of your control, so it's not really needed
2 - Group them by placing them where you want them to be.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
2. I wnat group them in 2 by 2.. like
radButton1a | radButton1b
radButton2a | radButton2b
radButton3a | radButton3b
etc... Like I want radiobuttons 2 and 3 to be independent of 1... When I check radButton1b, only radButton 1a should be unchecked..
I hope I explain...
_____________________________________________________
Yea! I could be wrong...
|
|
|
|
|
I dunno if there's an easier way, but perhaps you need to create a control that holds two radio buttons, which will group them seperate from the rest of the form ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
My problem for school...
Write a program that has five text boxes numbered 1 through 4 and Result. After the user types something into each of the four text boxes, display whatever was typed into each in a 4-3-2-1 order in the Result text box.
I know how to do everything except outputting multiple numbers to a single text box. So far I have...
private void btnCalculate_Click(object sender, EventArgs e)
{
decimal number1;
decimal number2;
decimal number3;
decimal number4;
decimal result;
number1 = decimal.Parse(txtNumber1.Text);
number2 = decimal.Parse(txtNumber2.Text);
number3 = decimal.Parse(txtNumber3.Text);
number4 = decimal.Parse(txtNumber4.Text);
Do not make fun I am an extreme beginner trying to learn C#. I'm sorry for posting such an easy problem, but I couldn't find anything relevant on the internet or in my book. Any help would be greatly appreciated!
|
|
|
|
|
I don't want to give too much away (since it's a school project and all ), but you might want to look into the TextBox's AppendText method.
P.S. There's certainly no need to apologize for asking beginner questions; everyone starts at the same level.
|
|
|
|
|
Thanks for the fast reply , I didn't think anyone would post until the next day, but I was definately wrong. Also thanks for the info because I finally got it figured out.
|
|
|
|
|
I'm trying to implement the code found here:
http://www.codeproject.com/cs/files/recursivefileexplorer.asp
but I've hit a bit of a wall. I've got the following code in my project:
FileExplorer fe = new FileExplorer("C:\\boo");
FileData FileData = (FileData)fe.FileList[0];
but I keep getting the error: "...fe denotes a class where a field is expected"
I'm sure I'm not doing everything correctly, could someone give me a hand with this one?
Thanks in advance,
-Sean
|
|
|
|
|
It appears as you have used the name "fe" for a class in your project also.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
I am trying to start my email app (in this case Eudora) with a programatically generated email. However, Eudora does not seem to recognize any of the ways I have tried to create line breaks.
I have tried "\n", "\r\n", and using the StringBuilder AppendLine() method like this:
StringBuilder body = new StringBuilder(1024);
// AppendLine doesn't work
body.AppendLine("Thank you for registering!");
// Neither does this
body.Append(System.Environment.NewLine);
body.Append("Support Forums");
body.AppendLine();
body.Append("Please be sure that you have the latest version, ");
Process process = new Process();
process.StartInfo.FileName = "mailto:";
process.StartInfo.FileName += tbEmail.Text;
process.StartInfo.FileName += "?subject=GaugeGlow License Key";
process.StartInfo.FileName += "&bcc=benchmark-avionics@comcast.net";
process.StartInfo.FileName += "&body=";
process.StartInfo.FileName += body;
process.Start();
yet, when the email opens in the application, there are no line breaks at all.
Thanks,
Stick
|
|
|
|
|
I have a program that if it encounters an error, it asks the user for a new value from a new form. How can I pause execution so that when the User presses the button on the new form it continues execution on the original form?
|
|
|
|
|
Use the ShowDialog method to show the form.
---
b { font-weight: normal; }
|
|
|
|
|
numbers1thru9 wrote: How can I pause execution so that when the User presses the button on the new form it continues execution on the original form?
Pop up a modal dialog.
Best,
Jun
|
|
|
|
|
hello!
i'm wondering how can I populate a dataset with an arraylist??
I don't know if is so easy or crazy that no one writes about it...
it's driving me craazzyy...
|
|
|
|
|
Hi,
Try using this code. It works fine. Take it as an example. You can change to fit your needs.
ArrayList lst = new ArrayList();
lst.Add(1);
lst.Add(2);
lst.Add(3);
lst.Add(4);
lst.Add(5);
DataSet ds = new DataSet();
DataTable dt = new DataTable();
dt.Columns.Add();
dt.Columns.Add();
dt.Columns.Add();
dt.Columns.Add();
dt.Columns.Add();
ds.Tables.Add(dt);
ds.Tables[0].Rows.Add(lst.ToArray());
string items = "";
for (int i = 0 ; i < ds.Tables[0].Columns.Count ; i++)
{
items += ds.Tables[0].Rows[0][i].ToString();
}
MessageBox.Show(items);
Do your best to be the best
|
|
|
|
|
thanxs!!
I will try that code...
|
|
|
|
|
Hi All,
As given below I have an XML string and an arraylist which gives the correct sequence of the XML tags that is required.
<APL_OMNI_CLAIMS>
<SEQNO>Seq1</SEQNO>
<B_CO_CD>N</B_CO_CD>
<B_AREA_CD>Z</B_AREA_CD>
</APL_OMNI_CLAIMS>
My first task is to reorder the XML string as per the required tag order and then create a datatable so that we can bind it to a gridview to show data in following format
SEQNO Seq1
B_CO_CD N
B_AREA_CD Z
How do I do this stuff ??
Pls guide me, if any1 has some fundoostic idea on this.
Thanks
Omkar
|
|
|
|
|
Hi,
Omkar Ghaisas wrote: My first task is to reorder the XML string as per the required tag order and then create a datatable so that we can bind it to a gridview to show data in following format
Do you want an algorithm to reoder the XML string also?
I've just posted a way to insert an array list into a dataset's table. So you can create an array list with the items you want and then insert the array list into a dataset (or datatable). I'll post the code again.
ArrayList lst = new ArrayList();
lst.Add(1);
lst.Add(2);
lst.Add(3);
lst.Add(4);
lst.Add(5);
DataSet ds = new DataSet();
DataTable dt = new DataTable();
dt.Columns.Add();
dt.Columns.Add();
dt.Columns.Add();
dt.Columns.Add();
dt.Columns.Add();
ds.Tables.Add(dt);
ds.Tables[0].Rows.Add(lst.ToArray());
string items = "";
for (int i = 0 ; i < ds.Tables[0].Columns.Count ; i++)
{
items += ds.Tables[0].Rows[0][i].ToString();
}
MessageBox.Show(items);
Do your best to be the best
|
|
|
|