1,469 Posted Topics

Member Avatar for carsein

1st of all, if you use radionButton, there is always one selected (its not the same as checkBoxes, where you can deselect all). Ok, its possible to deselect all radionButtons in a group as well, but this is not the purpose then in using radionButtons. About showing the button control, …

Member Avatar for carsein
0
252
Member Avatar for Farhad.idrees

Just to add: ... be careful here. adatapost is correct, but be careful in two things - row index - column index You have to state the correct indexes, and for the column you can even state the column name!

Member Avatar for vpsingh136
0
172
Member Avatar for bigzos

No, Icannot be, or you did it wrong. Check this example: Dim d1 As New DateTime(2011, 12, 31) Dim d2 As New DateTime(2012, 1, 1) Dim ts As TimeSpan = d2.Subtract(d1) Console.WriteLine("Difference between these two times is:" & vbCr & vbLf & "years: {0}" & vbCr & vbLf & "months: …

Member Avatar for poojavb
0
135
Member Avatar for poojavb

I assume you are trying to create a code for checking the password strenght. Here is some of my code I used to have for it: Private Enum PasswordScore Blank = 0 VeryWeak = 1 Weak = 2 Medium = 3 Strong = 4 VeryStrong = 5 End Enum Private …

Member Avatar for poojavb
0
249
Member Avatar for faizzul_77

Please provide us some deicent explanation if you want any help from us. These 2 images do nothing.

Member Avatar for francis994
0
195
Member Avatar for cyberdaemon

loop through rows of gridview and check the column of checkbox (if checked (true) add to database, if not do nothing. foreach(DataGridViewRow row in dgv.Rows) { DataGridViewCheckBoxCell check = row.Cells[0] as DataGridViewCheckBoxCell; //0 represents 1st column; change the index to your column if ((bool)check.Value) { //insert this row (checkBox is …

Member Avatar for Mitja Bonca
0
98
Member Avatar for sidyusuf
Member Avatar for Iamateur

And you will populate (show) all bnames into textbox1, and all anames into textbox2? How they will be seperated? This is not a good idea, better use a listBox, so items will be in a seperated rows.

Member Avatar for adam_k
0
103
Member Avatar for murnesty

Are these textBoxes on same form? I would suggest you to create an array of textBoxes (in order, like you will populate them), and then just loop through them and fill text into each of them. Example: TextBox[] tbs; public Form1() { tbs = new TextBox[]{textBox1, textBox2, textBox3 }; //put …

Member Avatar for Momerath
0
149
Member Avatar for Iamateur

This question has been asked a couple of times. Please do NOT duplicte threads. One will be just fine. Close this one.

Member Avatar for Begginnerdev
0
131
Member Avatar for Gus_19

Show us your Designer code of the form (whole code). Its hard to tell what can be wrong, but for sure there is some "additional" code that changes position of controls.

Member Avatar for Mitja Bonca
0
232
Member Avatar for Iamateur

Like: Using conn As New SqlConnection("connString") Using cmd As SqlCommand = New SqlComand("SELECT ColumnName FROM TableName", conn) Using reader As SqlDataReader = cmd.ExecuteReader() While reader.Read() comboBox1.Items.Add(reader(0).ToString()) End While End Using End Using End Using

Member Avatar for Mitja Bonca
0
136
Member Avatar for notconfirmed

But I guess you would like to get all whats inside li tags, so all within <li>...</li>? Am I correct? If so, this is the pattern and the code you can use: string pattern = @"<li>(.*?)</li>"; Regex regex = new Regex(pattern); //1. if one occurence in a string: Match match …

Member Avatar for Mitja Bonca
0
3K
Member Avatar for mikeybware

or; '1 Dim controls As TextBox() = Me.Controls.OfType(Of TextBox)().OrderBy(Function(o) o.Name).ToArray() 'then you can loop in foreach (like bellow) '2. For Each control As var In Me.Controls.OfType(Of TextBox)() Dim name As String = control.Name Next

Member Avatar for Unhnd_Exception
-1
1K
Member Avatar for JDSkywalker

When do you add them exactly? I hope AFTER binding it. And I would use Insert method, not Add. Where you have to specify 2 arguments: - DGV column reference - index of column to insert (starting from 0 up (0 is 1st column, 1 is 2nd column,...) But I …

Member Avatar for Mitja Bonca
0
446
Member Avatar for riahc3

Try using Linq to xml, and check here: http://msdn.microsoft.com/en-us/library/bb308960.aspx#xlinqoverview_topic1a

Member Avatar for skatamatic
0
744
Member Avatar for codechrysalis

Why so much code needed to paste it here? Next time paste only the code needed. Ok? Ok, to thread`s topic: Create an array of images (Bitmap or Image classs). Put a timer (System.Windows.Timer for instance) and initialize it. Set some properties, like the Interval (on how many time the …

Member Avatar for CeilingSpy
0
1K
Member Avatar for prerit
Member Avatar for prerit
0
8K
Member Avatar for jbennet

Damn, how to add code snipet? I got it, even if its a bit lame.

Member Avatar for Airshow
0
2K
Member Avatar for Andy90

Create it as a login form (in same way): static class Program { [STAThread] static void Main() { using (Splash splash = new Splash()) { splash.StartPosition = FormStartPosition.CenterScreen; if (splash.ShowDialog() == DialogResult.OK) { Application.Run(new Form1()); } } } } //inside Splash form do: //use some Timer or something, and after …

Member Avatar for Mitja Bonca
0
160
Member Avatar for VasquezPL
Member Avatar for VasquezPL
0
914
Member Avatar for Andy90

> I want message to be displayed when user moves the mouse through hardware only (i.e moving mouse with hand) What would that suppose to mean? You mean moving cursor with keyboard (directional keys)?

Member Avatar for skatamatic
0
214
Member Avatar for Tobiczyk

You dont need to convert it, but you simply bind it to dgv. Using dataSource property of dgv, assgin dataTable to it: dgv.DataSource = dataTable.DefaultView;

Member Avatar for Mitja Bonca
0
244
Member Avatar for prajot_03

create new select query and use a WHERE clasue as an item from 1st drop down list (catgory). Then fill datatable, and bind it to 2nd drop down list.

Member Avatar for artemix22
0
191
Member Avatar for Suffii

Loop through the rows of particular column: 1. List<string> usersOver30 = new List<string>(); foreach(DataGridViewRow row in dataGridView1.Rows) { int age = 0; if(int.TryParse(row["Age"].Value.ToString(), out age)) if(age >= 30) usersOver30.Add(row["Name"].Value.ToString(); } //list contains all names of users that are over 30 years old 2. foreach(DataGridViewRow row in dataGridView1.Rows) { DataGridViewCell cell …

Member Avatar for Mitja Bonca
0
193
Member Avatar for AnilKumar_19

hi, read here: [http://stackoverflow.com/questions/191153/when-would-you-use-delegates-in-c](http://stackoverflow.com/questions/191153/when-would-you-use-delegates-in-c)

Member Avatar for Mitja Bonca
0
75
Member Avatar for Gus_19

I completely agree with Unhnd. This is a waste of time. What if user inserts some other numbers, like 123456? This will never work well. You have to force user to SELECT a date, so choose between datetimepicker, or monthcalendar. I know I would defenatelly - bad experiances from before …

Member Avatar for bhagawatshinde
0
3K
Member Avatar for mobeen89

> Specifically, they would notice that for e.g the communications timers wont work if the code for the acquisition took more time than the min. timer interrupt for the communication code. They suggest using threads. Can you please provide more detailed issue description? Its hard to tell you a solition …

Member Avatar for mobeen89
0
178
Member Avatar for kiail

Yes and your exact question would be? Show us some example code, with the calculations, I mean.

Member Avatar for kiail
0
305
Member Avatar for ThatsSoShaneka

If there is any field in your database (all others then varchar - string actually) you must provide this type. I see you provide for example "xyz" parameter, which is (surely) an integer, you have to convert string to integer (thats why you got this kind of exception). so like …

Member Avatar for poojavb
0
525
Member Avatar for rugged1529

If you use logical and "&&" this means if you want to go into while loop all of three threads muste be alive. And this something you dont want, right? Maybe is that "itc" variable true? Is it possible?

Member Avatar for skatamatic
0
3K
Member Avatar for venkateshyeluri

try using this select query statement: "select table_name as Name from INFORMATION_SCHEMA.Tables where TABLE_TYPE = 'BASE TABLE'";

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

use for loop, but instead of incrementing +1, do the reverse operation, so each step -1: for (int i = dgv.Rows.Count; i > 0; i--) { DataGridViewRow row = dgv.Rows[i] as DataGridViewRow; //use row for your insertion }

Member Avatar for Mitja Bonca
0
153
Member Avatar for Falcon25

Variable (in your case a generic list) declared as public static is one solution to use it all over the project. But if has its own weaknesses, like that it stays in memory for as long as your project is alive. And if the variable becomes huge, it can eat …

Member Avatar for Falcon25
0
123
Member Avatar for ponkan20

You can do it like: Const PenaltyPerDey As Decimal = 10D Private Sub MyMethod() Dim exired As New DateTime(2012, 4, 9) Dim penalty As Decimal = CalculatePenalty(exired) End Sub Private Function CalculatePenalty(expired As DateTime) As Decimal Dim ts As TimeSpan = DateTime.Now.Subtract(expired) Dim totalDays As Integer = ts.Days Return CDec(totalDays) …

Member Avatar for poojavb
0
1K
Member Avatar for longsaver

And your question is? You know, we wont do the code instead of you - be sure about that. So if you need any help, ask us, and would be more the glad to help.

Member Avatar for Mitja Bonca
0
155
Member Avatar for dwarvenassassin

RichBoxControl defenatelly. It can take text (every type of it - riched too, thats why the name of the control) and even images.

Member Avatar for mariasemuel
0
112
Member Avatar for paoi00

Are you sure you have the connect connection string? Is this access database? Please double check the correctness of connection string. Else I cannot suggest you now.

Member Avatar for poojavb
0
246
Member Avatar for VRamone

Which part would you like to make chages (bold text)? Text like it self (string value) cannot be bold or anything. But you can change its visibility when passign it to some control, like textbox: textBox1.Font = new Font(textBox1.Font, textBox1.Font.Style | FontStyle.Bold | FontStyle.Underline);

Member Avatar for skatamatic
0
909
Member Avatar for bettybarnes

Try using TryParse method: invalue = textBox1.Text; if(int.TryParse(invalue, out guessedNumber)) { //contine here } else MessageBox("Input value is not a number.");

Member Avatar for Mitja Bonca
0
214
Member Avatar for alanbrazil

Depends what you would like to do. Maybe there is nothing yet to change, maybe its a lot. Show us your code, and tell us what you would like to be different in win app.

Member Avatar for Mitja Bonca
0
131
Member Avatar for venkateshyeluri

Check links: http://converter.telerik.com/ http://www.developerfusion.com/tools/convert/vb-to-csharp/

Member Avatar for Mitja Bonca
0
94
Member Avatar for ponkan20

Try it this way: ' 1. create columns ot listView!! ' 2. then loop through the row and columns to datatable: ' NOTE: make sure that the number of columns in listView IS equal to columns to datatable!! For i As Integer = 0 To ds.Tables(0).Rows.Count - 1 Dim lvi …

Member Avatar for Mitja Bonca
0
2K
Member Avatar for nicewave

why did you name your string varaible as "Regex"? You cannot do that, sice Regex is a reserved word of C#.

Member Avatar for Mitja Bonca
0
193
Member Avatar for alanbrazil

Where exactly do you wanna show the data? In textBoxes or in some data collection control (like datagridview)? Depends on data binding.

Member Avatar for thines01
0
230
Member Avatar for IKhan123

Can you write is down the tables structure (table names)? So we can see what is the connection between those 2 tables.

Member Avatar for IKhan123
0
114
Member Avatar for eltonpiko

If you create a file you have to close or better dispose Create() method: File.Create("filePath_and_fileName").Dispose() 'now you can use StreamWriter class...

Member Avatar for Mitja Bonca
0
278
Member Avatar for Andy90

Try: this.WindowState = FormWindowState.Maximized; this.FormBorderStyle = FormBorderStyle.None;

Member Avatar for Sahil89
0
122
Member Avatar for Andy90

Lets go through your needes: You have a form1. From it you open form2. On form2 you have a checkBox, and when you check it, you want the form1 to show on top of the form2. Is that correct?

Member Avatar for Mitja Bonca
0
158
Member Avatar for Andy90

When you open it, call it with ShowDialog() method, like: Form2 f2 = new Form2(); f2.ShowDialog();

Member Avatar for Mitja Bonca
0
64

The End.