|
Thank you Dave.
I greatly appreciate you help.
WHEELS
|
|
|
|
|
No problem, that's what's these forums and all the users are here for
Any more problems, just post back.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Did you get it working OK?
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hi Dave.
I am on a differwnt project, but we experiment with the code using the dataset from the DAL layer next Wednesday.
Have a great weekend,
DAVE
|
|
|
|
|
Hi Dave.
Finding it challenging to get it working.
I have a form with a comboBox and the following code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace WindowsFormsApplication3
{
public partial class Form1 : Form
{
const string constrLetterColumn = "Letter";
const string constrDeptID = "DeptID";
const string constrDeptColumn = "Department";
const string constrExpandColumn = "Expansion";
DAL d = new DAL();
DataSet ds;
DataTable dt;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
void InitializeCombo()
{
// Constructing data set in code, obviously this would come from your DAL
DataSet ds = new DataSet();
ds.Tables.Add();
ds.Tables[0].Columns.Add("ID");
ds.Tables[0].Columns.Add("Display");
ds.Tables[0].Rows.Add(new object[] { 1, "One" });
ds.Tables[0].Rows.Add(new object[] { 2, "Two" });
ds.Tables[0].Rows.Add(new object[] { 3, "Three" });
ds.Tables[0].Rows.Add(new object[] { 4, "Four" });
ds.Tables[0].Rows.Add(new object[] { 5, "Five" });
// the next three lines fill your combo and set the members
comboBox1.DataSource = ds.Tables[0];
comboBox1.DisplayMember = "Display";
comboBox1.ValueMember = "ID";
// subscribe to SelectedIndexChanged event
comboBox1.SelectedIndexChanged += new EventHandler(comboBox1_SelectedIndexChanged);
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
MessageBox.Show(comboBox1.SelectedValue.ToString());
}
}
}
Where am I going wrong?
WHEELS
|
|
|
|
|
HI Dave.
I had a coworker work with me on the code.
It works well.
When I cut and pasted some code from another project, it didn't work because I was missing an event handler.
Thank you,
DAVE
|
|
|
|
|
Cool - glad to help
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hello all, sometimes the easiest things are the things you oversee the most.
I have an application, it's generally finished so-to speak. Now all that's left is just general cosmetics. My question lies herein; I have a splash screen. I want to put a progress bar on it to keep the user occupied while initialization and connections are established. My question is, how would I upgrade the progress bar so it actually reflects true progress of loading? This includes downloading tables from MySQL DB (and establishing a connection), loading RSS feeds etc.
How would you go about it, AFAIK there isn't a callback to determine how much data from a table has been loaded or how many feeds out of x have been downloaded.
Direction?
|
|
|
|
|
I think that's why progress bars never seem to progress evenly but jump around.
Easy solution is to set the style to Marquee then you're just indicating that it's doing something... but not how much.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Additionally to what Dave said, you might split up the loading process into steps like:
- 10% Initializing GUI
- 40% Loading DB
- 30% Downloading feeds
- 20% Calculating some stuff
Of course this will not be accurate, but there's not much you can do against it, it too much depends on the internet/DB connection and lots of other stuff.
If your DB driver supports it, then you can at least find out how many rows have already been fetched.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
This is my 1st time doing a C# assignment for my sch, and i need some string matching function...
Why am I getting this error and how do I solve it?
re.cs(2,19): error CS0234: The type or namespace name 'RegularExpressions' does
not exist in the namespace 'System.Text' (are you missing an assembly
reference?)
Thanks...
[Updated: I actually alr added "using System.Text.RegularExpressions; using System;", tt's why I am puzzled y cannot]
modified on Friday, January 23, 2009 2:44 PM
|
|
|
|
|
Add this to the usings at the top of your .cs file
using System.Text.RegularExpressions;
or use that followed by . to access the classes in that namespace.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Actually I got these alr:
using System.Text.RegularExpressions;
using System;
but cannot...
|
|
|
|
|
Check your project references and make sure you have System there (System.dll), if not, add it.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Where to check? I am editing using Notepad++ and running using cmd.
If cannot find how to add?
|
|
|
|
|
Sorry - out of my realm there, I use Visual Studio to handle all this stuff for me!
There's some 'hardcore' people around on these forums that like to do stuff without an IDE, wait for one of them to help you - or download Visual C# Express[^] for free and get a shiny IDE.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
DaveyM69 wrote: wait for one of them
You rang?
|
|
|
|
|
<DingDong />
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I actually had Visual Studio installed alr, but cos current one is a small assignment, so I thought no need to use.
The System.dll is automatically added to my project references. Will come in handy for future big assignments.
|
|
|
|
|
using System.Text.RegularExpressions;
using System;
namespace Test
{
public class Test
{
public static void Main(string[] args)
{
Console.WriteLine("Hello");
Console.ReadKey();
}
}
}
This compiles prefectly for me just using this without any parameters:
csc test.cs
/edit: And yes, it tested it using pure 'hardcore' notepad++ (well, at least it has syntax highlighting!) and cmd
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
I can't. It doesn't recognise the namespace "RegularExpressions". As mentioned by PIEBALDconsult, "/r:System.dll" is needed.
|
|
|
|
|
I'd need to see how you're building the exe.
With CSC, references are done like /r:System.dll .
You can also use a response file like @"C:\build.rsp"
The .net directory that contains csc.exe should already have a csc.rsp file that it uses by default and it should contain system.dll so I don't see how you could be having trouble.
And please don't use text speak. Ever.
|
|
|
|
|
ok, "/r:System.dll" works
How do u include a response file @"C:\build.rsp"? type in cmd?
What does this mean: "And please don't use text speak. Ever."?
What is "text speak"?
modified on Friday, January 23, 2009 10:46 PM
|
|
|
|
|
Hi all , I'm a new member and this is my first participation .
I want to send sms message in my website , and I want to ask you
1- is sms free or I have to pay for each sms message
2- if it is free can I write sms send code in for loop , in other words can I send free smss to 100,000 cell phone or more .
thank you
|
|
|
|