1,857 Posted Topics

Member Avatar for nickayin

First off you should use copy and paste to insert your code, instead of a picture. That way someone can copy your code and make adjustments, without having to type the whole thing. The line 2 should probably use the `EOF` constant, instead of `null` Your string variables should be …

Member Avatar for ddanbe
0
1K
Member Avatar for kshahnazari

As far as I know you can't have a negative index to an array. Also when an array is declared all elements exist. I think all you can do is check if an element equals zero or null.

Member Avatar for ravenous
0
117
Member Avatar for renzlo

It's probably doable but, I think, quite complicated. I would think that you'd need to monitor [logon/logoff](http://www.codeproject.com/Articles/133372/Monitoring-of-Logon-Logout-in-Terminal-and-Client), [keyboard/mouse activity](http://www.codeproject.com/Articles/7466/Writing-a-Macro-Recorder-Player-using-Win32-Journa), [running processes](http://www.codeproject.com/Articles/13289/Managing-Processes-and-Shell-API-Functionality-usi), [active processes](http://activitymonitor.codeplex.com/), and maybe more. Some if not all of these would require API functions to do, which is not for the faint of heart. Buying someone elses software …

Member Avatar for tinstaafl
0
287
Member Avatar for <M/>

Not sure if this is what you want but this will produce 50 random numbers, 1 < number < 10: List<double> NewArray = new List<double>(); Random NewRand = new Random(); for (int i = 0; i < 50; i++) { double NewNumber = (NewRand.Next(11,100) / 10f); NewArray.Add(NewNumber); } for (int …

Member Avatar for <M/>
0
338
Member Avatar for eclipsethemoon

I think your instructor is trying to pull a fast on you. A typical Binary Search has to have a sorted array to search.

Member Avatar for tinstaafl
0
142
Member Avatar for <M/>

try int o; for (o = 1; o <= 25; o++) { if (o % 3 != 0) Console.WriteLine(o); } Console.ReadLine();

Member Avatar for <M/>
0
127
Member Avatar for Programmer629

try Dim strText As String strText = Form1.RichTextBox1.Text If strText = "" Then MsgBox("You need to put text in the textbox before I speak it!", MsgBoxStyle.OkOnly, "Robot") Else Dim objVoice = CreateObject("SAPI.SpVoice") objVoice.Speak(strText) End If Change 'Form1' to the name of your form. By default controls are declared as Friend. …

Member Avatar for tinstaafl
0
217
Member Avatar for pjns19

If you don't absolutely have to use the mshtml interface you could try this: Imports System.IO Public Class Form1 Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'Set the webbrowser control visible property to false if you don't need it for anything else. WebBrowser1.Url = New …

Member Avatar for tinstaafl
0
2K
Member Avatar for Papa_Don

instead of declaring them at the sub level Dim lblPrtNo As Label = New Label Dim txbPartNo As TextBox = New TextBox I think you need to declare them at the class level like this: Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents Label1 As System.Windows.Forms.Label One of the best ways …

Member Avatar for Papa_Don
0
3K
Member Avatar for McGreedy

There is more than one way. Here's [one way](http://social.msdn.microsoft.com/forums/en-us/Vsexpressvb/thread/2A8A2441-3926-4B0D-9D9A-4F66D7FD771E)

Member Avatar for tinstaafl
0
3K
Member Avatar for sunil2
Member Avatar for Divinedar

> So in a way it's searching the folder Y:\0000_CCB_MINUTS\ and it's subfolders, find the file name then hyperlink to that file within the subfolder. Here's a little function that will take the filename and the root folder and find the file and return the full path of the file …

Member Avatar for tinstaafl
0
318
Member Avatar for silvercats

Perhaps try: if(!int.TryParse("0"+dataGridView2.CurrentRow.Cells["invoice_ID"].Value.ToString(),out int sel)) MessageBox("0"+dataGridView2.CurrentRow.Cells["invoice_ID"].Value.ToString()); This way you can see exactly why the string is not parsing right. If there is anything in the string that isn't a digit, a comma, or a period then it will fail.

Member Avatar for JOSheaIV
0
426
Member Avatar for csss

There is code for a biginteger class, if you need it, search the posts here for biginteger.

Member Avatar for tinstaafl
0
170
Member Avatar for ImZick
Member Avatar for khair.ullah

Try this: Add to form load event 'tell each checkbox to use the same handler for the CheckedChange event For Each cb As CheckBox In Me.Controls.OfType(Of CheckBox)() AddHandler cb.CheckedChanged, AddressOf CheckBox_CheckedChanged Next Add this sub to the form class: Private Sub CheckBox_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) 'create …

Member Avatar for khair.ullah
0
950
Member Avatar for PBubble

> What I want to achieve is to have the user check from the options (e.g Demo + Uru +Akai, etc..) from each categories (e.g Client, Status, Brand, etc..) and have it display on a DataGridView once the Filter button is clicked. build your query using one of the `Selected` …

Member Avatar for tinstaafl
0
954
Member Avatar for Counterpartz

I would suggest: Use an array to accept your inputs(`int[] inputs = new int[5];`). A `for` loop with intValue accepting the `Console.ReadLine()`. Use a `while` loop inside the `for` loop to validate the input(`while (intValue < 10 || intValue > 50)`). Don't forget to re-initialize intValue after each successful input. …

Member Avatar for tinstaafl
0
320
Member Avatar for timon.bijl

If your array is an array of strings you've already got it. Just change the '0' to the specific number of the one you want to change. We'll be more than happy to help with your tablelayoutpanel, but we need to see what you've attempted so far, to have a …

Member Avatar for tinstaafl
0
183
Member Avatar for killer88

Or if you want to make your own server, http://www.codeproject.com/Articles/3991/SMTP-and-POP3-Mail-Server

Member Avatar for tinstaafl
0
116
Member Avatar for killer88

Becuase they are both part of the .net family, pretty much anything you can do in one you can do in the other, albeit somethings will be easier and/or more intuitive in one than the other. The main differences come down to syntax. C# is more related to c/c++ and …

Member Avatar for tinstaafl
0
187
Member Avatar for Ketsuekiame

When I use this, testStopwatch.Start(); myString = Convert.ToString(listCharString); testStopwatch.Stop(); I get a time about one tenth of the stringbuilder's time.

Member Avatar for TnTinMN
0
252
Member Avatar for kiran2012

How are you adding the reference? If you use the choose item dialog directly from the toolbox and choose Windows Common Controls 6.0(SP6) I think that should work.

Member Avatar for AndreRet
0
2K
Member Avatar for xixi.li.7

It looks to me that without an upper limit to i in line 28 you have the potential for an infinite loop

Member Avatar for tinstaafl
0
154
Member Avatar for csss
Member Avatar for mgunia

Try this Sub GOOD_WORKS_Find_Replace_Commas_in_Emails(ColId As Variant) Sheets("Data").Activate Dim i As String Dim k As String i = "," k = "." Columns(ColId).Replace What:=i, Replacement:=k, LookAt:=xlPart, MatchCase:=False Sheets("Automation").Activate MsgBox "Removing commas in emails - Done!" End Sub I haven't been able to test this. But I think it will give you …

Member Avatar for mgunia
0
338
Member Avatar for chrisaddicted
Member Avatar for Aarowaim

> One, I need a simple way of rendering a GUI with minimal headache. If portability isn't an issue, the .net Visual Studio family is very good at quick GUI programming without having to see all the GUI creation code, basically it's drag, drop, resize. It includes the tools necessary …

Member Avatar for mike_2000_17
1
213
Member Avatar for buckeyemike
Member Avatar for TheTimeCat

I think you've come to the wrong place. This is a place to help people with specific problems, mostly in code that they've already written. You need a site where you can hire a professional to do this. This is one such [site](http://www.codehire.com/). Unless of course you do have some …

Member Avatar for ravenous
0
279
Member Avatar for TheTimeCat

When I run your code in Code::Blocks 12.11, it seems run fine I get this output: 1 1 3 1 3 5 1 5 2 2 5 3 3 5 5 I get the same error though, when I run the code in VS2010. I think it might have something …

Member Avatar for ravenous
0
950
Member Avatar for triumphost

I think it might depend on your OS. Here's a [post](http://www.daniweb.com/software-development/cpp/threads/22498/setting-up-the-cursor-position) that might help. And [another](http://www.daniweb.com/software-development/cpp/threads/120776/help)

Member Avatar for tinstaafl
0
173
Member Avatar for toth.attila.7921

You appear to have a problem with your braces. It looks to me like you're missing a closing brace at the end. Also I'm not sure if the one at line 192 needs a semi-colon.

Member Avatar for tinstaafl
0
849
Member Avatar for dhayalanbalakrishnan
Re: help

All your errors seem to be because the headers aren't recognized. It can't find any of the references in the headers. This problem might be better asked at the source. On a side not here is a [free imnplementation of sending email](http://curl.haxx.se/libcurl/)

Member Avatar for Moschops
0
337
Member Avatar for Jake.20

Looks like you're missing a ")", try this, sqlCmd = New SqlCommand("INSERT INTO registered_cust_tbl([customer_Id],[customer_fname], [customer_lname], [customer_DoB], [customer_Contact], [customer_Email], " & " [customer_Address], [customer_Gender], [customer_Ailments], [customer_Username], [customer_Password], " & " [customer_Secret_Question] ,[customer_Secret_Answer],[customer_Purpose]) " & " VALUES ('" & firstNameTb.Text.Trim & "', '" & lastNameTb.Text.Trim & "' , '" & DoBdtp.Text & …

Member Avatar for Reverend Jim
0
322
Member Avatar for Dili1234

Just on the surface, it looks like you're missing a ")", this might work, ` Dim insert1 As SqlCommand = New SqlCommand("INSERT INTO [VBP].[dbo].[Return_Total] ([RGN0],[Date] ,[Totalamount],[User_Id],[C_NIC],[Comments],[Bill_No]) values ('" & Val(TextBox2.Text) & "','" & DateTimePicker1.Value.Date & "','" & TextBox4.Text & "','" & TextBox6.Text & "','" & TextBox3.Text & "','" & TextBox5.Text …

Member Avatar for tinstaafl
0
126
Member Avatar for castajiz_2

Try private void button1_Click(object sender, EventArgs e) { Method(textBox1); } public void Method(TextBox t) { string a = "4"; string b = "3"; t.Text = a + b; } or private void button1_Click(object sender, EventArgs e) { Method(); } public void Method() { string a = "4"; string b = …

Member Avatar for tinstaafl
0
310
Member Avatar for sk8ergirl
Member Avatar for silvercats

I would suggest, instead of 3 listboxes, use 1 listview. That way all your data is in one place and very easy to correlate. You can even use it to get the info directly from your database.

Member Avatar for silvercats
0
282
Member Avatar for vvk44

Off the top of my head it looks like you should be using `tb.CanRedo` instead of `TextBox.CanRedo`, etc. If that doesn't fix it you'll probably have to show your code for the custom properties and methods you're using.

Member Avatar for TnTinMN
0
297
Member Avatar for poojavb

If you keeps the ID's in a list and set the list as a datasource for ListBox1, any changes made to the list are echoed in the listbox. This allows you to leverage the `Find` method of the list to see if an ID exists. I've modified your code to …

Member Avatar for tinstaafl
0
381
Member Avatar for kimangel

With the kind of errors you're showing, you'd be much better off with a masked edit control. That sort of thing is handled automatically. If you insist on using a textbox, try putting `txtContact_No1.SetFocus` just before each `Exit Sub`.

Member Avatar for AndreRet
0
201
Member Avatar for russc155

Load the video in the second form through the [MediaChange Event of the AxWindowsMediaPlayer Object (Windows)](http://msdn.microsoft.com/en-us/library/windows/desktop/dd562428(v=vs.85).aspx)

Member Avatar for tinstaafl
0
267
Member Avatar for krul.ezanie
Member Avatar for amit.jirange

I would suggest using an exception handler([Try-Catch](http://msdn.microsoft.com/en-us/library/0yd65esw%28v=VS.100%29.aspx))

Member Avatar for tinstaafl
0
342
Member Avatar for wizzy-cool

Here's an article on [Printing Reports in Windows Forms](http://msdn.microsoft.com/en-us/library/ms996472.aspx)

Member Avatar for tinstaafl
0
240
Member Avatar for divya.dupati
Member Avatar for nash.tc.5

Here's one [place to start](http://en.wikipedia.org/wiki/List_of_unsolved_problems_in_physics). [and another](http://en.wikipedia.org/wiki/List_of_unsolved_problems_in_mathematics)

Member Avatar for tinstaafl
0
71
Member Avatar for Unused Mass

Basically your code will go into the click handler of the menu item or the indexchanged handler of the combobox. One option to consider is using resx files. With these you can save whole objects with ease and load them again after. Also since you give each one a unique …

Member Avatar for tinstaafl
0
268
Member Avatar for kimangel

The End.