1,469 Posted Topics

Member Avatar for chandnigandhi

[QUOTE=chandnigandhi;1638344]... with the help of mouse by clicking on button line should be displayed on panel and if first rectangle should not b disappeared...[/QUOTE] Hi, I don`t understand these words. Can you please elablrate it better? Thx in advance.

Member Avatar for chandnigandhi
0
155
Member Avatar for mangal123

So you wanna have n numbers of listboxes - depending how many subfolder you go into. Isnt this a bit strange? It would make sence to show on 1st listbox folders and in 2nd listBox files in this folder (if you are on root - C:, D: then show files …

Member Avatar for yash_shukla
0
87
Member Avatar for pxndx

The best way would be to use a dictionary collection. Key will be an actual number, and Value it`s repetition.

Member Avatar for thines01
0
2K
Member Avatar for DriveU

Create a new UserControl, and "put" ListView inside of it. Position the userControl to the position you want (based on the cell (right) mouse click I think).

Member Avatar for nick.crane
0
184
Member Avatar for Ehtesham Siddiq

You can set tje order of the columns like: [CODE] dataGridView1.Columns["Name"].DisplayIndex = 0; dataGridView1.Columns["RegNo"].DisplayIndex = 1; dataGridView1.Columns["Adress"].DisplayIndex = 2; [/CODE]

Member Avatar for Ehtesham Siddiq
0
294
Member Avatar for vinu4u4ever

What do you mean by refresh? Is you mean that the controls are automatially filled up with the appropriate data (based on some selection), then you need to bind each control. You can use DataSource property (for ie. dgv, comboBox, listBox, and set DisplayMember (and ValueMember if needed)) and DataBinding …

Member Avatar for Mitja Bonca
0
130
Member Avatar for abiwax
Member Avatar for ddanbe
0
77
Member Avatar for kapojian

To get a week number of the month you can do: [CODE] //in your method: DateTime time = DateTime.Now; int weekNumber = GetWeekOfMonth(time); //calling a method public static int GetWeekOfMonth(DateTime date) { DateTime beginningOfMonth = new DateTime(date.Year, date.Month, 1); while (date.Date.AddDays(1).DayOfWeek != CultureInfo.CurrentCulture.DateTimeFormat.FirstDayOfWeek) date = date.AddDays(1); return (int)Math.Truncate((double)date.Subtract(beginningOfMonth).TotalDays / 7f) …

Member Avatar for lolafuertes
0
174
Member Avatar for ktimov1

You said that dataset is a dataSource of dgv, right? Why dont you look in the dataSet? Check here for solution: - [url]http://msdn.microsoft.com/en-us/library/Aa325591[/url] - [url]http://msdn.microsoft.com/en-us/library/det4aw50.aspx[/url]

Member Avatar for rakesh_pooja
0
553
Member Avatar for adem87

Hi, you want to update what? Database or datagridview? This code looks like more to be use to update database, just that UPDATE statement isnt sufficient enough). Is has to be like: "UPDATE TableName SET Field1 = @field1, Field2 = @field2 WHERE ColditionColumn = @field3" Am I right?

Member Avatar for adem87
0
102
Member Avatar for C sharp

- Illustratec C# 2008 (for beginners) - C# in depth 2nd Edition - C# 2008 (or 2010) Step by Step) - C# 4.0 In a Nutshell but there is plenty of books, especially on amazon.com Depends what you would like to lean. Or OOP, or databases, of web prgramming, or..

Member Avatar for darkelflemurian
-1
138
Member Avatar for JudeV

They sure (those two variable members; row_count, columnCount) do not exist in the scope. How does the compiper go through? Where do you instanitate these two varibles? For sure not in the code you pasted up here. What they represent and which values they should have? Please double check where …

Member Avatar for Momerath
0
1K
Member Avatar for Singlem

I dount. I dont think so. But if this is only the look you want do have (so from 2 forms will be look like 1), you can do the following: - put all the controls on each form intoa userControl (together with the code of course) - create a …

Member Avatar for nick.crane
0
129
Member Avatar for bhagawatshinde

