Click here to Skip to main content
15,346,923 members

Comments by sariqkhan (Top 200 by date)

sariqkhan 29-Mar-13 5:51am View
   
is there any parameter option in SRSS??? i thought that will be only in crystal reports/
sariqkhan 29-Mar-13 5:45am View
   
is there any parameter option in SRSS???
i thought that will be only in crystal reports/
sariqkhan 29-Mar-13 5:22am View
   
sir i am using the windows form, not the webform and sir the query will be of depend on month so i dont want to make total 12 reports for each and every month
sariqkhan 29-Mar-13 4:44am View
   
sandeep sir. in that two article where i can write the query?? is there any option that i can change the query?
sariqkhan 29-Mar-13 4:42am View
   
sir. what is this. in that article??
DBConnection DBConn = new DBConnection();
OleDbDataAdapter myDataAdapter = DBConn.getDataFromDB();
sariqkhan 29-Mar-13 1:13am View
   
sandeep sir can you help me out here
http://www.codeproject.com/Questions/569299/loadingplusmoreplusthanplusoneplusreportsplusinplu
sariqkhan 29-Mar-13 1:07am View
   
OG sir can you please help me here if you can
http://www.codeproject.com/Questions/569299/loadingplusmoreplusthanplusoneplusreportsplusinplu
sariqkhan 29-Mar-13 1:06am View
   
sir can you help me here please if you can
http://www.codeproject.com/Questions/569299/loadingplusmoreplusthanplusoneplusreportsplusinplu
sariqkhan 29-Mar-13 1:01am View
   
thank you sir for helping
sariqkhan 31-Jan-13 13:06pm View
   
thank you sir.
and if i want to reverse the procedure for example i have two file somewhere in the computer i want user to select those file persnally and user should select two files and if clicked okay then that two files will be placed in the specified location which means c\programfiles\mylocation. this can be done by folderbrowse dialog?
sariqkhan 31-Jan-13 11:40am View
   
sir can you provide me the simple code. That link contains extra code which i didint get. Please if you can
sariqkhan 31-Jan-13 10:09am View
   
sir i think you misunderstood my question, i have two file in a folder c\programfiles\myfolder i want that when the button is clicked then the two files is selected automatically and the user only gets the option to where to copy this two files. like that way i want to work. is that possible what i am thinking?
sariqkhan 31-Jan-13 10:06am View
   
thank you sir but in that folderbrowsedialog. can i get option to copy files? and i dont want to move folder as folder contains many things i only want two files to be copied in another location. can you please provide some help
sariqkhan 28-Jan-13 3:53am View
   
sir how can i automatically load that? i dont want to edit whole software for that as i am providing this funtionality to the user. and about copy. in the resource folder you are getting the new image with same name?? i a m not getting the new image in the resource folder. its the same image there which is older.
sariqkhan 26-Jan-13 11:35am View
   
i am loading the image from the resource folder. i have set the property of the background image to the resource folder contain a image
sariqkhan 25-Jan-13 5:22am View
   
Deleted
i am loading the image from the resource folder. i have set the property of the background image to the resource folder contain a image
sariqkhan 24-Jan-13 13:25pm View
   
no sir the copy isnt failed. but in the resource folder there is an image which name is splash image.jpg i want to replace with that image with same name. but after this operation the image is not replacing
sariqkhan 24-Jan-13 13:23pm View
   
i think so but it copies right. but the image in the resource folder is not replacing when this is completed.
sariqkhan 24-Jan-13 13:23pm View
   
how can it be disposed? can you help me to dispose so that i can replace the image. i have set the property of the splash form image to the image which is in the resource folder and i have provide this code but it doesnt replaced the image. i want to replace the image with the same name.
sariqkhan 6-Jan-13 5:07am View
   
og sir can you help me here
http://www.codeproject.com/Questions/522502/passingplustheplusdataplusfromplustextboxplustoplu
sariqkhan 6-Jan-13 5:05am View
   
http://www.codeproject.com/Questions/522502/passingplustheplusdataplusfromplustextboxplustoplu
this is the one
sariqkhan 5-Jan-13 7:16am View
   
+5 for the convert function
sariqkhan 5-Jan-13 7:15am View
   
can you help me sir http://www.codeproject.com/Questions/522079/Howplustoplusupdateplustheplusdatagridviewpluswhen
sariqkhan 5-Jan-13 7:15am View
   
http://www.codeproject.com/Questions/522502/passingplustheplusdataplusfromplustextboxplustoplu
sariqkhan 5-Jan-13 7:14am View
   
