Ramy Mahrous 401 Postaholic Featured Poster

I won't solve your problem!! your question solved try to do your task on your own, that's for your interest, by this way you won't get any useful!

Ramy Mahrous 401 Postaholic Featured Poster

Sorry the right one is

public void TakeThis(int[,] array)
{
//
}
int[,] arrayOfIntegers = new int[1,2];
Form2 form2 = new Form2();
form2.TakeThis(arrayOfIntegers);
Ramy Mahrous 401 Postaholic Featured Poster

Give me your testing class code, that's fuzzy!!

Ramy Mahrous 401 Postaholic Featured Poster

Like to pass a value from one form to another

public void TakeThis(int[][] array)
{
//
}
int[][] arrayOfIntegers = new int[1][2];
Form2 form2 = new Form2();
form2.TakeThis(arrayOfIntegers);
Ramy Mahrous 401 Postaholic Featured Poster

Is Test123 static method??! if not you should initiate instance first from Testing class

Testing _testing = new Testing();
_testing.Test123();
//Test123 should be public
Ramy Mahrous 401 Postaholic Featured Poster

I mean such questions that related to ASP.NET, preferebly to ask at ASP.NET forum to get accurate and fast help :)

Ramy Mahrous 401 Postaholic Featured Poster
void txt_TextChanged(object sender, EventArgs e)
{
if(HowManyOccurance(yourTextBox.Text, '\n') <=10)MessageBox.Show("Correct");elseMessageBox.Show("Please make it shorter, just 10 lines permitted");}int HowManyOccurance(string str, char charToSearchFor)
        {
            int numberOfOccurance = 0;
            CharEnumerator ce = str.GetEnumerator();
            while(ce.MoveNext())
            {
                if (ce.Current == charToSearchFor)
                    numberOfOccurance++;
            }
            return numberOfOccurance;
        }

{
if(HowManyOccurance(yourTextBox.Text, '\n') <=10)
MessageBox.Show("Correct");
else
MessageBox.Show("Please make it shorter, just 10 lines permitted");
}
}
Ramy Mahrous 401 Postaholic Featured Poster

You can parse your webpage and extract URLs from using Regular Expression, then displaying them as list

Ramy Mahrous 401 Postaholic Featured Poster

Use this sample http://fci-h.blogspot.com/2008/04/how-to-save-image-in-sql-server.html but modify it to work with documentation files, just read in FileStream

Ramy Mahrous 401 Postaholic Featured Poster

Just get the description textbox user enters description into and pass it.

int HowManyOccurance(string str, char charToSearchFor)
        {
            int numberOfOccurance = 0;
            CharEnumerator ce = str.GetEnumerator();
            while(ce.MoveNext())
            {
                if (ce.Current == charToSearchFor)
                    numberOfOccurance++;
            }
            return numberOfOccurance;
        }

{
if(HowManyOccurance(yourTextBox.Text, '\n') <=10)
MessageBox.Show("Correct");
else
MessageBox.Show("Please make it shorter, just 10 lines permitted");
}
Ramy Mahrous 401 Postaholic Featured Poster
Ramy Mahrous 401 Postaholic Featured Poster

Look, I tried it myself it works fine without replacing anything, Just I read text file using this

string str = File.ReadAllText(filePath);
textbox.Text = str;

No additional characters added!!
May be you should provide non-unicoding in ReadAllText method.

Ramy Mahrous 401 Postaholic Featured Poster

Just small question, you read text from file and then write it to textbox?? or what?

Ramy Mahrous 401 Postaholic Featured Poster

Your TextBox is multiline or isn't??

Ramy Mahrous 401 Postaholic Featured Poster
string str = char.ConvertFromUtf32(65)
Ramy Mahrous 401 Postaholic Featured Poster

Problem in your query! preview it again

Ramy Mahrous 401 Postaholic Featured Poster

You're welcome, hope it helped!
Please mark your thread solved if it been.

Ramy Mahrous 401 Postaholic Featured Poster

Correct!

Ramy Mahrous 401 Postaholic Featured Poster

OK, best of luck, feel free to ask whenever you need!

Ramy Mahrous 401 Postaholic Featured Poster

They manage it perfectly! they put it in separated file, [FormName].Designer.cs to not mix it with your own code.

Ramy Mahrous 401 Postaholic Featured Poster

Here you are

static void Main(string[] args)
        {
            Console.WriteLine(GetDifferenceDate(new DateTime(2008, 11, 25, 10, 30, 2), 
                new DateTime(2008, 6, 2, 6, 3, 5)));
        }

        static string GetDifferenceDate(DateTime date1, DateTime date2)
        {
            if (DateTime.Compare(date1, date2) >= 0)
            {
                TimeSpan ts = date1.Subtract(date2);
                return string.Format("{0} days, {1} hours, {2} minutes, {3} seconds", 
                    ts.Days, ts.Hours, ts.Minutes, ts.Seconds);
            }
            else
                return "Not valid";
        }
Ramy Mahrous 401 Postaholic Featured Poster

You can code your own UI elements, without playing with InitializeComponent method, this way called creating controls at run time.
But give me why you don't need to use VS Designer ??!!!

Ramy Mahrous 401 Postaholic Featured Poster

What's the question???
You may need to look at string class!

Ramy Mahrous 401 Postaholic Featured Poster

