59 Discussion / Question Topics
Remove Filter What do I need that I can add a reference to System.Windows.Controls namespace? | |
I am doing some more coding on listView, and I can not figurate it out how to salve the problem that there is always just one checkBox on the listView checked. On the listView I have some names. When I load it there is already a checked name - so … | |
Hi, since this forum has been modified majorly (this happened approx. 6 months ago) nothing works at it should. There is a lot less people asking question (and answering on them), it seems like you have driven them away with these (not-good changes -personally it was whole much better before … | |
I have a small problem with printing reports (made by crystal reports). In Form1 I have a list of customers in a ListView (with checkboxes). If the users selects one customer (checkes ONE checkBox) the report is shown - and the report it self has on option to print. If … | |
I am doing a crystal report, and I would like to dinamiclly add parameters. I did the code which adds the value to one parameter, which I have created in the crystalReportViewer: [CODE]CrystalReport1 cr = new CrystalReport1(); cr.SetParameterValue("ParameterName", ParameterValue); crystalReportViewer1.ReportSource = cr; crystalReportViewer1.Refresh(); [/CODE] But this is for only one … | |
I would like to do the simple card game which can many people play at the same time, but not only one game, there can ne n games running. Recently I was learning how to do server-client coding, using TcpListener and TcpClient network services. But the main difference between the … | |
Hello, I am doing a C# win. application, and using crystal report for printing bills on a custom paper size The width of the paper is unknown (the program has to get the paper size - if this is possible), the lenth of the paper is infinitive (its a roll … | |
I would like to do an application which would be used for calling to all kind of telephones (stationary, mobile) from a pc, using internet. Anyone has any advice where to start and what to use? I read some stuff that I would need to use TAPI app. development. Application … | |
I would like to create a simple program, like a game, but so far without any graphical interface. Only a code, supported with some numbers, so that the user will know whats going on in the background. I was thinking of creating a racing game (like formula 1 or sometihng … | |
I am doing a crystal report with printing. I have encountered on this problem: [CODE] try { PrintDialog print = new PrintDialog(); print.ShowDialog(); crystalReportViewer1.ReportSource = cr1; crystalReportViewer1.PrintReport(); cr1.Refresh(); cr1.PrintToPrinter(1, true, 1, 1); } catch { //MessageBox.Show("Some error occured...", "Opozorilo", MessageBoxButtons.OK, MessageBoxIcon.Error); } [/CODE] I got an error on last line … | |
I would like to know why sql query for month and year is working, and i[B]s not working for day[/B]: [CODE] string myQuery = "SELECT StudentName FROM Students WHERE " + "YEAR(Birth) BETWEEN @yearFrom AND @yearTo AND " + "MONTH(Birth) BETWEEN @monthFrom AND @monthTo AND " + "DAY(Birth) BETWEEN @dayFrom … | |
The code bellow is a sql querry, made in code. I would like to know how to do such stored procedure: [CODE] string[] NameSeperated = FullName.Split(' '); string querryName = @"SELECT StudentID FROM Students WHERE Name = @name"; if (NameSeperated.Length > 1) querryName += " AND LastName = @lastName"; using … | |
I would like to know how to pass object array (object[]) between classes with the code bellow, which now sends string only: [CODE]public delegate void MessageDelegate(Object sender, MessageEventArgs e); public class MessageEventArgs : EventArgs { public string Message; public MessageEventArgs(string msg) { this.Message = msg; } } public interface IController … | |
I would like to know how to send a sms (text message) from windows application to a mobile phone (with entering the number) - for free. One and the only option I know (and I tried) is to send it using email. But I do not have any provider in … | |
I would like to know how to programmatically call a mathod regarding on time. In my example I would like to call a method every hour. Can I use a Timer or is there something else? | |
How to put an image (BitMap) into a statusBar? I was trying with: 1. [CODE]statusBar1.Text = Properties.Resources.MyPucture;[/CODE] 2. [CODE]Bitmap myPic = new Bitmap(Properties.Resources.MyPucture); MethodToShowStatusBarImage() { statusBar1.Text = myPic; }[/CODE] but it is not working. Any clues how to salve this issue? And besides, I have found a lot of example … | |
I would like to know how can I transfter a string value (a name or something) from Login class over static class to Form1? This code I have: 1. In program class: [CODE] static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] … | |
I am doing an application which has some calculation code. I would like to know if there is possible to remember the number from the previous event handler? Lets say that I put into textbox1 number 10 and into textBox2 number 5. When the even button1_Pressed starts the code has … | |
The code bellow allow to select only item in a listView. That means there is only one tick in the listView - always. But I would like to change the code bellow that will allow to unselect too, that there will be no tick at all. So, no tick in … | |
I would like to know if there is any other way to create a doc (or txt) file, then this way that I have in my code: [CODE] if (!System.IO.Directory.Exists(System.IO.Path.GetTempPath() + @"TestDirectory")) System.IO.Directory.CreateDirectory(System.IO.Path.GetTempPath() + @"TestDirectory"); string LogDatoteke = System.IO.Path.GetTempPath() + @"TestDirectory\TestFile.doc"; StreamWriter zapis; zapis = File.CreateText(LogDatoteke); zapis.WriteLine("Some text 1"); zapis.WriteLine(""); … | |
I would like to do a payment order, this one with crystal report: I have already created something, but I do not have the exact lenght and width, like the original payment order has it. I would like to know how to do get the exact measurments in the report … | |
I have a problem of reading a dateTime column from a database. I set a parameter which is a datetime, but it does not read it. I am wondering what could be wrong. This is how I have written a date and time in the database: [url]http://file.si/pthumbs/large/7216/C%23_datetime_Lista.JPG[/url] And this is … | |
I have: Table1: Service: - IDService - ServiceName Table2: Order: - IDOrder - IDServiceFK (foreigh key) I have database table called "Service", in which I store service names. Then I have another table called "Order", in which is the foreigh key of Service. Services are shown in the listView control. … | |
How can I use a DataTable to save data into it? I have a listView with ticks, and when a tick is checked, I would like to put the data of the row into DataTable. In the row I have a "ProductName" and it`s "Price". I am doing this becuase … | |
I have dates and times stored in the database - the data type of DateTime (for example: 17.1.2010 16.23.34 - dd.MM.yyyy hh.mm.ss) The parameter which I define it has too look ONLY of date ("dd.MM.yyyy"), because I want to get all the values on a specific date and the sum … | |
Why when I save a float value into database (the data type is float as well), for example 24,62 in database is writen as 24,6200008392334. I have entered only 2 decimals, but in db there is plenty of them. This is how I have: [CODE]string Together = textBoxAmount.Text; string[] Seperated … | |
I have a listView, in 1st column is are article names, in 2nd column are prices of these articles (data type of float). And I have checkBoxes. What I would like to do, is to count the prices in 2nd column of all selected rows. And then the counted value … | |
I get into DataSet CostumerNames and Hours (type DateTime) of their registrations. I would like to sort customers my time of registration (time of a day). I show both in listView. This is my code: [CODE] string DanesRezervacije = "SELECT Stranka.ImePriimek, Naročilo.RegisterTime FROM Stranka, Naročilo " + " WHERE Stranka.IDStranke … | |
I inserted a value of DateTime into database, like "26.12.2009 11:50:00" . Is it possible that the reader will read only the time of a day from this, without date? So far I did only that it reads everything, date and time: [CODE] string myTime = Convert.ToDateTime(dataGridView1.Rows[IndexVrstica].Cells[0].Value).ToShortTimeString(); DateTime myTime2 = … | |
How can I simply do a list of hours - a date schedule (from 0 to 24) in a listView, that 1st column would show hours seperated by 30 min, 2nd column then will be filled with the name who will reserved that hour. Something like that: [URL="http://img189.imageshack.us/img189/5023/clistview02.jpg"]PICTURE[/URL]. | |
How can I show a message in the statusBar for 5 seconds? I do some code, on the end I write out a message in statusBar (statusBar.Text = "Notification Message"; ). But I want that is shown for only 5 seconds. Then it dissapears (with statusBar.Text = ""; ) How … | |
How to get row and column index when I double click (or some other event) of a cell on a ListView? | |
I would like to know if is possible to click on every single cell in a listView seperately, like in a datagridview? If I set a full row selection to false I am only able to select the cell in the 1st column. The point or this thread is, that … | |
How can I put a progress bar inside this code: (I was trying to use PerformStep method for counting rows in data table, and put this code, but no luck: [URL="How can I put a progress bar inside this code: (I was trying to use PerformStep method for counting rows … | |
I would like to do a seperated class with a method which will return CustomerID (this will be a select query from db), based on the Costumer`s name which would come into this method (it will come from a form1`s method - from a textBox). I am not sure how … | |
This is how I have a listView:[URL="http://img200.imageshack.us/img200/2497/clistview03.jpg"] PICTURE[/URL] For example, I have clicked on the 6th row (which is colored blue) and with a double click I want to insert "SomeName" into a 2nd column (called 1.rezervacija) beside the 9:30. How to do it so? I need something else, with … | |
I would like to ask someone, even someone has told me it is not possible. I have a child form2 which is always visible (there is a listView, which shows some data). Then I have a new child form 3 (which is currently opened) and the form3 now does come … | |
I want to retrieve only one column from dataset or datatable. the dataset has one table and that table has many column. But I want only one column from that table. How can i do it? And that will be still in a dataSet, not in a string. | |
I would like to know how to do the code for creating a new Folder that the user can rename it instantely after being created. Like in Windows Explorer: [URL="http://www.file.si/files/2zjwzcmya5woaokschgo.jpg"]PICTURE![/URL] When user clicks on "Make New Folder" it creates inside already selected folder and it colors blue (focus is on … | |
1. My namespace is called "MyNameSpace". So... How to create that Form3 will inherit from Form2, which is already a child of Form1 (Form2 has class: public partial class Form2 : Form) I would like to creat like: class Form3 : Form2 And do not forget, all are windows forms. … | |
I did an application, published and installed it. In my User`s Start Menu there is created a new folder with y shortcut to my application.exe inside. What`s bothering me is the name if this folder. It has a name, that I don`t know how and where to change it. I … | |
I have done and published application and this is what I got just after the installation: What can be wrong? PLATFORM VERSION INFO Windows : 5.1.2600.196608 (Win32NT) Common Language Runtime : 2.0.50727.3603 System.Deployment.dll : 2.0.50727.3053 (netfxsp.050727-3000) mscorwks.dll : 2.0.50727.3603 (GDR.050727-3600) dfdll.dll : 2.0.50727.3053 (netfxsp.050727-3000) dfshim.dll : 2.0.50727.3053 (netfxsp.050727-3000) SOURCES Deployment … | |
I am learing programming for a bit more then 6 months, and recently someone told me my concept is not the best one, he proposed me that I rather split my code into business logic layer and data access layer. And now I would like to ask someone if he … | |
This is the code I have: [CODE] public class BusinessLayer { public Employee[] GetAllEmployees() { Employee[] employees; DataSet myDataSet = DataBaseLayer.GetAllEmployees(); /// How can I convert the myDataSet to Employee List return employees; } }[/CODE] | |
I`ve done an application and I then I published it. That did a setup.exe file. If I want to install it on my pc its all ok, but if I want to install it on some other pc, there is an error. It`s still lookingfor the path I have the … | |
I would like to do windows from with would guide the user through the installation of my already done win application. I already did the Setup Project (File > Add > New Project and select Other Project Types > Setup And Deployment > Setup Project. ) but I would like … | |
I have this code now for inserting new ID into database: [U]IDs are all primary key.[/U] [CODE] MaxID = 0; string GetMaxID = "SELECT MAX(IDPerson) AS IDPerson FROM Persons"; SqlCommand cmd = new SqlCommand(GetMaxID, sqlConn); sqlConn.Open(); SqlDataReader reader = cmd.ExecuteReader(); if (reader.Read()) { MaxID = reader.GetInt32(0); } MaxID++; reader.Close(); sqlConn.Close();[/CODE] … | |
I would like to know if is it possilbe to disable a menuStrip on windows forms? But not whole, I would like to disable only one specific menu. I know I can disable whole with: [CODE]this.menuStrip1.Enabled = false;[/CODE] Look at this [URL="http://www.file.si/files/i81oold7vofces8vea47.jpg"]image[/URL] - I would like to disable menus: - … | |
I am doing an app which inclueds richTextBox, for inserting text. I put some text into richTextBox and save it into my sql database (column is varbinary(MAX) data type, with this code: [CODE]byte[] myFile = Encoding.UTF8.GetBytes(richTextBox1.Text);[/CODE] Here the text is changed into binary data, and them I add parameters and … | |
I have a form1 as a parent form (and is a MDI container) which is a parent for a lot of the other child forms. Now I would like to create a Login. It should be another windows form - formLogin called. And it has to start the 1st when … |
The End.