Deleted
can you help me sir http://www.codeproject.com/Questions/522079/Howplustoplusupdateplustheplusdatagridviewpluswhen
sariqkhan 5-Jan-13 7:14am View
   
Deleted
http://www.codeproject.com/Questions/522079/Howplustoplusupdateplustheplusdatagridviewpluswhen can you help me sir
sariqkhan 5-Jan-13 1:07am View
   
can you solve this now... i have update that
sariqkhan 5-Jan-13 0:48am View
   
+5 sir thank you
sariqkhan 4-Jan-13 14:55pm View
   
http://www.codeproject.com/Questions/521783/howplustoplustransferplustheplustextplusfromplusdy
can you help me sir
sariqkhan 4-Jan-13 14:55pm View
   
http://www.codeproject.com/Questions/521783/howplustoplustransferplustheplustextplusfromplusdy
can you help me sir
sariqkhan 4-Jan-13 14:52pm View
   
http://www.codeproject.com/Questions/521783/howplustoplustransferplustheplustextplusfromplusdy
can you help me sir
sariqkhan 4-Jan-13 14:52pm View
   
http://www.codeproject.com/Questions/521783/howplustoplustransferplustheplustextplusfromplusdy
can you please help me sir
sariqkhan 4-Jan-13 14:44pm View
   
http://www.codeproject.com/Questions/521783/howplustoplustransferplustheplustextplusfromplusdy
sir can you help me here please if you can
sariqkhan 31-Dec-12 8:23am View
   
bro i have commented on my freinds and called them... they will help u soon. i am also searching
sariqkhan 31-Dec-12 8:15am View
   
+5
sariqkhan 31-Dec-12 8:15am View
   
+5 for the links
sariqkhan 31-Dec-12 8:14am View
   
+5
sariqkhan 31-Dec-12 8:13am View
   
+5
sariqkhan 31-Dec-12 8:12am View
   
can you help me sir
http://www.codeproject.com/Questions/519171/showingplusonlyplustheplusfilteredpluscolumnplusin
sariqkhan 31-Dec-12 8:12am View
   
can you help me sir fox
http://www.codeproject.com/Questions/519171/showingplusonlyplustheplusfilteredpluscolumnplusin
sariqkhan 31-Dec-12 8:11am View
   
sir can you help me out
http://www.codeproject.com/Questions/519171/showingplusonlyplustheplusfilteredpluscolumnplusin
sariqkhan 30-Dec-12 10:51am View
   
can you tell me verbally the link i cant understand, i am a newbie
sariqkhan 30-Dec-12 9:03am View
   
i am using windows form
sariqkhan 27-Dec-12 1:57am View
   
thank you sir
really thank you for replying and finding my problem
sariqkhan 26-Dec-12 12:26pm View
   
Deleted
sir can you help me out here http://www.codeproject.com/Questions/516087/errorplusinplussimpleplusregexplusvalidation
plz if you can
sariqkhan 26-Dec-12 12:25pm View
   
Deleted
sir can you help me out here http://www.codeproject.com/Questions/516087/errorplusinplussimpleplusregexplusvalidation plz if you can
sariqkhan 26-Dec-12 12:24pm View
   
Deleted
sir can you help me out here
http://www.codeproject.com/Questions/516087/errorplusinplussimpleplusregexplusvalidation
plz if you can
sariqkhan 26-Dec-12 12:21pm View
   
Deleted
sir can you plz help me out here
http://www.codeproject.com/Questions/516087/errorplusinplussimpleplusregexplusvalidation
sariqkhan 26-Dec-12 9:07am View
   
even if i put 09:09 st instead of 09:09 am it works and there is no error provide which blinks
sariqkhan 26-Dec-12 8:44am View
   
sir your code is correct but the the problem is when i put
09:09 st instead of 09:09 PM it does not shows error
sariqkhan 18-Dec-12 12:48pm View
   
+5
sariqkhan 18-Dec-12 9:55am View
   
thank you too
sariqkhan 18-Dec-12 9:55am View
   
i got it
sariqkhan 18-Dec-12 5:45am View
   
i got you solution but the problem is it only shows that format it i want to edit the column then i cant do, have you tried that?
sariqkhan 18-Dec-12 4:50am View
   
dataGridView1.DataSource = database1DataSet11;
dataGridView1.Columns[4].DefaultCellStyle.Format = "dd/MM/yyyy hh:mm:ss";
i have added this but not working
sariqkhan 18-Dec-12 4:23am View
   
i dont know about datasource variable what is that?
sariqkhan 18-Dec-12 3:55am View
   
