Ramy Mahrous 401 Postaholic Featured Poster

Welcome :)

Ramy Mahrous 401 Postaholic Featured Poster

I think there's no problem but Master database has another usage by SQL Server itself, first create another database and copy your data into instead of Master database.

Ramy Mahrous 401 Postaholic Featured Poster

I tried ti use Application.exit(); but for some reason when I compile and run with VC++ 2005 I get the error which has break or continue

!!!!

Ramy Mahrous 401 Postaholic Featured Poster

Very great answer Lizr, I like it and in general your way in solving people questions (Y)

Ramy Mahrous 401 Postaholic Featured Poster
Ramy Mahrous 401 Postaholic Featured Poster

Use triggers

Ramy Mahrous 401 Postaholic Featured Poster

I didn't understand you, what you mean by "copying database" is to copy its data or copy the files?
If you need to copy its data right click on the database->All tasks->Copy database
If you need to copy its files to move it to another machine; right click on the database->All tasks->detach
then copy physical database files from its location on existing machine then paste them to the another machine (the server in your case) then right click on databases->attach database->select it from its location

Ramy Mahrous 401 Postaholic Featured Poster

Muke, seems you didn't normalize your database design!!

Ramy Mahrous 401 Postaholic Featured Poster

You save it into temp file on local HDD, then preview it... No great memory consumption.

Ramy Mahrous 401 Postaholic Featured Poster

What shall you to do is to call GetAllParents and give it the ChildID you need to get all its parents

GetAllParent 27937
Ramy Mahrous 401 Postaholic Featured Poster

It's really the most hard question I've met! loool I don't use to write SQL frequently, I just did the half of task to you, is to get parent ID, please care and ask if you didn't understand anything in my script, I work more than 2 hours in :(

Create proc GetParent
@Child int,
@Parent int output
AS
SELECT @Parent = o_parentno
FROM         phillip
WHERE     o_projectno = @Child

Create proc GetAllParent
@ChildID int
AS
	if @ChildID != 0
		begin
			Declare @CurrentParent int
			while @ChildID != 0
				begin
					exec GetParent @ChildID, @Parent = @CurrentParent output
					Select @CurrentParent
					set @ChildID = @CurrentParent
					if @ChildID <= 0 
						break
					Else
						continue
				end
		end
Ramy Mahrous 401 Postaholic Featured Poster

It's better if you want to begin developing new thing is to googlize it,
http://www.c-sharpcorner.com/UploadFile/mahesh/window_service11262005045007AM/window_service.aspx

Ramy Mahrous 401 Postaholic Featured Poster
Ramy Mahrous 401 Postaholic Featured Poster

You can save it into file .html\htm then call

webbrowser.Navigate(htmlFilePath)
Ramy Mahrous 401 Postaholic Featured Poster

Go to google.com search on "array in VB.NET"

Ramy Mahrous 401 Postaholic Featured Poster

If you can convert text to html tags you can save these tags into text file with extension htm\html!

Ramy Mahrous 401 Postaholic Featured Poster

Learn how to add Media Player component to your windows form application.

Ramy Mahrous 401 Postaholic Featured Poster

Welcome back kischi, This is C# forum not ASP.NET, try to move your thread there http://www.daniweb.com/forums/forum18.html

Ramy Mahrous 401 Postaholic Featured Poster

mmmm, just take a look

bool Validate(string username, string password)
{
//you're code
}
//button login event handler
void onClick_btnLogin(object sender, EventArgs e)
{
if(Validate(txtUserName.Text, txtPassword.Text))
{
Form2 form2 = new Form2().Show();
this.Hide(); //to hide login form
}
else
{
//invalid username or password
}
}
Ramy Mahrous 401 Postaholic Featured Poster

In regular windows you can switch between parent and child windows, on the other hand you can't.

Ramy Mahrous 401 Postaholic Featured Poster

You just didn't try right outer join

SELECT     master.id AS [Master ID], master.field1 AS [Master field], child.field1 AS [Child Field]
FROM         child RIGHT OUTER JOIN
                      master ON child.masterid = master.id
Ramy Mahrous 401 Postaholic Featured Poster

Mark your thread a solved, and try to search on your problems and search more then search more and more if you don't get an answer come with your question, sooner you'll be great programmer :)

Ramy Mahrous 401 Postaholic Featured Poster

Check if your array comes in order or not.

Ramy Mahrous 401 Postaholic Featured Poster

I don't understand you, your question was to open web page in webbrowser control when selecting a node... I thought my code works, let me know what texts nodes hold?

Ramy Mahrous 401 Postaholic Featured Poster

Please SerogaM, mark this thread as solved if you question correctly answered.

Ramy Mahrous 401 Postaholic Featured Poster

If you saved this bitmap on client's HDD, what the result, also black?

Ramy Mahrous 401 Postaholic Featured Poster

You should have integral value decreases each time tick

