15,891,423 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by shaikh-adil (Top 200 by date)
shaikh-adil
15-Jan-13 13:05pm
View
+5
shaikh-adil
15-Jan-13 12:51pm
View
sir it is bonding which me and sergey.. he helps me when i have some query. so i dont care what people thinks and flags me if they want. he likes helping me. and replies when i am in need.
shaikh-adil
15-Jan-13 12:45pm
View
sir your answer is correct (thank you really for helping me and newbies) can you further help me that can i count the total number of rows in that column? what i have to made changes?
shaikh-adil
15-Jan-13 11:36am
View
Deleted
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=E:\project\Database1.mdf;Integrated Security=True;User Instance=True");
con.Open();
string intero = "select sum(no_of_mobiles) from table2 where datepart(mm,given_schedule)=yourMonthSelected and datepart(yy,given_schedule)=yourYearSelected";
SqlCommand cmd = new SqlCommand(intero, con);
cmd.Parameters.AddWithValue("yourMonthSelected", comboBox1.Text);
cmd.Parameters.AddWithValue("yourYearSelected", comboBox2.Text);
SqlDataReader rdr;
rdr = cmd.ExecuteReader();
while (rdr.Read())
{
label2.Text = rdr.ToString();
}
rdr.Close();
con.Close();
sir it is erroring with "Invalid column name 'yourMonthSelected'.
Invalid column name 'yourYearSelected'." whats the problem here can you solve please if you
shaikh-adil
15-Jan-13 11:06am
View
sir can you one more time help me out www.codeproject.com/Answers/528150/sortingplusbyplusmonthplus-26plusaddingplustheplus
shaikh-adil
15-Jan-13 11:03am
View
Deleted
sir can you one more time help me out
www.codeproject.com/Answers/528150/sortingplusbyplusmonthplus-26plusaddingplustheplus
shaikh-adil
15-Jan-13 11:03am
View
Deleted
sir can you one more time help me out
www.codeproject.com/Answers/528150/sortingplusbyplusmonthplus-26plusaddingplustheplus
shaikh-adil
15-Jan-13 11:02am
View
Deleted
sir i have been working with such statement i dont know how you have retreived the data
string qry1 = "Select * from Table1 WHERE password = @password and Username=@Username ";
SqlCommand com = new SqlCommand(qry1, con);
com.Parameters.AddWithValue("@Username", this.textBox1.Text);
com.Parameters.AddWithValue("@Password", this.textBox2.Text);
SqlDataReader dr = com.ExecuteReader();
while (dr.Read())
{
if (dr.HasRows == true)
{
// do something
}
}
if (dr.HasRows == false)
{
// do something
}
how your query can be written ? can you explain as i am not a coder i am a student
shaikh-adil
15-Jan-13 9:44am
View
sir i am using entity framework. Then it will help? This query can be used to display sum in a label.text?
shaikh-adil
15-Jan-13 8:31am
View
thank you sir. i will try first
shaikh-adil
15-Jan-13 8:30am
View
thank you sir
shaikh-adil
13-Jan-13 8:32am
View
okay sir help me if you get my comment
http://www.codeproject.com/Questions/527051/Showingplusloginplusformplusthroughplustimerplusev
shaikh-adil
13-Jan-13 8:12am
View
cam you help me once more sir? may i ask another question? are you free now?
shaikh-adil
13-Jan-13 8:03am
View
thank you sir,
thank yo u very much for helping
shaikh-adil
13-Jan-13 5:27am
View
OG sir can you help me out here
http://www.codeproject.com/Questions/526995/changingplusthepluscurrentpluscellplusselectionplu
shaikh-adil
13-Jan-13 5:26am
View
sir can you help me out here
http://www.codeproject.com/Questions/526995/changingplusthepluscurrentpluscellplusselectionplu
shaikh-adil
6-Jan-13 6:25am
View
thank you og sir
:)
for helping
shaikh-adil
6-Jan-13 5:46am
View
http://www.codeproject.com/Questions/522502/passingplustheplusdataplusfromplustextboxplustoplu
can you help me sir
shaikh-adil
4-Jan-13 14:18pm
View
can you code and explain?? and in my project i dont want any security then can you simply how can i obtain in simple..
shaikh-adil
4-Jan-13 12:29pm
View
no sir, it is not.
it transfers only the phonemanu.text , one dynamically generated combobox.text and nothing
can you please help me sir i am in big problem here
all the thing is working in my soft but this one is really creating a mess
please sir can you help
shaikh-adil
4-Jan-13 12:19pm
View
http://www.codeproject.com/Questions/521745/transferingplustheplustextplusfromplusdynamicallyp
can you help me sir please if you can
shaikh-adil
4-Jan-13 12:16pm
View
http://www.codeproject.com/Questions/521745/transferingplustheplustextplusfromplusdynamicallyp
can you help me sir please if you can
shaikh-adil
4-Jan-13 12:15pm
View
http://www.codeproject.com/Questions/521745/transferingplustheplustextplusfromplusdynamicallyp
can you help me sir please if you can
shaikh-adil
4-Jan-13 12:15pm
View
http://www.codeproject.com/Questions/521745/transferingplustheplustextplusfromplusdynamicallyp
can you help me sir please if you can
shaikh-adil
4-Jan-13 12:15pm
View
http://www.codeproject.com/Questions/521745/transferingplustheplustextplusfromplusdynamicallyp
can you help me sir please if you can
shaikh-adil
4-Jan-13 12:15pm
View
http://www.codeproject.com/Questions/521745/transferingplustheplustextplusfromplusdynamicallyp
can you help me sir please if you can
shaikh-adil
2-Jan-13 2:49am
View
+5
shaikh-adil
2-Jan-13 2:48am
View
+5
shaikh-adil
31-Dec-12 9:47am
View
okay i got
shaikh-adil
31-Dec-12 9:29am
View
current date is '2012-12-31 14:13'
CONVERT(date, [date]) returns '2012-12-31' having discarded the time part
i think this must be written in the explanation right?
shaikh-adil
31-Dec-12 9:27am
View
thank you very very much sir, you are the father of coding. and thank you for the explanation
shaikh-adil
31-Dec-12 9:25am
View
laugh
i am a kid in dotnet
silly mistake
shaikh-adil
31-Dec-12 9:17am
View
sir if i want all the columns from last week so i edited to
SELECT * FROM myTable WHERE CONVERT(date, [date])=CONVERT(date, DATEADD(d, -7, GETDATE()))
but the problem is it is showing all the column on that day if i want all the entries till 7 days how can i do that?
shaikh-adil
31-Dec-12 9:11am
View
what is this sir
DATEADD(d, -1, GETDATE()))
shaikh-adil
31-Dec-12 8:59am
View
thank you very much sir thanks a lot
can you explain what it is?
CONVERT(date, [date])=CONVERT(date, DATEADD(d, -1, GETDATE()))
how it works
shaikh-adil
31-Dec-12 8:36am
View
sir where i have to write this
shaikh-adil
31-Dec-12 1:47am
View
yup thank you sir, i have made relationship but where to write the code?
for example when the samsung is selected
what to write???
shaikh-adil
31-Dec-12 1:35am
View
sir i have first timke heard this ,uniqueidentifier[^] NEWID. surrogate key[^]? can i use the normal things which i do for creating tables? an to update i used insert, update and delete statement?? i am using sql server here
shaikh-adil
31-Dec-12 1:34am
View
Deleted
sir i have first timke heard this ,uniqueidentifier[^] NEWID. surrogate key[^]?
can i use the normal things which i do for creating tables?
an to update i used insert, update and delete statement??
i am using sql server here
shaikh-adil
31-Dec-12 1:21am
View
nice sir,
manufacturerid (generated, primary key)??
whtat is this generated?
and how can i define row filter? what you have told is manufacturerid = 2? where to write this?
shaikh-adil
30-Dec-12 18:09pm
View
i have used datasource for binding.
I have only mobile models list in the table. And the if loop works if samsung will be the selection the change the datasource to the samsung column and if htc is selected the change the model column to htc. I have a tabel and there are comlumns which are htc, nokia, samsung, in htc all the fields are filled with htc model and in samsung all the fields are filled with htc model. But the problem is when i filled htc lets say 15 models and then the corresponding rows for samsung and nokia will be null then if i select nokia in the first combobox then the second combobox is showing null values of all the 15 models i want it should be blank. Now you undestood sir?
sorry for my bad enlgish
shaikh-adil
19-Dec-12 11:04am
View
okay bro, thanks for working on that.
and tell me please if you get the answer
shaikh-adil
19-Dec-12 10:58am
View
can you guide me to achieve please if you can
for column binding and changing the column as per the first combobox?
please
shaikh-adil
19-Dec-12 10:47am
View
same here, 5th sem is over and 6th semester will be at march start or in feb. of b.sc IT
you have done your H.Sc and joined BCA course?
shaikh-adil
19-Dec-12 10:45am
View
can you guide me to achieve
please if you can
shaikh-adil
19-Dec-12 10:42am
View
why you are lying, you are doing BCA and you are only 20 years??
i am doing my graduation in mumbai, BSc.IT 3rd year and i am 21.
so how can you be 20
shaikh-adil
19-Dec-12 10:37am
View
updated my comment please check it
shaikh-adil
19-Dec-12 10:36am
View
wow, you have almost every link for every quetion ready????
you are indian google, paaji
:D
shaikh-adil
19-Dec-12 10:33am
View
thank you thank you sir,
if i want to bind the combobox with a database table and update the values according to that is that possible?
in one column i have the mobile company name and another table i have the model name if company name is selected the the model column will be shown in combobox 2?
is that possible sir?
shaikh-adil
19-Dec-12 10:29am
View
thank you sir,verymuch thanks if i want to bind the combobox with a database table and update the values according to that is that possible?
thank you thank you sir,
if i want to bind the combobox with a database table and update the values according to that is that possible?
in one column i have the mobile company name and another table i have the model name if company name is selected the the model column will be shown in combobox 2?
is that possible sir?
shaikh-adil
19-Dec-12 9:59am
View
you are welcome sir
shaikh-adil
18-Dec-12 14:09pm
View
thank you sir,
+5
shaikh-adil
16-Dec-12 23:35pm
View
is this not correct? it this not looking for combobox in usercontrol?
UserControl1 uss = new UserControl1();
public bool validation()
{
if (uss.comboBox1.Text == string.Empty)
{
return true;
}
shaikh-adil
16-Dec-12 10:05am
View
Deleted
thankyou sir, can you suggest me one more thing, if i added a usercotrol dynamically by this
int c = 0;
int f = 0;
private void button1_Click(object sender, EventArgs e)
{
int v;
v = c++;
panel1.VerticalScroll.Value = VerticalScroll.Minimum;
Button btn = new Button();
btn.Name = "btn" + v;
btn.Text = "Remove";
btn.Location = new Point(750, 5 + (30 * v));
btn.Click += new EventHandler(btn_Click);
UserControl1 us = new UserControl1();
us.Name = "us" + v;
us.Location = new Point(150, 5 + (30 * v));
us.Tag = btn;
panel1.Controls.Add(btn);
panel1.Controls.Add(us);
}
private void btn_Click(object sender, EventArgs e)
{
Button btnh = sender as Button;
UserControl1 uio = btnh.Tag as UserControl1;
panel1.Controls.Remove(uio);
panel1.Controls.Remove(btnh);
} this btn click event is not removing the usercontrol, how can i achieve this
shaikh-adil
16-Dec-12 9:42am
View
Deleted
is this not correct?
Form4 fl = new Form4();
StringBuilder sb = new StringBuilder();
foreach (Control ctrl in panel1.Controls)
{
if (ctrl is ComboBox)
{
ComboBox myCtrl = ctrl as ComboBox;
sb.Append(myCtrl.Text + ",");
fl.comboBox1.Text = sb.ToString();
fl.Show();
}
}
shaikh-adil
16-Dec-12 9:17am
View
http://www.codeproject.com/Questions/509798/howplustoplusfindpluscontrolsplusinplususercontrol
please if you can help us
shaikh-adil
16-Dec-12 9:10am
View
if i add a panel and on panel there is usercontrol and in usercontrol there is combobox and textbox, by your method transferring the data is easiest way so i thought iterating through usercontrol and finding the text and adding it to the string builder,is that possible?
my friend and mine had asked a new question you can help there also
shaikh-adil
16-Dec-12 8:53am
View
Deleted
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???
shaikh-adil
16-Dec-12 8:42am
View
yes sir,
v are from same class too.
shaikh-adil
16-Dec-12 8:27am
View
what? sorry i didint get what you told, i havnt seen file meny of msword
shaikh-adil
16-Dec-12 8:22am
View
your welcome, i should say thanks as you solved my problem
shaikh-adil
16-Dec-12 2:33am
View
sir, it replaces all the close and minize and maximize button i just want to add a new button have you taken look at the software named Internet download manager?
i just want to add such button to the title bar.
shaikh-adil
16-Dec-12 2:24am
View
Deleted
here i have written the code for minize,if form minize then it will go to system tray, if i want to edit that and add a button in the middle of form that will only set the form to go to system tray is this possible, a minimize button that will minimize the form to the toolbar and a button that will set the form to system tray, is that possible?
shaikh-adil
16-Dec-12 1:54am
View
+5
shaikh-adil
14-Dec-12 1:02am
View
thanks that was my minor fault, i was calling another object previously the calculation was done
shaikh-adil
14-Dec-12 0:55am
View
Deleted
this is also not working
int f;
f = Convert.ToInt32(label1.Text);
int g;
g = Convert.ToInt32(fl.label1.Text);
int z = f + g;
fl.label1.Text= z.ToString() ;
shaikh-adil
14-Dec-12 0:50am
View
i want to add and show that result in the form4's label, so how to do that?
shaikh-adil
14-Dec-12 0:49am
View
question updated
shaikh-adil
14-Dec-12 0:48am
View
so how to the mathematical addition?
sorry that will be a silly mistake but i am a student now, trying for learning .net
and BTW it is not giving 1020 also in the form4's label
shaikh-adil
14-Dec-12 0:40am
View
yes you are right
shaikh-adil
14-Dec-12 0:39am
View
it is in the sender form which is form6
shaikh-adil
12-Dec-12 5:34am
View
same thing i do
shaikh-adil
12-Dec-12 5:30am
View
responsibility
:)
shaikh-adil
12-Dec-12 5:10am
View
i was kidding, i am poor guy which dont have money to study also, so how can i travel wales, dont worry at a time i will come and meet the old guy there
:laugh
shaikh-adil
12-Dec-12 4:40am
View
yess i am a student. thats why it will take atleast a day.
:laugh:
i am planning to come in whales and to have a teacher, named griff
shaikh-adil
12-Dec-12 4:38am
View
can you tell me one more thing, 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();
andi ave this 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.
shaikh-adil
12-Dec-12 4:35am
View
okay. i think i will atleast a day for that.
thank you sir
shaikh-adil
12-Dec-12 4:24am
View
there is a button on a toolbar which will have an appropriate tooltip - look for it and press it once
where is this??
and what are you teaching me. just tell me sir where i have been wrong, i learn from examples its m habit
shaikh-adil
12-Dec-12 2:14am
View
HIi am makinng a windows form project and facing
difficulty in passing the dnamically generated
control value to the other form's normal control
value.
my code is like
i n t c = 0 ;
i n t p = 0 ;
p r i v a t e v o i d b u t t o n 1 _ C l i c k ( o b j e c t s e n d e r , E v e n t A r g s e )
{
p a n e l 1 . V e r t i c a l S c r o l l . V a l u e = V e r t i c a l S c r o l l . M i n i mum ;
C omb o B o x t x t R u n 3 = n ew C omb o B o x ( ) ;
t x t R u n 3 . N ame = " t x t D y n am i c " + c + + ;
t x t R u n 3 . L o c a t i o n = n ew P o i n t ( 3 0 , 1 8 + ( 3 0 * c ) ) p a n e l 1 . C o n t r o l s . Ad d ( t x t R u n 3 ) ;
t x t R u n 3 . F o c u s ( ) ;
}
p r i v a t e v o i d b u t t o n 2 _ C l i c k ( o b j e c t s e n d e r , E v e n t A r g s e )
{
F o r m4 f 4 = n ew F o r m4 ( ) ;
C omb o B o x c b 1 = s e n d e r a s C omb o B o x ;
B u t t o n b s = c b 1 . T a g a s B u t t o n ;
f 4 . c omb o B o x1 . T e x t = b s . T e x t ;
f 4 . S h ow ( ) ;
}
i am getting error as
"Object reference not set to an instance of an
object."
shaikh-adil
12-Dec-12 1:34am
View
yess but i am not getting the output. the text is not passing , sir
shaikh-adil
12-Dec-12 1:21am
View
sir can you guide me here is my question , i am facing problem in simple step.
http://www.codeproject.com/Questions/507182/passing-data-from-dynamically-generated-cotrol-to-.aspx
shaikh-adil
12-Dec-12 1:20am
View
+5
shaikh-adil
12-Dec-12 1:15am
View
+5
shaikh-adil
12-Dec-12 1:15am
View
+5
shaikh-adil
12-Dec-12 0:18am
View
hey bro do you know how to use breakpoint?
see my upper comment it is correct?
shaikh-adil
12-Dec-12 0:08am
View
:laugh righly said
shaikh-adil
12-Dec-12 0:06am
View
+5
shaikh-adil
12-Dec-12 0:06am
View
+5
shaikh-adil
12-Dec-12 0:06am
View
+5
shaikh-adil
12-Dec-12 0:05am
View
here bt = null and cb2 is null, and bt.tag is null
i observed, i dont know i am correct or not cz i am using breakpoint first in my life i have googled it and found how to use it
shaikh-adil
11-Dec-12 12:40pm
View
Form4 f4 = new Form4();
ComboBox cb1 = sender as ComboBox;
Button bs = cb1.Tag as Button;
f4.comboBox1.Text = cb1.Text;
f4.Show();
this both of them are not happening
Form4 f4 = new Form4();
Button bt = sender as Button;
ComboBox cb2 = bt.Tag as ComboBox;
f4.comboBox1.Text = cb2.Text;
f4.Show();
shaikh-adil
11-Dec-12 12:27pm
View
+5
shaikh-adil
11-Dec-12 12:19pm
View
i have to write this code in the button click event of the form which contains dynamic comboboxes?? or i have to write this code in the form4?
shaikh-adil
11-Dec-12 12:18pm
View
sir
i have to write this code
public string WhateverTheComboBoxIsMeantToDoUseYourOwnNameHere
{
get { return comboBox1.Text; }
set { comboBox1.Text = value; }
}
in the public section of form4 and what i have to write in the button click event? of the form which contains dynamic comboboxes
shaikh-adil
11-Dec-12 8:36am
View
sir i am doing here dynamic generated control. so that example have almost dozens of code which is mine?
shaikh-adil
11-Dec-12 8:32am
View
what can i do here?
shaikh-adil
11-Dec-12 8:19am
View
ohkay
:laugh
shaikh-adil
11-Dec-12 7:26am
View
sir can you tell me if i have a combobox in a one form which is dynamically generated and i want to transfer the text value of that to the next form's combobox which is not dynamically generated so what can i do?
shaikh-adil
11-Dec-12 7:19am
View
thank you i have done that thing it was very easy
shaikh-adil
11-Dec-12 7:19am
View
i have done that
yesssssss
thank you
shaikh-adil
11-Dec-12 7:11am
View
i have generated this one
private void btn_Click(object sender, EventArgs e)
{
ComboBox cb1 = sender as ComboBox; panel1.Controls.Remove(cb1);
} and for ADDING cumbobox and button in the button click
ComboBox txtRun3 = new ComboBox();
txtRun3.Name = "txtDynamic" + c++ ;
txtRun3.Location = new Point(30, 18 + (30 * c));
Button btn = new Button();
btn.Name = "btn" + p++; btn.Location = new Point(200, 18 + (30 * c));
there isnt any error coming how to solve that
You can identify the TextBox associated with the Button from the Tag - No
shaikh-adil
11-Dec-12 7:06am
View
sir i have written this code
private void btn_Click(object sender, EventArgs e)
{
ComboBox cb1 = sender as ComboBox;
panel1.Controls.Remove(cb1);
}
and for ADDING cumbobox and button in the button click
ComboBox txtRun3 = new ComboBox();
txtRun3.Name = "txtDynamic" + c++ ;
txtRun3.Location = new Point(30, 18 + (30 * c));
Button btn = new Button();
btn.Name = "btn" + p++;
btn.Location = new Point(200, 18 + (30 * c));
there isnt any error coming how to solve that
shaikh-adil
11-Dec-12 6:59am
View
l panel1.Controls.Remove on the TextBox ??
what does this means?
can you write and explain sir
please
shaikh-adil
11-Dec-12 6:29am
View
Deleted
yess sir
how to bind tag with the deletion option means if i added textbox and a label and a button in a line then when button is clicked then the textbox and label should be deleted,
and other controls should not be effected by this.
how can i achive this?
shaikh-adil
11-Dec-12 6:06am
View
sir if i have added a button and i textbox in one line and i want that a button should delete the aside textbox which is the same line so how can i do that?
i want only the textbox which is aside that should be delete all the other control should not be effected with the delete option?
is it possible to delete a component in runtime means dynamically?
shaikh-adil
11-Dec-12 6:05am
View
sir if i have added a button and i textbox in one line and i want that a button should delete the aside textbox which is the same line so how can i do that? i want only the textbox which is aside that should be delete all the other control should not be effected with the delete option? is it possible to delete a component in runtime means dynamically?
shaikh-adil
11-Dec-12 5:22am
View
private void txtRun3_Leave(object sender, EventArgs e)
{
ComboBox cb = sender as ComboBox;
if (cb != null)
{
Label lb = cb.Tag as Label;
if (cb.Text == string.Empty)
{
lb.Visible = true;
}
}
}
int c = 0;
int p = 0;
private void button1_Click(object sender, EventArgs e)
{
panel1.VerticalScroll.Value = VerticalScroll.Minimum;
panel1.HorizontalScroll.Value = HorizontalScroll.Minimum;
Label label = new Label();
label.Name = "dynamiclabel" + p++ ;
label.Location = new Point(160, 18 + (35 * p) + panel1.AutoScrollPosition.Y); ;
ComboBox txtRun3 = new ComboBox();
txtRun3.Name = "txtDynamic" + c++ ;
txtRun3.Location = new Point(30, 18 + (30 * c) + panel1.AutoScrollPosition.Y); ;
txtRun3.Tag = label;
label.Visible = false;
label.Text = "labelname";
txtRun3.Leave += new EventHandler(txtRun3_Leave);
panel1.Controls.Add(label);
panel1.Controls.Add(txtRun3);
}
sir i have done this but the problem is the 4th labels which should be by the side of the combobox is below many pixels can you tell me now what is the problem when i have implemented
shaikh-adil
11-Dec-12 5:18am
View
sir can thank you once again
can i ask one more question related to this topic?
shaikh-adil
11-Dec-12 5:17am
View
private void txtRun3_Leave(object sender, EventArgs e)
{
ComboBox cb = sender as ComboBox;
if (cb != null)
{
Label lb = cb.Tag as Label;
if (cb.Text == string.Empty)
{
lb.Visible = true;
}
}
}
int c = 0;
int p = 0;
private void button1_Click(object sender, EventArgs e)
{
panel1.VerticalScroll.Value = VerticalScroll.Minimum;
panel1.HorizontalScroll.Value = HorizontalScroll.Minimum;
Label label = new Label();
label.Name = "dynamiclabel" + p++ ;
label.Location = new Point(160, 18 + (35 * p));
ComboBox txtRun3 = new ComboBox();
txtRun3.Name = "txtDynamic" + c++ ;
txtRun3.Location = new Point(30, 18 + (35 * c));
txtRun3.Tag = label;
label.Visible = false;
label.Text = "labelname";
txtRun3.Leave += new EventHandler(txtRun3_Leave);
panel1.Controls.Add(label);
panel1.Controls.Add(txtRun3);
}
sir i have done this but the problem is the 4th labels which should be by the side of the combobox is below many pixels can you tell me now what is the problem when i have implemented
panel1.VerticalScroll.Value = VerticalScroll.Minimum;
shaikh-adil
10-Dec-12 23:02pm
View
Reason for my vote of 5 \n very good
shaikh-adil
10-Dec-12 22:59pm
View
Deleted
thank you sir that was really a silly mistake
shaikh-adil
10-Dec-12 22:58pm
View
Deleted
+5
shaikh-adil
10-Dec-12 22:58pm
View
+5
shaikh-adil
10-Dec-12 22:56pm
View
that was a really simple mistake
:)
thank you again for helping and solving my doubt sir
shaikh-adil
10-Dec-12 13:54pm
View
yess i have both the option. You too are awsome coders.
:)
thanks to you two.
shaikh-adil
10-Dec-12 11:34am
View
sir can you tell me one more thing relating to dynamic validation
if i am using this code for validation
public bool valun()
{
if (combobox.Text == string.Empty)
{
return true;
}
else
{
return false;
}
}
public void validation_username()
{
bool stat = valun();
if (stat == true)
{
label1.visible =true
}
else
{
label1.visible =true
}
}
then how can i validate dynamic control which i have added?
shaikh-adil
10-Dec-12 11:33am
View
:)got you.
thanks for explaning and if i want to implement your method and if i want to focus on the last combobox then what can i do?
shaikh-adil
10-Dec-12 11:27am
View
thank you sir
:)
very thanks for helping us
shaikh-adil
10-Dec-12 10:44am
View
panel1.VerticalScroll.Value = VerticalScroll.Minimum;
what does this means sir?
it is adding the vertical scroll value which is minimum?? what is this?
shaikh-adil
10-Dec-12 10:43am
View
can you explain sir what this will do
panel1.AutoScrollPosition.Y);
i am confused a little bit
shaikh-adil
10-Dec-12 10:41am
View
+5 thanks to you also sir.
:)
shaikh-adil
10-Dec-12 10:40am
View
+5:)
thanks sir
shaikh-adil
10-Dec-12 9:14am
View
thanks bro.
shaikh-adil
10-Dec-12 8:28am
View
+5
shaikh-adil
7-Dec-12 4:46am
View
if i dont want any complexity, i have a form without any control. If i want to press the tab scroll and num lock by using code. So how can i do that,
i dont want any complexity i just want to press these keys programmatically. As my form doesnt function anything. So by this i can do it in simple way i think
shaikh-adil
6-Dec-12 11:05am
View
yess you are right but i prevoiusly thought about maskedtextbox and for editing purpose mask textbox is good rather using textbox.
when you erase the text in simple textbox it erases all the things and in masked textbox it olny erases the digits. it is less occurency of error that a user misunderstood to enter the text in masked textbox than the textbox
shaikh-adil
6-Dec-12 10:06am
View
ohkay. i got you thanks sir
shaikh-adil
6-Dec-12 10:05am
View
sir can you comment and solve my problem
i have a discussion here in comment. just take a look of comment in this page please
http://www.codeproject.com/Questions/503496/showingplusimageplusonplustab
shaikh-adil
6-Dec-12 10:01am
View
the mask propoerty is set to short date
i.e
00/00/0000
shaikh-adil
6-Dec-12 9:45am
View
but what is this culture???
i am hearing this first time sir
shaikh-adil
6-Dec-12 9:40am
View
by your code
this is the output 12/62/012_
how to make this as
06/12/2012
shaikh-adil
6-Dec-12 9:32am
View
nope sir i didint understood.
i dont know how to do it
shaikh-adil
6-Dec-12 9:22am
View
sir i have made this code but the problem is it doesnt change the tabbutton's background it changes the tab's background
tabPage4.BackgroundImage = Properties.Resources.sc;
shaikh-adil
6-Dec-12 9:17am
View
Cannot implicitly convert type 'System.DateTime' to 'string"
this error is coming
shaikh-adil
6-Dec-12 9:01am
View
nope. it is winform :(
shaikh-adil
6-Dec-12 9:00am
View
Deleted
nope. it is winform
:(
shaikh-adil
6-Dec-12 8:53am
View
sorry if i am disturbing you but
what to set then?
shaikh-adil
6-Dec-12 8:36am
View
it fills the msktextbox with 12/62/012_ how to make this
06/12/2012
shaikh-adil
6-Dec-12 8:18am
View
problem?
how can i fill the mask textbox with current date with this format
25/12/2012
shaikh-adil
6-Dec-12 8:17am
View
dont concentrate on error sir.
can you suggest how to fill mask textbox with date?
shaikh-adil
6-Dec-12 8:16am
View
its of bool conversion. but can you suggest answer how to fill masked textbox with 25/12/2012 this type of date
shaikh-adil
5-Dec-12 2:43am
View
nice sir
thanks
and if i want to change the image of the tab button i mean. The image key to another image in the image list. When the user clicks the tab button the image should b changed to another image and if i tab is deselected then restore to orignal image.
I know that it should be done through events but the problem is i dont know the code how to set the image programmatically and which event will b fire for changing?
Can you help me sir
shaikh-adil
1-Dec-12 13:28pm
View
+5sir, nice answer.
shaikh-adil
1-Dec-12 13:21pm
View
brother.. what sir told about this?
shaikh-adil
28-Nov-12 9:20am
View
nice sir
thank you
it worked
shaikh-adil
28-Nov-12 8:56am
View
yes sir but still the error is coming it is comm in perfect place
shaikh-adil
28-Nov-12 8:51am
View
Deleted
its quite good than privoius one. but the problem is the password is updating but still the error invalid id or password is coming each time.!
shaikh-adil
28-Nov-12 8:47am
View
+5
shaikh-adil
28-Nov-12 8:46am
View
+5
shaikh-adil
28-Nov-12 8:39am
View
"there is already an open datareader associated with that command which must be close first"
sir
this error is coming
shaikh-adil
28-Nov-12 8:38am
View
there is already an open datareader associated with that command which must be close first
shaikh-adil
28-Nov-12 8:33am
View
no sir,
i have written comm.ExecuteNonQuery();
after that. but the exception error is comming i.e
Error with the database connection the error is
there is already an open datareader associated with that command which must be close first
shaikh-adil
28-Nov-12 8:22am
View
thanks sir
shaikh-adil
28-Nov-12 8:20am
View
and sir you have told rightly. the password is not updated.
how can i do that?
shaikh-adil
28-Nov-12 8:14am
View
sir your idea is awsome i know that my system is not secure,
the problem is i studied about the hashing system
but i dont know how to implement that, your example is nice sir but i dont know step by step implementation as a a newbie i dont know much about .net and implementation with hashing function or crptrography in .net
your example is for console app. and i am using winform so dont know about such conversion.
and thanks for parametrized queries it is much simple in use. and because of this i'v enhance in my project work
thanks sir
:)
shaikh-adil
28-Nov-12 5:30am
View
how to include??? Sir i am newbie.
Can you tell me how to include exception in catch
shaikh-adil
28-Nov-12 0:49am
View
Deleted
how to do that. Can you guide me in details.
Please sir
shaikh-adil
27-Nov-12 20:29pm
View
tell me about. Menu checked option. How to do that???
If i click on that tool strip menu then the checked mark is shown. I want to regain the state of the tool strip menu item. When application is started the check mark will b filled automatically
shaikh-adil
22-Nov-12 7:33am
View
i can you xml as backup option??
This code you have given is used for backup. Then what to do for restoring?
shaikh-adil
22-Nov-12 3:44am
View
nice one but i didint understood what you have done. but it is usefull
shaikh-adil
20-Nov-12 4:02am
View
+5
shaikh-adil
20-Nov-12 4:02am
View
+5
shaikh-adil
20-Nov-12 4:01am
View
+5
shaikh-adil
19-Nov-12 7:02am
View
you diditn understood my question.
I asked for validation for combo box not the textbox.
So where is the textbox1 and textbox2 comes???
shaikh-adil
19-Nov-12 1:30am
View
you are welcome
:)
shaikh-adil
19-Nov-12 1:14am
View
nice shot.
shaikh-adil
19-Nov-12 1:13am
View
good answer
:)
shaikh-adil
19-Nov-12 1:01am
View
+5
shaikh-adil
19-Nov-12 1:01am
View
+5
shaikh-adil
19-Nov-12 0:59am
View
+5
shaikh-adil
19-Nov-12 0:57am
View
your welcome sir
shaikh-adil
19-Nov-12 0:55am
View
i had used regex for that.but whitespace regex is too difficult to develop.
but this answer was awsome.
+5
thank you sir
shaikh-adil
19-Nov-12 0:23am
View
+5
shaikh-adil
18-Nov-12 5:10am
View
its not understandable. and that regex is not what i want.
shaikh-adil
17-Nov-12 6:54am
View
how to edit the form to print only the picture box? and labels on that form
shaikh-adil
17-Nov-12 6:53am
View
i am too asking that only
shaikh-adil
16-Nov-12 4:29am
View
and bro,
my code is only for the combobox which have list. User click the one option which is avalilable if i want user can choose one option but use can also type in combobox and it will be updated in the database. How can i do that? This code is only for option which is available in combo box's list i cant create new string at run time. How can i acchive?
shaikh-adil
16-Nov-12 4:25am
View
and bro,
my code is only for the combobox which have list. User click the one option which is avalilable if i want user can choose one option but use can also type in combobox and it will be updated in the database. How can i do that? This code is only for option which is available in combo box's list i cant create new string at run time. How can i acchive?
shaikh-adil
15-Nov-12 13:55pm
View
bro you have given me this
cmd.CommandText = "INSERT INTO Table2 (username,password,sec_questions) VALUES (@username,@password,@sec_questions)";
which is same as mine. then where is the problem?
shaikh-adil
15-Nov-12 13:45pm
View
sorry
but your language is notunderstandable
"You created a like of SQL that expects a parameter called sec_question. You did not provide it. You provided sec_questions."
a like of sql???? what is it? and can you help me out in combobox without concentration on error? then only i can understand
shaikh-adil
15-Nov-12 13:37pm
View
sir i am a learner. i am making a basic simple project so first of all i am not coding for payment. i am just learning here.
so how can i do it? the textbox field is inserting propoerly in database but i dont know how to do that with combobbox
shaikh-adil
15-Nov-12 12:55pm
View
Probably none!????
i have pasted above lines of code.?it will not produce any image??
and can you helpme with code if i have a picturebox and lables. then where will be modification in coding?
shaikh-adil
15-Nov-12 9:02am
View
sorry i have solved 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
shaikh-adil
15-Nov-12 8:20am
View
dont say sorry sir. you are elder than me
thanks for replying to my post as i have asked many questions, peoples must have thought the this guy is always disturbing coders. i dont know about others but you have always replied my post.
thanks you
:)
shaikh-adil
15-Nov-12 8:16am
View
i am also doing this since one week that article is dumb. the code is not correct i think.
this is my code which is copied from that website using print document
there is some error
public partial class Form1 : Form
{
public Form1()
{
private Button printButton = new Button();
private PrintDocument printDocument1 = new PrintDocument();
public Form1()
{
printButton.Text = "Print Form";
printButton.Click += new EventHandler(printButton_Click);
printDocument1.PrintPage += new PrintPageEventHandler(printDocument1_PrintPage);//here is the error that "Ambiguity between 'printing.Form1.printDocument1' and 'printing.Form1.printDocument1'
this.Controls.Add(printButton);
}
void printButton_Click(object sender, EventArgs e)
{
CaptureScreen();
printDocument1.Print(); // here is the error that "Ambiguity between 'printing.Form1.printDocument1' and 'printing.Form1.printDocument1'
}
Bitmap memoryImage;
private void CaptureScreen()
{
Graphics myGraphics = this.CreateGraphics();
Size s = this.Size;
memoryImage = new Bitmap(s.Width, s.Height, myGraphics);
Graphics memoryGraphics = Graphics.FromImage(memoryImage);
memoryGraphics.CopyFromScreen(this.Location.X, this.Location.Y, 0, 0, s);
}
private void printDocument1_PrintPage(System.Object sender,
System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(memoryImage, 0, 0);
}
public static void Main()
{
Application.Run(new Form1());
}
}
}
public static void Main()
{
Application.Run(new Form1());
}
shaikh-adil
15-Nov-12 7:27am
View
thank you mohammed bhai.
for giving knowledge.
thank you once again
shaikh-adil
15-Nov-12 7:26am
View
i dont worry. if you have laughed at me. but i have gained some knowledge and camed to know about new thing i.e setting in visual studio.
even if you laughed it dosent hurt me well.
thanks for giving answers and solving my doubt.
really thank you sir
shaikh-adil
15-Nov-12 7:16am
View
Ooo! Well, there are so many possible answers here...:laugh: At your computer? :)
what does this mean?
shaikh-adil
15-Nov-12 7:09am
View
but what is this
if (result > 0)??
i didint get it can you explain
shaikh-adil
15-Nov-12 7:01am
View
thanks mukhthar bhai
:)
shaikh-adil
15-Nov-12 6:55am
View
""When you change the Checkbox, save the new value:
Properties.Settings.Default.ShowSplashScreen = splashScreenCheckBox.Checked;
Properties.Settings.Default.Save();""
where is have to write this code sir?
shaikh-adil
15-Nov-12 6:22am
View
Is what you are trying to do have an optional splash screen that does or doesn't show up *next* time the application is started?
yesss i am trying to do that
my english is not so good so there is problem that you havent understood.
so bro. how can i do that?
firstly a splash screen is shown but when user login and checked the checkbox that do not show the splash screen at startup then splash screen will not been shown to him.
now you have understood. can you help me out in this.
thanks in advance sir
shaikh-adil
15-Nov-12 4:02am
View
sorry sir.
I am a newbie to programming
can you guide me?
I have that threading on the main form which contains splash form.
I want a checkbox to determine the splashing form if the checkbox is checked then splash form will not be visible. And if not checked then it will be at every mainform starting.
Can you help me in this
shaikh-adil
14-Nov-12 17:00pm
View
+5
shaikh-adil
14-Nov-12 17:00pm
View
+5
shaikh-adil
14-Nov-12 16:46pm
View
i have done this
public Form2()
{
InitializeComponent();
if (checkBox1.Checked)
{
Thread t = new Thread(new ThreadStart(splashscreen));
t.Start();
Thread.Sleep(5000);
//InitializeComponent();
t.Abort();
}
else
{
Application.Run(new Form2());
}
}
public void splashscreen()
{
Application.Run(new Form5());
}
but the exception is caught i.e stackoverflow exception
how can i do that?
can you help me in this?
shaikh-adil
13-Nov-12 10:42am
View
oh sorry it was a silly mistake
thanks for helping
shaikh-adil
12-Nov-12 10:37am
View
nope bro i am making a data entry project so i am need is permanent printing. I dont want to print from image viewer. Can you help me
shaikh-adil
12-Nov-12 10:35am
View
i am doing my project in windows form not asp page
shaikh-adil
10-Nov-12 1:04am
View
sir one more question if i have diffrent diffrent method which will run for only one event. For example i have a method ex. Validating event of all the textbox. Then can i decrease code?
I have validation() validation1() and validation2() this will run on diffrent textbox but on same event ex. Textbox1Mousehover textbox2 mousehover textbox3mousehover so how can i do to decrease the code lenght
Show More