in designer, how to make the format of smalldatetime datatype as dd/mm/yyyy hh:mm:ss AM in designer there is no option here
and the second answer of reddy sir is also not working, it gives the error as
Non-invocable member 'System.Windows.Forms.DataGridView.Columns' cannot be used like a method
i have used this code in the load event
Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; dataGridView1.Columns("time7").DefaultCellStyle.Format = "dd/MM/yyyy hh:mm tt";
i am using vs2010 and doing my project in c#
sariqkhan 18-Dec-12 3:54am View
   
sir i am using c sharp what code you are providing?
two errors are there
The name 'ds' does not exist in the current context
'System.Windows.Forms.DataGridView' does not contain a definition for 'DataBind' and no extension method 'DataBind' accepting a first argument of type 'System.Windows.Forms.DataGridView' could be found (are you missing a using directive or an assembly reference?
sariqkhan 18-Dec-12 3:02am View
   
Deleted
in designer, how to make the format of smalldatetime datatype as dd/mm/yyyy hh:mm:ss AM in designer there is no option here
and the second answer of reddy sir is also not working, it gives the error as
Non-invocable member 'System.Windows.Forms.DataGridView.Columns' cannot be used like a method
i have used this code in the load event
Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; dataGridView1.Columns("time7").DefaultCellStyle.Format = "dd/MM/yyyy hh:mm tt";
i am using vs2010 and doing my project in c#
sariqkhan 18-Dec-12 2:58am View
   
in designer of datagrid view how to make the format of smalldatetime as dd/mm/yyyy hh:mm:ss AM in designer there is no option here in the default cell type, all the two option is not working in my case
sariqkhan 18-Dec-12 2:56am View
   
in designer, how to make the format of smalldatetime as dd/mm/yyyy hh:mm:ss AM
in designer there is no option here
sariqkhan 18-Dec-12 2:51am View
   
the second ans
Thread.CurrentThread.CurrentCulture =
System.Globalization.CultureInfo.InvariantCulture;
dataGridView1.Columns("time7").DefaultCellStyle.Format =
"dd/MM/yyyy hh:mm tt";
it is showing the error at column
Non-invocable member 'System.Windows.Forms.DataGridView.Columns' cannot be used like a method
sariqkhan 18-Dec-12 2:45am View
   
+5
sariqkhan 17-Dec-12 5:18am View
   
+5
sariqkhan 17-Dec-12 5:08am View
   
i got it it should be like {0,4}
thank you sir
sariqkhan 17-Dec-12 4:21am View
   
sir,if i use
public bool val3()
{
Regex regex = new Regex("^[a-z]$");
return panel1.Controls.OfType<usercontrol1>().Select(uc => uc.comboBox1).Any(cb => !regex.IsMatch(cb.Text));
}
and
at the click event
private void button2_Click(object sender, EventArgs e)
{
bool val21 = val3();
if (!val21)
{
Form4 fp = new Form4();
fp.Show();
}
else
{
MessageBox.Show("error");

}
}
it shows error all the time why sir?
sariqkhan 17-Dec-12 3:55am View
   
no, sir OG have given some info but i dont know clearly to bedug, maine kabi khudse nahi kiya hai
sariqkhan 17-Dec-12 3:53am View
   
your solution is also opening the form when the button is click,
means it is not working properly,
int c = 0;
private void button1_Click(object sender, EventArgs e)
{
int v;
v = c++;
panel1.VerticalScroll.Value = VerticalScroll.Minimum;


UserControl1 us = new UserControl1();
us.Name = "us" + v;
us.Location = new Point(150, 5 + (30 * v));

panel1.Controls.Add(us);

}
i added the user control by this code,is this posible to validate by your code?
sariqkhan 17-Dec-12 1:29am View
   
Deleted
in the usercontrol i used this
public bool ValidateControl()
{
if ((comboBox1.Text == string.Empty) && (comboBox2.Text == string.Empty))
{
return true;
}
else
{
return false;
}
}
but i dont know how to use this in the form where there is dynamic usercontrol is generated,i want to validate like this
bool valcom =ValidateControl();
if (!valcombo)
{
//then do this
}
else
{
//do that
}
can you help me here
sariqkhan 17-Dec-12 1:24am View
   
Deleted
sir, you are telling me to add all validation code in one?how?
if i have this two code.
private bool valpass()
{
if (textBox2.Text == string.Empty)
{
return true;
}
else
{
return false;
}
}
private bool valcombo()
{
if (comboBox1.Text == string.Empty)
{
return true;
}
else
{
return false;
}
}
then how can i make them one
sariqkhan 17-Dec-12 1:11am View
   
sir,ca you help me with the simplest code as you suggest code which is ofm type to implement
www.codeproject.com/Answers/510534/validatingplusthepluscontrolspluswhichplusareplusi
sariqkhan 17-Dec-12 0:51am View
   
okay,
i have to find, what to implement her as i have tlearn first, what is this, after that i will implement
sariqkhan 17-Dec-12 0:43am View
   
have you gone through my code,
i used a very simple example to validate the control, i can used that method in the leave event also,for validation, there is no other alternative to used delegates here in this case?
sariqkhan 17-Dec-12 0:37am View
   
if i will impliment this,so how to use this as i am a newbie to programming i dont know to delegate concept,
if you can tell how to validate a combo and text with your given examle
sariqkhan 17-Dec-12 0:34am View
   
sir, this one is complicated, do you have loops, it easy to understand than delegates,
sariqkhan 16-Dec-12 23:57pm View
   
i have called you again sir, laugh
http://www.codeproject.com/Questions/510510/validatingplusthepluscontrolspluswhichplusareplusi
here is my simple but to mine it is verycomplicated
can you help me
if you can
please
sariqkhan 16-Dec-12 23:48pm View
   
thank you sir, i got your idea
sariqkhan 16-Dec-12 8:59am View
   
sir, question from another topic, if i add a usercontrol then how to find the controls in that and place in the stringbuilder? if i have a control placed then i can iterate by this code
Form4 fl = new Form4();
StringBuilder sb = new StringBuilder();
foreach (Control c in panel1.Controls)
{
if (c is ComboBox)
{ ComboBox cb = (ComboBox)c;
sb.Append(cb.Text);
fl.comboBox1.Text = sb.ToString();
fl.Show();
}
} but how is this possible for usercontrol for finding controls which are in uercontrol and usercontrol is on panel. so how to do that?
sariqkhan 16-Dec-12 1:49am View
   
thank you sir,
sariqkhan 16-Dec-12 0:29am View
   
here is get the best way to remove the control in a row, without using tabellayout is this one, which is tagging, controls are not much more, so i used this,
sariqkhan 16-Dec-12 0:27am View
   
sir i dont want to clear all the controls i want to remove the control in a line, a row of control
sariqkhan 15-Dec-12 15:02pm View
   
+5
sariqkhan 15-Dec-12 14:58pm View
   
sir, i have some doubt
http://www.codeproject.com/Questions/509550/removingplustheplusdynamicalplusaddedpluscontrolpl
sariqkhan 15-Dec-12 10:47am View
   
+5
sariqkhan 15-Dec-12 10:45am View
   
+5
sariqkhan 15-Dec-12 10:45am View
   
+5
sariqkhan 15-Dec-12 10:44am View
   
+5
sariqkhan 15-Dec-12 10:43am View
   
+5
sariqkhan 15-Dec-12 5:05am View
   
i have done this,is this only needed for user control?
int v;
v = c++;
ComboBox combo = new ComboBox();
combo.Name = "combobox" + v;
ComboBox combo2 = new ComboBox();
combo2.Name = "combobox2" + v;
UserControl us = new UserControl();
us.Name = "user" + v;
us.Location = new Point(100, 5 + (30 * p));
us.Controls.Add(combo);
us.Controls.Add(combo2);
panel1.Controls.Add(us);
sariqkhan 15-Dec-12 4:49am View
   
sir, there is problem in your code, when i click two rows of control is generated then no control generated in my form , no other row generates
sariqkhan 15-Dec-12 4:48am View
   
i learn by example
:laugh
can you explain how to add a control,please with validation
sariqkhan 14-Dec-12 20:36pm View
   
sir,it makes my code lengthy and complicated if i use usercontrol it will be easy right sir?
can you help me in this
sariqkhan 14-Dec-12 13:20pm View
   
sir, how can i add controls to usercontrol dnamically? and validate the textbox and combobox which are present in a user control
sariqkhan 14-Dec-12 13:20pm View
   
raj sir, how can i validate the textbox and combobox which are present in a user control
sariqkhan 14-Dec-12 13:20pm View
   
rohit, how can i add controls to usercontrol dnamically? and validate the textbox and combobox which are present in a user control
sariqkhan 14-Dec-12 13:18pm View
   
sir, i have doubt
http://www.codeproject.com/Answers/509145/Removingplusdynamicpluscontrols#answer3
sariqkhan 14-Dec-12 13:12pm View
   
sir, how can i add controls to usercontrol dnamically? and validate the textbox and combobox which are present in a user control
sariqkhan 14-Dec-12 13:05pm View
   
sir, how can i add controls to usercontrol dnamically? and validate the textbox and combobox which are present in a user control
sariqkhan 14-Dec-12 11:52am View
   
yess it is in line as it is placed with the location int c = 0; and incremented each time a user clicks, by your code it removes all the textbox and combobox which is created
sariqkhan 14-Dec-12 10:56am View
   
can i validate the combobox and textbox in that? and can i pass the value from that to the next form?
sariqkhan 14-Dec-12 10:55am View
   
Deleted
sir, i want to remove only the control which are in line,
my code generated combobox and textbox and in line by your code all the combo and text are removed. can you modify your code please
sariqkhan 14-Dec-12 10:49am View
   
can you enlarge the topic please sir, how to use that user control and removing it by button click,
sariqkhan 14-Dec-12 10:43am View
   
this is for removing
Button btnh = sender as Button;
ComboBox cb3 = btnh.Tag as ComboBox;
ComboBox cb4 = cb3.Tag as ComboBox;
panel1.Controls.Remove(cb3);
panel1.Controls.Remove(cb4);
panel1.Controls.Remove(btnh);
sariqkhan 14-Dec-12 10:43am View
   
sir how to add user control and add textbox and combobox and how to remove that user control? can you expand more please
sariqkhan 14-Dec-12 10:32am View
   
i have added this code in the button click event where the control is generated
combo.Tag = btn;
combo2.Tag = combo;
btn.Tag = combo2;
and this code in the removing button click

Button btnh = sender as Button;
ComboBox cb3 = btnh.Tag as ComboBox;
ComboBox cb4 = cb3.Tag as ComboBox;

panel1.Controls.Remove(cb3);
panel1.Controls.Remove(cb4);
panel1.Controls.Remove(btnh);

but how to remove txtbox which are 3 in numbers
sariqkhan 14-Dec-12 0:39am View
   
i do not know the answer but, your label cant contain int value, it must be string value which you are saving and it must be previous int value,
sariqkhan 12-Dec-12 13:44pm View
   
thanks
sariqkhan 12-Dec-12 12:10pm View
   
relation to above code, i have a label in the form which is keeping track of generated textbox, i use this code in the
click event where the textbox is generated
label1.Text = c.ToString();

and i want the code where the button will remove the textbox the i want it to update the label
but i dont know how to do that. substraction is causing problem.
I use
int z = c - 1
but it is not working label decreases only by one , and only one time.
Can you help me in logic
sariqkhan 12-Dec-12 10:37am View
   
what is this stringbuilder
sariqkhan 12-Dec-12 8:52am View
   
how will be the updated answer usefull?
first is with the help of list and second is without the help of list?
right na?
sariqkhan 12-Dec-12 8:36am View
   
sir, very much thank to you
you have solved mu doubt,
really really thank you
sariqkhan 12-Dec-12 8:33am View
   
Deleted
sir,
very much thank to you,but i have simple doubt can you solve that,
i have modified your code with this
foreach (ComboBox c in lst)
{
sb.Append(c.Text + "\r\n");
Form4 f5 = new Form4();
f5.comboBox1.Text = sb.ToString();
f5.Show();
}
but the problem is the combobox which contains the text is showing
combobox1.text+ combobox2.text
i want a comma between every addition
sariqkhan 12-Dec-12 7:07am View
   
:laugh
really
OG sir can you help me out with this
http://www.codeproject.com/Questions/507667/passingplusdataplusfromplusdynamicpluscontrolplust
sariqkhan 12-Dec-12 6:49am View
   
sorry sir,
question updated
sariqkhan 12-Dec-12 0:13am View
   
+5
sariqkhan 11-Dec-12 6:23am View
   
:) whats your age?
35?
sariqkhan 11-Dec-12 6:20am View
   
