Visual Studio code help
here is my code: private void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Tab && e.Shift) { } else if (e.KeyCode == Keys.Back) { [...]
Answer Question
| September 21, 2010 11:25 AM
C#, C# .NET, Visual Studio 2005, VS 2005
here is my code: private void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Tab && e.Shift) { } else if (e.KeyCode == Keys.Back) { [...]
Object Sender and EventArgs in Visual Studio 2005
For Knowledge:- Private Void Textbox1_TextChange(Object Sender,EventArgs e) Private is Modifier Void is Returntype Textbox1_TextChange is an Event So what is Object sender,EventArgs e and how does it works? may be i wrong in above case but it’s necessary to understand it better.
Answer Question
| September 8, 2010 3:11 PM
C#, Visual Studio, Visual Studio 2005, VS 2005
For Knowledge:- Private Void Textbox1_TextChange(Object Sender,EventArgs e) Private is Modifier Void is Returntype Textbox1_TextChange is an Event So what is Object sender,EventArgs e and how does it works? may be i wrong in above case but it’s necessary to understand it better.
Difference Behaviour of Dispose Method Between Winforms and Textboxes
This question is just for knowledge. Whenever Dispose Method Called for clean Winforms, it’s Finalize and disposed. So my question is why not in TextBox case. It Should same behaviour of dispose method against textbox. Instead of clean/dispose it will remain Invisible. If we have no use than it will have to completly remove during [...]
Answer Question
| September 7, 2010 12:54 PM
C#, TextBox, Visual Studio, Visual Studio 2005, VS 2005, WinForms
This question is just for knowledge. Whenever Dispose Method Called for clean Winforms, it’s Finalize and disposed. So my question is why not in TextBox case. It Should same behaviour of dispose method against textbox. Instead of clean/dispose it will remain Invisible. If we have no use than it will have to completly remove during [...]
Parameter Date Conversion in SQL 2000
my code is : string sql="insert into dummy(date)values(@date)"; sqlcommand cmd=new sqlcommand(sql,con); cmd.parameters.add("@date",sqldbtype.datetime).values=maskedtextbox1.text text; cmd.executenonquery(); the problem is it's throw and error like conversion of varchar to date; Note :- my demand to put date in DD/MM/YYYY format.
Answer Question
| September 3, 2010 4:22 PM
C#, SQL, SQL 2000, SQL commands, SQL Parameters, SQL Server, String manipulation, Visual Studio 2005
my code is : string sql="insert into dummy(date)values(@date)"; sqlcommand cmd=new sqlcommand(sql,con); cmd.parameters.add("@date",sqldbtype.datetime).values=maskedtextbox1.text text; cmd.executenonquery(); the problem is it's throw and error like conversion of varchar to date; Note :- my demand to put date in DD/MM/YYYY format.
SQL Insert Error Against Runtime Control Error in FLP
am trying to insert into sql-2000 database my code is: StringBuilder sb=null; sb=new StringBuilders; sb.Append("Insert into dummy(name,amount) values"); foreach(Control ctl in this.FlowLayoutPanel1.Controls) { if( ctls.Name.Contains("tb") && ctl is TextBox) { sb.Append(ctl.Text); } } foreach(Control bbl in this.FlowLayoutPanel1.Controls) { if (bbl.Name.Contians("bb") && bb is TextBoxe) { sb.Append(bbl.Text); } } SqlCommand cmd=new SqlCommand(sb.ToString(),con); cmd.CommandType=CommandType.Text; cmd.ExecuteNoneQuery(); I don’t [...]
Answer Question
| September 3, 2010 6:55 AM
C#, SQL 2000, SQL error messages, SQL Server, SQL Server 2000
am trying to insert into sql-2000 database my code is: StringBuilder sb=null; sb=new StringBuilders; sb.Append("Insert into dummy(name,amount) values"); foreach(Control ctl in this.FlowLayoutPanel1.Controls) { if( ctls.Name.Contains("tb") && ctl is TextBox) { sb.Append(ctl.Text); } } foreach(Control bbl in this.FlowLayoutPanel1.Controls) { if (bbl.Name.Contians("bb") && bb is TextBoxe) { sb.Append(bbl.Text); } } SqlCommand cmd=new SqlCommand(sb.ToString(),con); cmd.CommandType=CommandType.Text; cmd.ExecuteNoneQuery(); I don’t [...]
Setfocus on FlowlayoutPanel Controls
after creating the runtime control on panel how to setfocus between controls in FlowlayoutPanel. suppose I have to textbox which is created on dynamically like below layout of controls in FlowLayoutPanel is tbb [...]
Answer Question
| August 31, 2010 1:21 PM
C#, RunTime, Visual Studio 2005, VS 2005
after creating the runtime control on panel how to setfocus between controls in FlowlayoutPanel. suppose I have to textbox which is created on dynamically like below layout of controls in FlowLayoutPanel is tbb [...]
Access Listbox Without Focusing in WinForms
Is that possible to access ListBox without Focus? I mean as below example I have a TextBox and a ListBox. I wants when cursor in textbox listbox should search the items containing in textbox and do well up and down arrow key. When i press Enter the items which is search by listbox should replace [...]
Answer Question
| August 27, 2010 3:44 PM
C#, ListBox, Visual Studio, Visual Studio 2005, VS 2005, WinForms
Is that possible to access ListBox without Focus? I mean as below example I have a TextBox and a ListBox. I wants when cursor in textbox listbox should search the items containing in textbox and do well up and down arrow key. When i press Enter the items which is search by listbox should replace [...]
Collection Or Reference Of Multiple Runtime Controls In FLP For Only Specific Controls
I have create two runtime textbox contols in FlowLayOutPanel as below.. One Textbox Control TextBox tb= new TextBox(); tb.Name="tbox"+i.tostring(); this.FlowLayOutPanel1.Controls.Add(tb); Another Textbox Control TextBox tb= new TextBox(); tb.Name="tbox"+i.tostring(); this.FlowLayOutPanel1.Controls.Add(tb); Now both are ready for runtime. If I have to collect or reference only “tbox” control without effecting “tbbox” control then How to collect/refrenced. if I [...]
Answer Question
| August 23, 2010 12:05 PM
C#, TextBox, Visual Studio 2005, VS 2005
I have create two runtime textbox contols in FlowLayOutPanel as below.. One Textbox Control TextBox tb= new TextBox(); tb.Name="tbox"+i.tostring(); this.FlowLayOutPanel1.Controls.Add(tb); Another Textbox Control TextBox tb= new TextBox(); tb.Name="tbox"+i.tostring(); this.FlowLayOutPanel1.Controls.Add(tb); Now both are ready for runtime. If I have to collect or reference only “tbox” control without effecting “tbbox” control then How to collect/refrenced. if I [...]
Setup And Deployment By Reading Bios Of User System.
Hi EveryBody I wants to preapare my application before setup/deploy as to read the Bios of User System like HDD. I wants to read HDD of user first and generate serial key for it. if user change their HDD then my applicatiion demand new serial key for it. In short my aim is to protect [...]
Answer Question
| July 27, 2011 4:06 PM
BIOS, BIOS settings, C#, Deployment tools, Visual Studio
Hi EveryBody I wants to preapare my application before setup/deploy as to read the Bios of User System like HDD. I wants to read HDD of user first and generate serial key for it. if user change their HDD then my applicatiion demand new serial key for it. In short my aim is to protect [...]
Runtime Control Indexing Problems to set the index on control for call it in IF condition
hi, am using c#, vs-2005 am generate runtime controls as below. Textbox tb=new Textbox(); tb.Location=tbpoint; // declare in Class Body tb.Name="tbox" + i.to string(); // i declare in Class Body tbpoint.Y+=30; this.FlowLayoutPanel1.Controls.Add(tb); the above code Ready for runtime other same runtime controls Textbox bb=new Textbox(); bb.Location=tbpointt; // declare in Class Body bb.Name="tboxx" + i.to string(); [...]
Answer Question
| August 31, 2010 12:59 PM
C#, RunTime, Visual Studio, Visual Studio 2005, VS 2005, Windows XP
hi, am using c#, vs-2005 am generate runtime controls as below. Textbox tb=new Textbox(); tb.Location=tbpoint; // declare in Class Body tb.Name="tbox" + i.to string(); // i declare in Class Body tbpoint.Y+=30; this.FlowLayoutPanel1.Controls.Add(tb); the above code Ready for runtime other same runtime controls Textbox bb=new Textbox(); bb.Location=tbpointt; // declare in Class Body bb.Name="tboxx" + i.to string(); [...]
Datagridview 2008
When I edit datagridview cell and press enter it is going on next line cell. is it possible the after press enter the cursor in the same cell or in the same row but next cell ?
Answer Question
| July 29, 2010 4:57 AM
C#, DataGridView, Windows Application, Windows development, Windows Forms
When I edit datagridview cell and press enter it is going on next line cell. is it possible the after press enter the cursor in the same cell or in the same row but next cell ?
Remove link from treeview parent node
Hi, Is there a way I can keep the text of a Parent node but remove the link? The treeview parent node is used just as a header, no navigation.I am implementing this tree view using Asp.net with C#.Any help would be great.Thanks.
Answer Question
| July 27, 2010 2:02 PM
.NET development, ASP.NET, C#, C# .NET, TreeView
Hi, Is there a way I can keep the text of a Parent node but remove the link? The treeview parent node is used just as a header, no navigation.I am implementing this tree view using Asp.net with C#.Any help would be great.Thanks.
Log In then Output the Data of the Logged Person C# SQL 2005
I have a program that requires a user to input his/her IDNumber. If it doesnt exist the program will prompt to go to the NewRecord section. When the user input his IDNumber and he will be logged on to the real program. After doing the program and pressing the DONE Button. A messagebox will appear [...]
Answer Question
| August 3, 2010 2:36 PM
C#, Programming, SQL 2005, sql 2005 Performance Issues, SQL Database
I have a program that requires a user to input his/her IDNumber. If it doesnt exist the program will prompt to go to the NewRecord section. When the user input his IDNumber and he will be logged on to the real program. After doing the program and pressing the DONE Button. A messagebox will appear [...]
How to create a (visual) window baseclass without xaml
Hi, I want to create a window baseclass that contains 3 elements: - a ribbon control (ie devcomponents wpf ribbon) - a region to contain child form controls - a statusbar This way, all windows that inherit from this window will automatically provide these controls (and soms functions). I created a lookless windowbase.cs file that [...]
Answer Question
| March 30, 2010 9:08 PM
baseform, C#, child, code behind, Inheritance, Template, visual, window, wpf
Hi, I want to create a window baseclass that contains 3 elements: - a ribbon control (ie devcomponents wpf ribbon) - a region to contain child form controls - a statusbar This way, all windows that inherit from this window will automatically provide these controls (and soms functions). I created a lookless windowbase.cs file that [...]
Assembly injection/hook c#
I’m trying to inject/hook (or whatever method is the best) into a .net assembly exe. My objective is to extend the CollectionChanged event of all listviews. I’ve tried to use reflector to find some info on the assembly but it is obfuscatored and I’m not very skilled reading il code : ) So any help [...]
Answer Question
| March 30, 2010 10:00 PM
.NET, C#
I’m trying to inject/hook (or whatever method is the best) into a .net assembly exe. My objective is to extend the CollectionChanged event of all listviews. I’ve tried to use reflector to find some info on the assembly but it is obfuscatored and I’m not very skilled reading il code : ) So any help [...]
Get the path in c#
Hi, I am writing a windows app with c#. Have 2 folders for pdf and text files under the project. How can I open or have access to the files under these folders??? I use System.IO.StreamReader objReader = new System.IO.StreamReader(“/jrn/test.txt”), but it looks for the file in the following path: ’C:Documents and SettingsmeMyDocumentsVisual Studio 2005ProjectsCDProgramCDProgrambinDebugjrntest.txt. Any [...]
Answer Question
| March 30, 2010 2:53 PM
C#, C# .NET, Development Environments
Hi, I am writing a windows app with c#. Have 2 folders for pdf and text files under the project. How can I open or have access to the files under these folders??? I use System.IO.StreamReader objReader = new System.IO.StreamReader(“/jrn/test.txt”), but it looks for the file in the following path: ’C:Documents and SettingsmeMyDocumentsVisual Studio 2005ProjectsCDProgramCDProgrambinDebugjrntest.txt. Any [...]
how to give report name dynamically – SSRS 2005
I created report in ssrs 2005. i added ms report viewer in c# windows application and from smart tag i gave the report name. It display the report but how to give name dynamically, for example i want to put the report name through textbox and want to show the report at runtime.
Answer Question
| February 26, 2010 10:54 AM
C#, SSRS 2005, SSRS reports
I created report in ssrs 2005. i added ms report viewer in c# windows application and from smart tag i gave the report name. It display the report but how to give name dynamically, for example i want to put the report name through textbox and want to show the report at runtime.
Interfaces and Properties
Since you can’t put properties into a c# interface, how do you expose each classes public properties when consuming the class as an interace instance? interface iAnimal { bool Load(int Id); bool Save(); } class Fish : iAnimal { private string description; public string Description { get { return [...]
Answer Question
| February 24, 2010 5:55 PM
C#, Class, interface, Public Properties
Since you can’t put properties into a c# interface, how do you expose each classes public properties when consuming the class as an interace instance? interface iAnimal { bool Load(int Id); bool Save(); } class Fish : iAnimal { private string description; public string Description { get { return [...]
how to input excel file to crystal report in C# .NET
How to input an excel file to crystal report and get a report in required format i.e as client requirement grapph,piechart or tables ? In c# .net
Answer Question
| February 10, 2010 11:20 AM
.NET, C#, C# .NET, Crystal Reports, Microsoft Excel
How to input an excel file to crystal report and get a report in required format i.e as client requirement grapph,piechart or tables ? In c# .net
can you make args that are passed upon runtime in C# global?
I have an app that needs to set the connectionstring based upon an arg that is passed at runtime. I would like to access that argument in any method to create the connectionstring instead of having to pass the value to every method as some methods have quite a few variables passed to it. Since [...]
Answer Question
| February 8, 2010 8:29 PM
C#, C# 2008
I have an app that needs to set the connectionstring based upon an arg that is passed at runtime. I would like to access that argument in any method to create the connectionstring instead of having to pass the value to every method as some methods have quite a few variables passed to it. Since [...]





