|
You may want to consider ditching the tab control altogether and simply showing the appropriate UserControl in response to a button click.
/ravi
|
|
|
|
|
if u have allready added the tabpages to tab control at design time
then u can remove the tabpages at the time of lloading form
tabControl1.TabPages.Clear();
then on button click event u can add tab pages by this way
TabPage tb1 = new TabPage("XYZ");
tabControl1.TabPages.Add(tb1);
rahul
|
|
|
|
|
Add/Remove the TabPage s to/from the TabControl.TabPages collection as needed.
Or maybe put the controls in different Panel s or GroupBox es that are at the same position and only show the one needed.
"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." - Rick Cook www.troschuetz.de
|
|
|
|
|
I think you may try another way .
i suggest you try this :
place some Panel Controls . and put your Buttons on that
on Left Buttons . you can do click even like that:
Panel1.Visible = false;
Panel2.Visible = false;
Panel3.Visible = true;
good luck - from a chinese fans
|
|
|
|
|
hi
i have access db and it has one table as "user" and 2 fields as "username" and "pass" and in user login Form in my app when input user and pass and click in enter_button the following message was shown :
Syntax error in FROM clause
my enter_button_click code is :
string str_com = "SELECT * FROM user WHERE username = '" + txt_user.Text + "' AND password = '" + txt_pass.Text + "'";
OleDbCommand command = new OleDbCommand(str_com, oleDbConnection1);
OleDbDataReader dr;
try
{
oleDbConnection1.Open();
dr = command.ExecuteReader();
if (dr.HasRows)
{
this.Hide();
Form_Main frm1 = new Form_Main();
frm1.Show();
}
else
{
MessageBox.Show("error"); }
}
finally
{
dr.Close();
oleDbConnection1.Close();
}
how to slove problem ??
thanks ..
|
|
|
|
|
"user" is a reserved word. Change the name of the table.
---
b { font-weight: normal; }
|
|
|
|
|
What does str_com expand to? Is user a reserved word in Access? Enclose the table name in square brakets like this [user]
What happens if the user types, as their user name, the following?
' OR 1=1; --
What is the code flow in that situation? What will be returned from the database if the user types that as a user name?
Your major problems are not syntax errors (because while you have syntax errors your application won't run and thus your data will be safe.) Your major problem is that your code is highly susceptable to a SQL Injection Attack (as I demonstrated above). You will likely wish to read about SQL Injection Attacks and how to prevent them.[^]
|
|
|
|
|
|
I have a Customize class that inherits a TreeView. This class has some extra properties, other than those from the TreeView. Is there a way to make this properties visible in the Properties box during design time?
|
|
|
|
|
Yes, you should insert:
[Browsable(true),
Description("..."),
Category("Design"),
DefaultValue("No Title")]
public String OwnTitle {
...
}
------------------------------
PROST Roleplaying Game
War doesn't determine who's right. War determines who's left.
|
|
|
|
|
I'm looking for a way to send a message from a desktop pc to a mobile device.
What's the easiest way to do that?
|
|
|
|
|
If you have a TCP/IP connection, then use TcpListener and TcpClient.
|
|
|
|
|
excuse me
first thanks for help
i want to set the DataBindings property for datagrid by dataview
but it send me an exception here is the code i wrote
DataView custadd=new DataView(customer.Tables["address"],"","",DataViewRowState.CurrentRows );
custadd.AllowEdit=true;
custadd.AllowNew=true;
custadd.AllowDelete=true;
custadd.Table =customer.Tables["address"];
custadd.RowFilter="cust_ID='"+txid.Text+"'";
dataGrid1.DataBindings.Add("DataSource",custadd, );
the databindings takes three arguments but i do not know the 3 argument
thanks
fatma
|
|
|
|
|
third argument is datamember where u have to specify table name
but i do not think it is possible to do databinding with dataview
u will still get the exception
so u can use datagrid.datasource = cusadd;
rahul
|
|
|
|
|
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties=Excel 8.0;HDR=Yes;IMEX=1"
Does it work with Excel 2003 or doen't ?
please help me
MD_NADA
|
|
|
|
|
"Provider=Microsoft.Jet.OLEDB.4.0;" +
"Data Source=" + Server.MapPath("../ExcelData.xls") + ";" +
"Extended Properties=Excel 8.0;";
|
|
|
|
|
How to read .xls file by giving the cell value and write the cellvalue in another .xls file at the same position using C#.net
Could u pls help me?
chandra999777
|
|
|
|
|
http://www.codeproject.com/csharp/excel_using_oledb.asp
|
|
|
|
|
Hi,
please help me out to check the CheckedListbox only one item at click, rest of the items should be unchecked.
|
|
|
|
|
It's easy :
Use the event CheckedChanged then write this kind of code :
Go to each item, checked whether the item is the item you just selected.
If yes, then set the property "Checked" to true, otherwise false;
|
|
|
|
|
i found the solution ,
CheckedIndex is previously selected item index.
private void chkProperties_ItemCheck(object sender, ItemCheckEventArgs e)
{
chkProperties.ItemCheck-=new ItemCheckEventHandler(chkProperties_ItemCheck);
chkProperties.SetItemChecked(CheckedIndex,false);
chkProperties.ItemCheck+=new ItemCheckEventHandler(chkProperties_ItemCheck);
CheckedIndex=e.Index;
}
|
|
|
|
|
hi,
maybe it's a stupid question, but i really need to know: is there a possibility to find out the amount of free space on a ftp server for an axisting account..? thanks
|
|
|
|
|
How many space you have - How many space you used = How many space is free
haha~
|
|
|
|
|
Thanks for the piece of code that u gave me yesterday, but I still have a problem. I need to create a USER INTERFACE PROGRAM that can LOAD,DISPLAY AND SAVE a bitmap file and I'm not really good in c# now so I can't really do it. Please if anybody can help me with that for now,I would be grateful. I need that for a project.
Please guys, help me out.
tony-yeyo
|
|
|
|
|
You should look at the System.Drawing.Image class. There you find routines to Load and Save an Image. To Display one, you can use a panel or picturebox.
So try it and when you have a specific question or problem with the classes or functions ask again.
Regards,
Ingo
------------------------------
PROST Roleplaying Game
War doesn't determine who's right. War determines who's left.
|
|
|
|