tag property for deleting? how sir?
can you give us code snippet please
BTW
we are bro, styding in same university, and even shares one another 's computers
sariqkhan 11-Dec-12 6:18am View
   
you are right
really you should be term father of coder
i never seen such coder in my life. as i am a student from mumbai i didint experience such a teacher
sariqkhan 11-Dec-12 5:42am View
   
Deleted
sir i didint get you, i multiply both with 30 and the same problem is occuring here
what to do tell me in simple
please
sariqkhan 11-Dec-12 5:40am View
   
griff sir,
the same problem, check out. after 4 or 5fifth combobox, the labels change the orignal position to the lower than what expected
sariqkhan 11-Dec-12 5:31am View
   
ohh i heard this first time about the tag property
thank you once once again for helping us
:)
sariqkhan 11-Dec-12 5:29am View
   
Deleted
ohh i heard this first time about the tag property
thank you once once again for helping us
:)
sariqkhan 11-Dec-12 5:27am View
   
thank you
:)
i think this discussion will be continue till midnight
:laugh
sariqkhan 11-Dec-12 4:22am View
   
thank you for explaining
sariqkhan 11-Dec-12 4:17am View
   
+5
sariqkhan 11-Dec-12 4:15am View
   
And stop adding controls to two different Controls lists ???
what does this means?
and i will clear my problem, lets start from start. i am making a combobox and label dynamically, label is set to visible = false. and just as same what you have done validation, when user dosent enter enything and leaves the combobox then the label is set to true. i just want to do that but the label will be dynamically generated, i have done this

