Answer Questions
Rich Howard User Control functionality
hi Can any one clear up my mind when do you really need to add the usercontrol form to your project/solution, what exactly is its funtionality. pls show me few basic samples. When you only need a container, you should use Panel's. But when you want a full functional control that you can use in your whole project and even can be reused in other projects you need to create a UserControl. A Panel is only a contrianer for controls, noth ...Show All
rupa Progress Bar
I have a progress bar whereby it should progress for every graph that is loaded.But upon executing the program, the progress bar will immediately hit 100 % even the graph had not been fully loaded. But my code is written such that the PerformStep is placed after the loading of graph. Please advice. Thanks for ( int i = 1; i <= load_graph; i++) { parent_form.flowLayoutPanel2.Controls.Add( new TrendChart (a , root_source)); ...Show All
12thFret Should StreamWriter Auto-Close in Destructor?
Hi all, This is a newbie question... I have a StreamWriter that writes some text to a file. I find that if I do not explicitly call Close() or Flush() on the stream, the file is essentially truncated. The last few lines of text do not appear in the file. I assume (maybe that's my problem) that the StreamWriter's destructor will automatically close the stream if I don't do it explicitly. Am I wrong about this Wouldn't it make sense for t ...Show All
vice The c# Point structure
Hello, I am writing an application for the construction industry which contains a graphics module. In this module points are typically being generated and modified (ie the location of those points). I have a C++ background and am reasonably knowledgeable on c# theory and I realise the differences between structures and classes regarding the use of the 'new' keyword. When it is required to generate a new point I use the code : Point pt1; pt1 = ne ...Show All
bogomil How can I do this
Hello , when i create a username,I wanted to do check the username from a Active directory and if the username is exist already then i wanted to create another username by adding an integer. for example..... first person when he create a username the username will be dave-1 2nd person dave-2 when the third person try...the available username should be dave-3 how can I do that in C# can anybody help me out regards, Thaya Are you having pr ...Show All
Sly string to int
Hello everyone, Im trying to setup a progress bar, right now this is basically how it is set up, first I have the app count lines in a text file, this works ok: textBox2.Text = rowCount.ToString(); rowCount++; inputstring1 = StreamReader1.ReadLine(); then later, I have this where the listbox is being populated, the progress bar should show the progress of the population. textBox2 displays the number of rows, and the maximum should ...Show All
Solid Ash Mappoint control usage best practices
I want to use the Mappoint control in my application. If I make a reference / add it to my toolbox it is useable and such. From the point of view of a .NET application development best practice I was wondering how I should do this to make the code as reliable and resilient as possible. First, I drop the control on the form. I use the control and all is well on my dev machine. When I deploy if Mappoint and the control are NOT ...Show All
Brian5003 Index of a string within another string
The ".IndexOf" functionality for determining the position of a char within a string is very useful, but I need to be able to do a similar thing with a string rather than a char. i.e. I would like to be able to say string1.IndexOf("string2") rather than just string1.IndexOf('c'). Is there simple functionality like this that I don't know about (or have just plain forgotten!) If not, what is the recommended strategy ...Show All
Arulanantham DataReader not returning any data
Hi there, I have a slight problem using DAAB 2.0. I have a sp that runs fine through sql 2005 passing in the params manually, however, when I try and do the following i get no data public void() { userToGet = new User() //User struct Database db = DatabaseFactory.CreateDatabase("DB"); using(DbCommand dbCommand = db.GetStoredProcCommand("sp_name")) { db.AddInParameter(dbCommand, 'UserLogonID", DbType.String, &quo ...Show All
joeyf Is there any way to get the location where the new project is created in when creating the project?
Is there any way to get the location where the new project is created in when creating the project by the my own project template with wizard pages(before the project is created) for example we always set the name(project1) of the project and location(d:\myprojects) where is project is created in before we click OK button to create the project in the "New Project" wizard page. I only want the location d:\myprojects!how to archie ...Show All
lxiao Open new form when button is pressed
When i make several forms in the same projects, i want them to open when i press buttons in the forms. I double-click on a button to view the code-part, and I want to make a new object of a form that I want to pop up when that button is pressed. Say Form1 f = new Form. When I start typing Form1, VS will show a list of matching forms, but sometimes the forms i want to use doesnt show, and I cant make objects of them. Does anyone know why I have s ...Show All
dcoder_85 Showing FileName
Ok, when I put the following code for a label to display it a file name it displays the whole directory: label1.text = file.FileName; What I want is just to dispay the name of the file. Not the whole directory. ie. Eddie McClain - Living Forever.mp3. Is there a way to do this. Can someone help me It depends on where the file name is currently stored. If you have only a string then use Path.GetFileNameWithoutExtension ...Show All
Pat11 visual c# database
im getting this error when trying to run a form which saves details of a new user to the database. Please help its an emergency System.Data.ConstraintException was unhandled Message="Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints." Source="System.Data" StackTrace: at System.Data.DataSet.FailedEnableConstraints() at System.Data.DataSet.EnableCons ...Show All
DanM Error executing child request
am making a webpage and am using datagrid to get data from the database the grid is in it's own frame (iframe) i made a hyperlink colum and used it to redirect using othere aspx file (red.aspx) when i want to redirect i make a link for red.aspx tar="where i want to go" the problem is that neither Server.Transfer("www.google.com", false ); nor Response.Redirect(temp); works i tried: //EnableViewStateMac= false; //Server.Transfer("www.goo ...Show All
DummyJone C# Project slows down IDE
Based on my reading of the newgroup and bugs, some of the perf issues in VS 2005 makes people's blood pressure rise. I'm no exception. I'm hoping that the RTM version doesn't have the perf bug I'm experiencing. I have a solution that contains 15 C++ projects and 2 C# projects. Been that way for about a month. But then now my sessions in VS get reallly slow... typ...in...g... i.....s.... s...l...o...w.,.. slow window redra ...Show All
