Click here to Skip to main content
15,914,642 members
Home / Discussions / C#
   

C#

 
QuestionConverting Word Doc to PDF on runtime Pin
Zuhair Rizvi31-Jul-08 1:34
Zuhair Rizvi31-Jul-08 1:34 
AnswerRe: Converting Word Doc to PDF on runtime Pin
Simon P Stevens31-Jul-08 1:48
Simon P Stevens31-Jul-08 1:48 
GeneralRe: Converting Word Doc to PDF on runtime Pin
Thomas Stockwell31-Jul-08 2:06
professionalThomas Stockwell31-Jul-08 2:06 
GeneralRe: Converting Word Doc to PDF on runtime Pin
Simon P Stevens31-Jul-08 2:27
Simon P Stevens31-Jul-08 2:27 
AnswerRe: Converting Word Doc to PDF on runtime Pin
Thomas Stockwell31-Jul-08 2:16
professionalThomas Stockwell31-Jul-08 2:16 
QuestionProgress Bar Problem Pin
Syed Shahid Hussain31-Jul-08 1:08
Syed Shahid Hussain31-Jul-08 1:08 
AnswerRe: Progress Bar Problem [modified] Pin
Simon P Stevens31-Jul-08 1:14
Simon P Stevens31-Jul-08 1:14 
AnswerRe: Progress Bar Problem Pin
#realJSOP31-Jul-08 1:24
professional#realJSOP31-Jul-08 1:24 
AnswerRe: Progress Bar Problem Pin
Thomas Stockwell31-Jul-08 2:19
professionalThomas Stockwell31-Jul-08 2:19 
GeneralRe: Progress Bar Problem Pin
#realJSOP31-Jul-08 2:23
professional#realJSOP31-Jul-08 2:23 
AnswerRe: Progress Bar Problem Pin
Ravi Bhavnani31-Jul-08 2:46
professionalRavi Bhavnani31-Jul-08 2:46 
GeneralRe: Progress Bar Problem Pin
Simon P Stevens31-Jul-08 4:49
Simon P Stevens31-Jul-08 4:49 
GeneralRe: Progress Bar Problem Pin
Syed Shahid Hussain31-Jul-08 17:29
Syed Shahid Hussain31-Jul-08 17:29 
GeneralRe: Progress Bar Problem Pin
Ravi Bhavnani1-Aug-08 1:55
professionalRavi Bhavnani1-Aug-08 1:55 
GeneralRe: Progress Bar Problem Pin
Syed Shahid Hussain1-Aug-08 2:36
Syed Shahid Hussain1-Aug-08 2:36 
QuestionRunning object table changed event Pin
Green Fuze31-Jul-08 0:57
Green Fuze31-Jul-08 0:57 
QuestionModeless Form with invisible controls [SOLVED] [modified] Pin
#realJSOP31-Jul-08 0:41
professional#realJSOP31-Jul-08 0:41 
QuestionHow to Call C#.Net dll from VB6.0 Pin
rajesh4u31-Jul-08 0:36
rajesh4u31-Jul-08 0:36 
AnswerRe: How to Call C#.Net dll from VB6.0 Pin
Simon P Stevens31-Jul-08 0:45
Simon P Stevens31-Jul-08 0:45 
QuestionSeeking help with error checking codes in the stack builder program shown. Pin
Angelinna31-Jul-08 0:17
Angelinna31-Jul-08 0:17 
This code is working perfectly BUT am seeking help with the three possible error codes codes in the places numbered 1,2,and 3

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Stackbuilder
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
stackTop = -1;
}

private int[] stackArray = new int[10];
private int stackTop;
private int val;
private int topValue;
private int peekValue;
private int k;

private void displayStack()
{
string nextItem;

displayBox.Clear();
for (int i = 0; i <= stackTop; i++)
{
nextItem = stackArray[i].ToString();
displayBox.AppendText(nextItem);
displayBox.AppendText("\n");
}
}

private Boolean emptyStack()
{
return (stackTop == -1);
}

private void displaybutton_Click(object sender, EventArgs e)
{
displayStack();
}

private void initbutton_Click(object sender, EventArgs e)
{

stackTop = -1;
displayStack();

}
1. // add error-checking code here
private void pushbutton_Click(object sender, EventArgs e)
{
try
{
val = Convert.ToInt32(valueBox.Text);
valueBox.Clear();
}
catch
{
MessageBox.Show("Please enter an integer.");
valueBox.Focus();
return;
}

stackTop = stackTop + 1;
stackArray[stackTop] = val;

displayStack();
valueBox.Focus();
}

2. //add error-checking code here
private void popbutton_Click(object sender, EventArgs e)
{
stackTop = stackTop - 1;

displayStack();
}

3. //add error-checking code here
private void topbutton_Click(object sender, EventArgs e)
{
topValue = stackArray[stackTop];

displayBox.Clear();
displayBox.AppendText("Most recently added item is \n");
displayBox.AppendText(topValue.ToString());
displayBox.AppendText("\n");
}

//add code here to implement peek function
private void peekbutton_Click(object sender, EventArgs e)
{
peekValue = stackArray[stackTop - 1];
displayBox.Clear();
displayBox.AppendText("The item below the most recently added item is \n");
displayBox.AppendText(peekValue.ToString());
displayBox.AppendText("\n");
}

}
}
AnswerRe: Seeking help with error checking codes in the stack builder program shown. Pin
AhsanS31-Jul-08 0:37
AhsanS31-Jul-08 0:37 
Questionnormalize URL Pin
George_George31-Jul-08 0:13
George_George31-Jul-08 0:13 
AnswerRe: normalize URL Pin
leppie31-Jul-08 0:16
leppie31-Jul-08 0:16 
GeneralRe: normalize URL Pin
George_George31-Jul-08 0:18
George_George31-Jul-08 0:18 
GeneralRe: normalize URL Pin
DaveyM6931-Jul-08 0:26
professionalDaveyM6931-Jul-08 0:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.