Label label = new Label();
label.Name = "dynamiclabel" + c++;
label.Location = new Point(160, -5 + (20 * c));
label.Visible = false;
label.Text = "labelname";

ComboBox txtRun3 = new ComboBox();
txtRun3.Name = "txtDynamic" + c++;
txtRun3.Location = new Point(30, 18 + (20 * c));


this.Controls.Add(txtRun3);
this.Controls.Add(label);
txtRun3.Leave += new EventHandler(txtRun_Leave);

panel1.Controls.Add(label);
panel1.Controls.Add(txtRun3);
this code in the button click event and


private void txtRun_Leave(object sender, EventArgs e)
{
ComboBox cb = sender as ComboBox;
Label lb = sender as Label;
if (cb != null)
{
if (cb.Text == string.Empty)
{
lb.Visible = true;

}
else
{
lb.Visible = false;
}
}
}
but the error which is coming is this
"Object reference not set to an instance of an object."
where i am wrong.

sariqkhan 10-Dec-12 23:09pm View
   
if i generate labels and combobox then how to focus on the last generated combobox?
sariqkhan 10-Dec-12 22:52pm View
   
one more question sir,
this label visible true or false is simple one, but if i generate a dynamic label like by adding this
Label label = new Label();
label.Text = "labelname";
label.Name = "dynamiclabel" + c++;
label.Visible = false;
label.Location = new Point(160, -5 + (20 * c));
this.Controls.Add(label);
panel1.Controls.Add(label);
so how to set it true or false if the user leaves the combobox whithout entering anything, this will be good enough
can you help me
sariqkhan 10-Dec-12 22:48pm View
   