You may have to save it in cookie.
Better go to asp.net forum http://www.daniweb.com/forums/forum18.html and show your question there.

Ramy Mahrous 401 Postaholic Featured Poster
System.Net.Sockets.TcpClient t1 = new Client();
Ramy Mahrous 401 Postaholic Featured Poster

You mean MDI? or just you need to open Form2 from Form1 and use some values in Form1 user entered in Form2??

For second case, just create another Form let say it called Form2, some public members (TextBox, ListBox, etc...)

Add this code in Form1 to open Form2

Form2 form2 = new Form2();
fom2.ShowDialog();//enforces user to not back to form1 unless finishing work on form2

Get the value of form2's textbox

string str = form2.textbox2.Text;
Ramy Mahrous 401 Postaholic Featured Poster

Stream works in C#, just convert your file to binary data and save it into column of datatype that's for SQL Server 2000/2005 but if you use SQL Server 2008 you don't need to convert it to Binary as there's datatype called FileStream.

Ramy Mahrous 401 Postaholic Featured Poster

Better move your thread to ASP.NET forum http://www.daniweb.com/forums/forum18.html

Ramy Mahrous 401 Postaholic Featured Poster

Authentication problem, I'll reply you ASAP.

Ramy Mahrous 401 Postaholic Featured Poster

mmmm, let my think with you, I like such an idea, don't worry they won't delete this thread. I'll work on and reply with some info if got.

Ramy Mahrous 401 Postaholic Featured Poster

Better move your thread to ASP.NET forum http://www.daniweb.com/forums/forum18.html

Ramy Mahrous 401 Postaholic Featured Poster

Sorry, seems I didn't understand you well, you need to get last two characters and increment their value (means if input string xxxxAB so the result should be xxxxBC)?
if yes get last 2 characters get each of which increment thier ascii value by 1. that's my solution, if you need code reply again.

Ramy Mahrous 401 Postaholic Featured Poster

Say you've button, when user presses on it fills the grid with the data filtered with your critria, OK?

So, on you button click event handler write this code

this.table1TableAdapter.FillBy(this.myDataSet.myTable, new System.Nullable<int>(((int)(System.Convert.ChangeType(textbox1.Text, typeof(int))))));

N.P: My critria was integer value
sorry but I don't know VB.NET code :)

Ramy Mahrous 401 Postaholic Featured Poster

Expression blend generate xaml for your controls so you can embed them to your application

Ramy Mahrous 401 Postaholic Featured Poster

step towards AOP architecture, sometimes you need to run something before calling the method. like if you want to just print to specific user

[CheckUserPermission(userName, password)]
void print()
{
//your code
}
Ramy Mahrous 401 Postaholic Featured Poster

It works with me :) try that Console.Beep(37, 1000);

Ramy Mahrous 401 Postaholic Featured Poster

Just because you debug, run your web-based application (Ctrl + F5) there is no exception.

Ramy Mahrous 401 Postaholic Featured Poster

why you need to develop it yourself as it exists? just add reference to System.Windows.Forms and use it in your web-based application.

Ramy Mahrous 401 Postaholic Featured Poster

Sure, you use Windows Vista??
Right click on this program and Run as administrator.

Ramy Mahrous 401 Postaholic Featured Poster

and also you should have datasource (links) in XML, database, plain text,... etc

Ramy Mahrous 401 Postaholic Featured Poster

No way as you use some of administrative tasks like, writing on files which located on system drive, sql connections, etc....

Ramy Mahrous 401 Postaholic Featured Poster

What's the error?
Error messages or nothing appears??

Ramy Mahrous 401 Postaholic Featured Poster

No, you may have XML file has links text and their URLs, and you should loop on the nodes and create LinkedLabel @ runtime.

Ramy Mahrous 401 Postaholic Featured Poster
Dim stopWatchInstance as new System.Diagnostics.StopWatch()
stopWatchInstance.Start()
stopWatchInstance.Stop()
stopWatchInstance.Reset()
Ramy Mahrous 401 Postaholic Featured Poster

Your client can disable it.

Ramy Mahrous 401 Postaholic Featured Poster

call them!!

Ramy Mahrous 401 Postaholic Featured Poster

You can use regular expression to validate user input, in your case your regular expression'd be ^\d{3}-\d{4}$
So, on your btn validate click event handler you can check if user enters valid phoen number or not

if Regex.IsMatch(txtPhoneNumber.Text, textBox1.Text)
then
MessageBox.Show("Correct")
else
MessageBox.Show("Wrong")
Ramy Mahrous 401 Postaholic Featured Poster
comboBox1.Items.Clear()
Ramy Mahrous 401 Postaholic Featured Poster

Look I can't look at your code but I'll give you an example

delegate void Hello();

        void SetHello()
        {
            txtBox.Text = "Hello";
        }

        void Perform()
        {
            Hello setHelloDelegateInstance = new Hello(SetHello);
            if (txtBox.InvokeRequired)
            {
                txtBox.Invoke(setHelloDelegateInstance, new object[] { });
            }
            SetHello();
        }

        private void btn_Click(object sender, EventArgs e)
        {
            Thread t = new Thread(new ThreadStart(Perform));
            t.Start();
        }

You can also code your fetch textbox's text in the same mannar.

Ramy Mahrous 401 Postaholic Featured Poster

He could also use SSIS for those tasks but it more advanced, I saw the best solution is to use Backup SP, but also your solution Jerry is nice.