int tik = 30;
        private void timer1_Tick(object sender, EventArgs e)
        {
            if (tik >= 0)
                label1.Text = (tik--).ToString();
            else
                label1.Text = "Stopped";
        }
Ramy Mahrous 401 Postaholic Featured Poster
Ramy Mahrous 401 Postaholic Featured Poster
Ramy Mahrous 401 Postaholic Featured Poster

You can use Random class or let's database increment id column automatically.

Ramy Mahrous 401 Postaholic Featured Poster

sorry! what's the problem?

Ramy Mahrous 401 Postaholic Featured Poster

Not to mention you can use navigate method

webBrowser1.Navigate(e.Node.Text) 'without need to add "http://"
Ramy Mahrous 401 Postaholic Featured Poster

Assume you've parent node and its child two nodes with text (www.microsoft.com and www.daniweb.com)
From treeview event handler, double click on NodeMouseClick

Private Sub treeView1_NodeMouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles treeView1.NodeMouseClick
        webBrowser1.Url = New Uri("http://" + e.Node.Text)
    End Sub
Ramy Mahrous 401 Postaholic Featured Poster

Web development forum help better, move your thread there :)

Ramy Mahrous 401 Postaholic Featured Poster

Thanks, Ddanbe for your nice help :)

Ramy Mahrous 401 Postaholic Featured Poster

C# used for developing OS and it succeeds, Will it lacks in developing professional game?! I think you may be wrong! so please if you want us to argue what C# can do and can't, let's start new thread in geek forum

Ramy Mahrous 401 Postaholic Featured Poster

Look Wallish, my scenario works fine if you also create buttons at runtime!!
suppose I've my button OnClick event handler

void AnyButtonOnClick(object sender, EventArgs e)
{
Button ClickedButton = (Button)sender;
switch(ClickedButton.Text)
{
case "Quit":
Quit();
break;
}           
}

This creates button at runtime

Button btnQuit = new Button();
...
...
...
btnQuit.Click+=new EventHandler(AnyButtonOnClick);

I don't see any problem with my scenario except you should have pre-defined methods.

If you don't understand me, ask which part you don't.

Ramy Mahrous 401 Postaholic Featured Poster

This occurs with English text?? or Arabic\Indian or non-English text?

Ramy Mahrous 401 Postaholic Featured Poster

loool, you're welcome :)

Ramy Mahrous 401 Postaholic Featured Poster

What I've understood from your question you need to know which button clicked (and it's not work Probably with huge number of buttons) I've better scenario is to Create ONE event handler for Button Click and assign this handler to all buttons.
I've 10 buttons with text say (1....10)

private void button1_Click(object sender, EventArgs e)
{
Button ClickedButton = (Button)sender;

switch(ClickedButton.Text)
{
case "1":
...
break;
case "2":
...
break;
..
..
..
..
}           
}

I hope I've understood you well.

Ramy Mahrous 401 Postaholic Featured Poster

Look, object (application, controls, textbox, combobox, etc...) data saved in machine memory, so when your application closed all its data removed.
To do your scenario, to add an item then close the application, and when you start it again, you find this item, you should have data repository (SQL Server, MySQL, XML, etc...) holds combobox items.

Ramy Mahrous 401 Postaholic Featured Poster

Please, Anil ask this question in ASP.NET forum, it may be better...

Ramy Mahrous 401 Postaholic Featured Poster

It's not advanced C++, it's language from Microsoft combines strength of C++ and easiness of VB. you can read about C# in http://MSDN.com

Ramy Mahrous 401 Postaholic Featured Poster

works?

Ramy Mahrous 401 Postaholic Featured Poster

You can bind data in ListBox by some criteria, and in ComboBox selected index changed event handler re-bind the data into ListBox. search in http://msdn.com you'll find a lot of exampls...

Ramy Mahrous 401 Postaholic Featured Poster

Set the property SelectedIndex to the item's index you want it to be the default...
Say we want to show the 6th item
In form load handler add this piece of code

comboBox1.SelectedIndex = 5;
polo_coins commented: Thanks a lot Ramy nice to meet you and thanks for your help +1
Ramy Mahrous 401 Postaholic Featured Poster

My friend wrote a post about to show display flax movie in windows form by C# take a look http://fci-h.blogspot.com/2007/06/how-to-play-flash-swf-inside-c.html

Ramy Mahrous 401 Postaholic Featured Poster

let your SQL holds the date in any format, we won't care!!! what I care about? is date when returns, I suggest you a SQL statement to solve all of your problems.

Ramy Mahrous 401 Postaholic Featured Poster

Use this sample...

Process[] processes = Process.GetProcessesByName("C");
foreach (Process p in processes)
{
MessageBox.Show("Can't duplicate run this program,it is already running in the background.", "can't run again", MessageBoxButtons.OK, MessageBoxIcon.Error);
this.Close();
}
Ramy Mahrous 401 Postaholic Featured Poster

Remove the container control (DataList, Repeater, etc...) and insert someone again... or try asking asp.net forum http://www.daniweb.com/forums/forum18.html