+5
sariqkhan 10-Dec-12 13:52pm View
   
:) sir but the first method of validation is not working in mine.
i have written this in the button click event
txtRun.Leave += new EventHandler(txtRun_Leave);
panel1.Controls.Add(txtRun);
and this
private void txtRun_Leave(object sender, EventArgs e)
{
ComboBox cb = sender as ComboBox;
if (cb != null)
{
label1.Visible = false;
}
else
{
label1.Visible = true;
}
}
as outside.. whats the problem there is no error coming
sariqkhan 10-Dec-12 13:33pm View
   
panel1.Controls.Count - 1
this means that focus on the focus on the last control of the panel?
but what does - 1 mean here?
sariqkhan 10-Dec-12 9:12am View
   
+5
sariqkhan 7-Dec-12 14:10pm View
   
+5
sariqkhan 7-Dec-12 14:09pm View
   
i have done that
thanks to you sir
:)
thank you very much
sariqkhan 7-Dec-12 12:46pm View
   
Deleted
yess
Sorry i misunderstood,
but i want to press those keys without use interaction.
sariqkhan 7-Dec-12 10:50am View
   
thanks sir
i have found the same code from goodle around 15 mins bfore.
But this is not the production level code,
can you tell me if user press down key then we detect if from keypress event or keydown or other event.. Then using the detection code, and if i want to press the caps key then what will be the code for caps?? Then that code will be implemented in form load event
I think this will be the simple
sariqkhan 7-Dec-12 10:09am View
   
:) thank you.
but can you help me in this?
do you have done this before? i am asking about the question which i have asked
sariqkhan 7-Dec-12 9:32am View
   
sir,
first example is of reading the status
i just want to press these keys programmatically.
i dont want user to press these keys, it shows the effect like when windows XP starts up it starts these LEDs for better effect
sariqkhan 7-Dec-12 9:27am View
   
+5 for what?
sariqkhan 1-Dec-12 16:34pm View
   
you are welcome sir
thanks to you for helping us
:)
sariqkhan 1-Dec-12 13:30pm View
   
nothing
appreciation with your code
sariqkhan 1-Dec-12 13:29pm View
   
thanks
+5
:)
sariqkhan 25-Nov-12 4:08am View
   
thank you sir
sariqkhan 22-Nov-12 3:41am View
   