Here is what you can do: I would use a backgroundworker, and do the download work in it: [CODE] private delegate void DownloadDelegate(string msg); private BackgroundWorker bgv; public Form1() { InitializeComponent(); //create bgv: bgv = new BackgroundWorker(); bgv.ProgressChanged += new ProgressChangedEventHandler(bgv_ProgressChanged); bgv.DoWork += new DoWorkEventHandler(bgv_DoWork); bgv.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bgv_RunWorkerCompleted); //label …

Member Avatar for bhagawatshinde
0
546
Member Avatar for king03

do it: [CODE] using System; namespace hahahahahahahahaha { class Program { public static void Main(string[] args) { constructor1 obj = new constructor1(); Console.ReadLine(); //need to insert this line of code to show console! } } public class constructor1 { public constructor1(); { Console.WriteLine("hahahaha"); } } } [/CODE]

Member Avatar for Mitja Bonca
0
147
Member Avatar for bhagawatshinde

Why would you do an even for some button inside other button? This makes no sence. Events for all the button can be generated on the load time. Or when you create some button in the run time (afterwards). If you still inisit you can do it: [CODE] private void …

Member Avatar for bhagawatshinde
0
9K
Member Avatar for coroll

You have to add rows as well (every loop): [CODE] int clicks = 0; private void button4_Click(object sender, EventArgs e) { dataGridView1.Rows.Add(); dataGridView1.Rows[clicks].Cells["Author_Number"].Value = "Author " + (clicks + 1).ToString(); dataGridView1.Rows[clicks].Cells["First_name"].Value = "fname"; dataGridView1.Rows[clicks].Cells["Last_name"].Value = "lname"; clicks++; } [/CODE]

Member Avatar for Mitja Bonca
0
578
Member Avatar for junharefa
Member Avatar for destruct0
Member Avatar for sknake
0
162
Member Avatar for bettybarnes

Try to change it to: [CODE] con.ConnectionString = strconnection If con.State = ConnectionState.Closed Then con.Open() End If Dim str As String = "Select CUSTOMERID from tbl_Customer" cmd = New SqlCommand(str, objconnection) Dim dr As SqlDataReader = cmd.Executereader() While (dr.Read()) 'If the id column is not integer, chnage "int" with correct …

Member Avatar for MUDASSAR SIEMAB
0
1K
Member Avatar for junharefa

DateTime column is causing the problems I would say. YOu only do "DateTime.Now" - no parsing to string. btw, what error you get in catch Exception?

Member Avatar for Mitja Bonca
0
1K
Member Avatar for king03
Member Avatar for king03

There is no private class and any sign of any property in your example. Private class does not exist at all (it cannnot). Do you know what properties are? And what classes are for?

Member Avatar for Mitja Bonca
0
88
Member Avatar for king03

Try with this: [CODE] bool bMaleSelected; public Form1() { InitializeComponent(); textBox1.Text = "9164"; comboBox1.Items.AddRange(new string[] { "male", "female" }); comboBox1.SelectedIndexChanged += new EventHandler(comboBox1_SelectedIndexChanged); } private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { if (comboBox1.SelectedIndex > -1) { int intValue = 0; if (int.TryParse(textBox1.Text.Trim(), out intValue)) { if (comboBox1.SelectedItem.ToString() == "male") { …

Member Avatar for Mitja Bonca
0
138
Member Avatar for dotancohen

AS Momerath stated, its an awkward example. But you can use a base keyword to access members of the base class from within a derived class: [CODE] class Program { static void Main(string[] args) { Son p1 = new Son(); Father p2 = (Father)p1; Father p3 = new Father(); p1.print(); …

Member Avatar for dotancohen
0
151
Member Avatar for smartjugal

About which details are you talking about? There is nothing like it.

Member Avatar for Mitja Bonca
0
87
Member Avatar for kapojian

You can specify some date, like today (but you have to be aware that Today property does not set any day time, it is actually, but it sets to 00:00:00 "hh:mm:ss"), so then you can add 7 days to this date, and check if this date is a new date: …

Member Avatar for bhagawatshinde
0
783
Member Avatar for trungdang

Do you add object to array list like that: [CODE] ArrayList main = new ArrayList(); main.Add("1,A"); main.Add("2,A"); main.Add("3,B"); [/CODE]

Member Avatar for ddanbe
-1
804
Member Avatar for grvs

Placing the files in the solution folder won't do anything, you have to tell the solution to add new project/files. Chose File->Add Project-[color=blue] >Existing Project and then browse to your individual project files (.csproj[/color] files). You can also right click your solution name and Add->Existing Items to add individual files …

Member Avatar for prit005
0
152
Member Avatar for vishal1949

Why would you do a for loop? I dont see any reasonable reson why use it. Please explain why would you use a for loop?

Member Avatar for vishal1949
1
177
Member Avatar for cocoll

[URL="http://www.developerfusion.com/tools/convert/vb-to-csharp/"]Here[/URL] you have online converter.

Member Avatar for ddanbe
0
234
Member Avatar for Mits14

Instead of while loop, better use abn if block. Because you want to go through the code only ones. And there you can put an else block, which will be fired if no data will be found: [CODE] If dr.Read Then txtidno.Text = dr("ID_No") txtname.Text = dr("Borrower_Name") cbocourse.Text = dr("Course") …

Member Avatar for Mits14
0
248
Member Avatar for eoop.org

Maybe this way?: [CODE]System.Diagnostics.Process myprocess = System.Diagnostics.Process.Start("notepad.exe"); [/CODE]

Member Avatar for Ketsuekiame
0
172
Member Avatar for justforsaarah

You have to create columns of listView to dataTable (with a bit of a List<T> help), then loop through the listView to fill dataTable: [CODE] 'lets assume we have 3 column in listView!! 'get columns: Dim listOfColumns As New List(Of String)() For Each column As ColumnHeader In listView1.Columns listOfColumns.Add(column.ToString()) Next …

Member Avatar for Mitja Bonca
0
111
Member Avatar for lianpiau

Hi, sorry, but I dont really understand what you are saying. Would you please do a bit better explanation to the problem you are facing? thx in advance.

Member Avatar for lianpiau
0
199
Member Avatar for saqi1986

[QUOTE=saqi1986;1544804]Any IDea how to Parse a String without using Split method[/QUOTE] What do you means exactly? Because there is pleanty of ways of "modifing" a string - all he string methods.

Member Avatar for Ketsuekiame
0
738
Member Avatar for TheDocterd
Member Avatar for smartjugal

If I understood you, you want to load a picture into a pictureBox? And the right one? Does the image has a name?

Member Avatar for smartjugal
0
146
Member Avatar for uva1102

Can you describe the problem a bit better, and what is it that you want?! But as far as I understood, you get some data from DB: [I]ID=1 Reccurence = "Monthly" DuePatten = "26"[/I] Now based on this you want to create an array of dates, am I right? What …

Member Avatar for uva1102
0
132
Member Avatar for zoraster01

Dont complicate things. Do it like this: [CODE] Dim conn As New SqlConnection("connString") Dim da As New SqlDataAdapter() Dim table As New DataTable() da.SelectCommand.CommandText = "your select query" da.SelectCommand.Connection = conn da.Fill(table) [/CODE] And you dont have to use DataSet,if you only have one DataTable. Instead you use DataTable, as …

Member Avatar for Mitja Bonca
0
142
Member Avatar for mukadam.bilal

[QUOTE=mukadam.bilal;1619277] If a label enters another label.[/QUOTE] What do you mean exactly?

Member Avatar for Mitja Bonca
0
33
Member Avatar for dennysimon

Not true, it wont help. This is what you can try: [CODE] da.Fill(ds,"myTable"); dgv1.DataSource = new BindingSource(ds.Tables["myTable"], null); //but the same as using names is using table indexes, like you did! [/CODE]

Member Avatar for dennysimon
0
266
Member Avatar for dennysimon

[CODE]mysqlda.UpdateCommand.Parameters.Add("@Price", MySqlDbType.Decimal ,10,2, "Price");[/CODE] The 3rd parameter in the Add() method is the [I]Size[/I], and its must me an integer. So no commas in between. You dont specify and such thing as in the database, where you specify the number of decimals (like 10, 2 - 10 numbers lenght,and precision …

Member Avatar for dennysimon
0
2K
Member Avatar for dre-logics

Use this pattern to all: [CODE] Dim a As Decimal = 6.25D //pattern: Dim fraction As Decimal = a - CInt(Math.Truncate(a)) a = a - fraction + (0.95D) [/CODE]

Member Avatar for Mitja Bonca
0
122
Member Avatar for shivya jain
Member Avatar for adem87

Show us full code.. the connection instantiation, and its connection string.

Member Avatar for cudahead
0
136
Member Avatar for techlawsam
Member Avatar for alfredo11
Member Avatar for Munnazz

Hi, check for solution [URL="http://forums.asp.net/t/1441971.aspx/1?How+can+i+convert+my+datatable+into+XML+using+C+2+0+"]here[/URL].

Member Avatar for Mitja Bonca
0
186
Member Avatar for alfredo11

Do you have any custom class for all this object? If would be good to have it. At least you can show us the code you have, and what would you like to change (comment it).

Member Avatar for Reverend Jim
0
185

The End.