+5 but the what does this means?
comboBox1.Text.Length - comboBox1.Text.Trim().Length > 0)
(comboBox1.Text.Trim().Length - comboBox1.Text.Trim().Replace(" ", "").Length > 1))
sariqkhan 21-Nov-12 7:32am View
   
Reason for my vote of 4
nice
sariqkhan 21-Nov-12 7:32am View
   
Reason for my vote of 5
exce;;ent
sariqkhan 21-Nov-12 7:32am View
   
Reason for my vote of 4
good
sariqkhan 21-Nov-12 5:12am View
   
bro read the question.
i want that for windows form.
sariqkhan 20-Nov-12 8:24am View
   
thansk for helping sir
:)
sariqkhan 20-Nov-12 4:49am View
   
+5
sariqkhan 20-Nov-12 4:47am View
   
+5
sariqkhan 20-Nov-12 4:46am View
   
+5
sariqkhan 20-Nov-12 4:44am View
   
+5
sariqkhan 20-Nov-12 4:43am View
   
:laugh
+5
sariqkhan 20-Nov-12 4:41am View
   
+5
sariqkhan 20-Nov-12 3:56am View
   
thank you sir,
i can also used if loop for this, your method is also nice
thank you sir for helping me
:)
sariqkhan 20-Nov-12 3:45am View
   
yess sir i know that it is bool
i know that sir but according to your answer. i should keep the checkbox checked for using systempassword???
but i want default as system password and if the checkbox is changed means checked then it will be shifted to plain text.
how can i do that?
sariqkhan 20-Nov-12 3:36am View
   
thanks for helping sir
+5
sariqkhan 20-Nov-12 3:33am View
   
+5 thanks for helping
sariqkhan 20-Nov-12 3:33am View
   
TextBox.UseSystemPasswordChar for setting to system password
and which property is used for setting it for plan text?
textbox1.??????
sariqkhan 19-Nov-12 12:45pm View
   
+5
sariqkhan 19-Nov-12 12:40pm View
   
i got it.
thanks for explanation bro
sariqkhan 19-Nov-12 1:48am View
   
oh. Thanks sir.
It was awsome shortest code
:)
sariqkhan 19-Nov-12 1:08am View
   
textbox.text.trim???
What it will do?
sariqkhan 19-Nov-12 0:01am View
   
what does this means?
pictureBox1.Visible = (textBox1.Text != "");
picturebox will visible to true if textbox.text will not be empty string??
right sir?
sariqkhan 18-Nov-12 23:48pm View
   
that was a silly mistake
:laugh
thanks sir
+5
sariqkhan 18-Nov-12 23:42pm View
   
+5
sariqkhan 18-Nov-12 12:33pm View
   
bool vcom2 = IsEmpty();
if (!vcom && !vcom2)
{ //code
}
now it is working with this
sariqkhan 18-Nov-12 12:24pm View
   
sir can you help me out. can you tell me what does this means ad what will this will return?
private bool IsEmpty()//return false
{
return (textBox1.Text == "") || (textBox2.Text == "");
}
sariqkhan 18-Nov-12 12:15pm View
   
Deleted
but sir
what you have previously given answer is working correctly.
for example
in previous condition {
when i click on submit without filling both the textbox i got error message which is correct output }
and now in uodated answer when i click on submit without filling both the textbox i got updation failed output which is wrong. so the previous answer was correct
sariqkhan 18-Nov-12 12:04pm View
   
means first part or the second part will not equal to string.empty
then bool is true??
sariqkhan 18-Nov-12 12:00pm View
   
okay and thank you sir
:)
sariqkhan 18-Nov-12 11:58am View
   
and what is this means
return (textBox1.Text != "") || (textBox2.Text != "");
sariqkhan 18-Nov-12 11:54am View
   
bool vcom2 = IsEmpty();
if (!vcom && vcom2)
{
//code
}
i have done this. then it is working sir
sariqkhan 18-Nov-12 11:46am View
   
Reason for my vote of 5
awsome code
sariqkhan 18-Nov-12 11:45am View
   
bro it was awsome.. but you have done for one textbox. if i click on submit without filling both the form there is no error message!
sariqkhan 18-Nov-12 11:31am View
   
Deleted
nope the same message i have done what you have suggested.
it doesnt work
sariqkhan 18-Nov-12 11:26am View
   
empty method will return that??? true or false???
sariqkhan 18-Nov-12 11:25am View
   
i want error message
my code assumes blank text as password entered so it does not shows error message
because i have only used textbox1.text != textbox2.text
it also checks for blanktext. what to do? to display error message when i click on submit button without filling both the textbox field
sariqkhan 18-Nov-12 2:03am View
   
thanks bro you have really helped us
:)
sariqkhan 17-Nov-12 10:50am View
   
sorry sir i am totally new to this concept can you write the code. Please i have problem in understanding verbally
sariqkhan 17-Nov-12 6:51am View
   
yess sir i have used the above code. and it is printing the whole form. now you can guide me to edit the page to only print the picturebox and labels on that.
where i have to edit the code
sariqkhan 17-Nov-12 3:21am View
   
bro i get the output which i dont want. it prints the whole form with close minimize and maximize button. i want only the picturebox and label on that to be printed on paper. so how to do that?
can you guide me?
sariqkhan 15-Nov-12 9:10am View
   
but i dont have printer istalled. what type of output i will get?? if i want only the picturebox and there is label on that picturebox to be printed so how to do that? i dont want whole form if the close minimize button and maximize button will be printing on that page
also asked by adil
sariqkhan 15-Nov-12 8:00am View
   
what is the diffrence between vb's printform and vs's printdocument?
if i have a small scale form. means it does only have a photo and labels on it so which method you will prefer? vb or vs?
sariqkhan 15-Nov-12 7:31am View
   
+5
sariqkhan 15-Nov-12 7:30am View
   
+5
sariqkhan 15-Nov-12 7:29am View
   
+5
sariqkhan 14-Nov-12 19:14pm View
   
nice explanation bro
thanx for helping
sariqkhan 14-Nov-12 16:58pm View
   
nice one
+5
but how do you do that? whats the concept behind that?
what is this COLLATE SQL_Latin1_General_CP1_CS_AS? i never heard before
sariqkhan 13-Nov-12 9:38am View
   
private void button1_Click(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection();
conn.ConnectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=E:\project\Projects\labelnameinsecondformtry\labelnameinsecondformtry\Database1.mdf;Integrated Security=True;User Instance=True";
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
conn.Open();
try
{
cmd.CommandText = "Insert into Table2 values(username)";
cmd.Parameters.Add("@username", SqlDbType.VarChar).Value = textBox1.Text;
cmd.ExecuteNonQuery();
}
finally
{
conn.Close();
MessageBox.Show("hello welcome");
}
}
it is showing invalid column name username???
and i have a database with column name username
what i have to do?
sariqkhan 13-Nov-12 9:12am View
   
and about second question i got your 2nd conversion it was also an awsome explanation but. you have explained about conversion and cleared my funda. but here what is the sender??? ValidatingTextBox(sender); is the main and we have converted object into textbox which becomes ValidatingTextBox((TextBox)sender);
what is that
"ValidatingTextBox(sender);" i didint heard about sender before?
sariqkhan 13-Nov-12 9:07am View
   
awsome explanation bro.
+5. you should be a teacher
: )
and i have some doubt
public bool isNameValid(string textBox) { return string.IsNullOrEmpty(textBox) ? false : true; }
private bool ValidatingTextBox(TextBox textBox)
{ if (isNameValid(textBox.Text)) { errorProvider1.SetError(textBox, "");
return true;
}
else { errorProvider1.SetError(textBox, "enter something"); return false; } }

here the first function is isNameValid. we have passed the textbox string to this. right said???
but what output is given out? true or false if null or empty is filled so true will be returned or false will be return?
sariqkhan 13-Nov-12 8:55am View
   
so what editing i have to do? for diplaying error provider on both the textbox when submit button is clicked without filling both the textbox? what i have to edit?
sariqkhan 13-Nov-12 1:19am View
   
bro i means the second textbox's is not showing the error when i clicked without filling up the form. only first textbox is showing error not the second textbox
sariqkhan 13-Nov-12 1:17am View
   
Deleted
ValidatingTextBox((TextBox)sender);
return string.IsNullOrEmpty(NameToValidate) ? false : true;
what are this two thing much confused
sariqkhan 13-Nov-12 1:16am View
   
what does this mean

1. return string.IsNullOrEmpty(NameToValidate) ? false : true;
2. ValidatingTextBox((TextBox)sender);
this two are confusing what are this
sariqkhan 13-Nov-12 1:08am View
   
oh you mean the column of the database. sorry i misunderstood
sariqkhan 13-Nov-12 1:08am View
   
yup can i you give? i will use that one
and i can bound the connection with combo box which is provided by propoerty of combobox. so i dont have to write the code for that?
right?
sariqkhan 11-Nov-12 4:36am View
   
bro i thot i can use textbox with autocomplete mode with binding property so that i can type the first letter can i can get the values from the database column but it is not possible