|
the Size property is a struct, i.e. a composite type. That's what causes its members to be grouped.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
This[^] isn't the best article I've ever done (I should really revisit it and improve it!) but it will show you how it's done.
|
|
|
|
|
How can I get HTMLDocument of an URL? I need to get HTMLDocument from a bulk url. I think I can't use WebBrowser because it needs to wait until the document is competed.
|
|
|
|
|
you can use WebBrowser.Document, which is available when the document is complete, hence look for the WebBrowser.DocumentCompleted event.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
I know the webbrowser. I'm looking for another way, maybe download it as a string and convert it into HTML document?
|
|
|
|
|
I want to build something like this
http://www.codeproject.com/KB/aspnet/ChatApplication.aspx
However when using the example I try to build the chat app and get the error
Error 1 Inconsistent accessibility: parameter type 'ChatClient.IPAddressInfoEventArgs' is less accessible than delegate 'ChatClient.Configurator.IPChangeHandler' \EasyTalk\ChatClient\ChatClient\Configurator.cs 15 30 ChatClient
Any advice or examples of how to build a simple chat application using a web service.
Every google search presents many examples with very little explanation.
thanks for any advice
|
|
|
|
|
The compiler error means a parameter has a type that is less public than the method/delegate referring to it. Making the type (IPAddressInfoEventArgs) public (or the method/delegate not public) should solve that.
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that. [The QA section does it automatically now, I hope we soon get it on regular forums as well]
|
|
|
|
|
Hi,
Maybe it's an unusual request, but I need a practise (just defining a practise not any source code) that I use silverlight with WCF and WWF, for learning them better.
Best wishes
|
|
|
|
|
Do you mean that you want an idea for a sample application that you could use with WCF, Silverlight and WWF? If so, how about a simple stock ordering process?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
That's exactly my mean!
Sorry,I was wondering if you give me or refer me more details
Best wishes
|
|
|
|
|
Oh, so not only do you want us to give you an idea for an app you can write in order to learn silverlight, you want us to write the code, too?
C'mon, be a programmer and just do it.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Oh, sorry
I just meant more details about the 'Stock Order Process' , not technical ideas about WCF,WWF , ....
anyway thanks for your time
Best wishes
|
|
|
|
|
Well, you could use WCF to simulate the ordering of items from a supplier. Use WF to control the process of orders when they come in, and the rules surrounding when orders should be placed, e.g. order this when an item goes below x. Finally, use Silverlight to maintain the details of items, and buy things so that your ordering process actually gets triggered.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
It is best to use a sample that you understand, try a bug tracking workflow, something with escalations, email alerts and feedback to the initiator.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hi guys...i have a combobox on my form which is named as cmbfirma...and i fill it with a column of database..and i want user to add new firm if it doesnt exist in my database that is why i open new form and user writes new firm name to textbox and program writes new firm name to a txt file and i read it from there...and try to write that new form to my database..to do that i use code below
cmd.Parameters.AddWithValue("@firma",cmbFirma.SelectedItem.ToString());
but when i use it and check my database it writes there System.Data.DataRowView
and i tried another code below
cmd.Parameters.AddWithValue("@firma",cmbFirma.SelectedValue.ToString());
in that time it writes database normally only for the items which is listed in combobox and it gives error if i want to add the new firm name that i read from txt file...in error it says "Unable to set an object reference to an instance object"
what should i do to get rid off that errors ??
or should i use another database for my combobox ??
i use SqlExpress 2005 to create my database
thanks for your help
|
|
|
|
|
hi,
in order to help you answer this questions:
1. did you correctly create the cmd object ? show us
2. what SQL sentance did you use ? show us
Cheer's,
Alex Manolescu
|
|
|
|
|
hey man thanks for reply ...i created the cmd object like below
SqlCommand cmd; (i declared it global)
cmd= new SqlCommand("select distinct firma from Rehber", con);
and my SQL sentence is like that and i insert like below
cmd = new SqlCommand("insert into Rehber (ad_syd,firma,sektor,grup,cep_no,is_no,ev_no,fax,mail,web,msn,skype,adres,ilce,sehir,vergi_no,vrgi_daire,dgm_tarih) values (@ad_syd,@firma,@sektor,@grup,@cep_no,@is_no,@ev_no,@fax,@mail,@web,@msn,@skype,@adres,@ilce,@sehir,@vergi_no,@vrgi_daire,@dgm_tarih)", con);
cmd.Parameters.AddWithValue("@ad_syd",txtAdSyd.Text);
cmd.Parameters.AddWithValue("@firma",cmbFirma.SelectedValue.ToString());
cmd.Parameters.AddWithValue("@dgm_tarih", dateTimePicker1.Value);
cmd.Parameters.AddWithValue("@sektor",txtsektor.Text);
cmd.Parameters.AddWithValue("@grup", txtGrup.Text);
cmd.Parameters.AddWithValue("@cep_no", txtCep.Text);
cmd.Parameters.AddWithValue("@is_no",txtisTlf.Text);
cmd.Parameters.AddWithValue("@ev_no",txtEvTlf.Text);
cmd.Parameters.AddWithValue("@fax",txtFax.Text);
cmd.Parameters.AddWithValue("@mail", txtMail.Text);
cmd.Parameters.AddWithValue("@web", txtURL.Text);
cmd.Parameters.AddWithValue("@msn", txtMSn.Text);
cmd.Parameters.AddWithValue("@skype", txtSkype.Text);
cmd.Parameters.AddWithValue("@adres",txtAdres.Text);
cmd.Parameters.AddWithValue("@ilce", txtIlce.Text);
cmd.Parameters.AddWithValue("@sehir",txtSehir.Text);
cmd.Parameters.AddWithValue("@vergi_no", txtVergiNo.Text);
cmd.Parameters.AddWithValue("@vrgi_daire", txtVergiDaire.Text);
|
|
|
|
|
hi,
you wrote:
"cmd.Parameters.AddWithValue("@firma",cmbFirma.SelectedItem.ToString());
but when i use it and check my database it writes there System.Data.DataRowView"
But the ComboBox control SelectedItem property returns an object! NOT a DataRowView.
If you need the selected item from the combobox you should use:
cmbFirma.SelectedItem.ToString();
or try this:
cmbFirma.Items[cmdFirma.SelectedIndex].ToString()
Do you correctly data bound the ComboDox control ?
Anyway, it seems that you don't have a problem with the combobox!
Try to verify better the code.
You have many parameters and maby you switch someone of them..
Cheer's,
Alex Manolescu
|
|
|
|
|
hey man...i tried your suggestions and in the first one it writes again to database system.Data.DataRowView when i select the item from combobox i mean when i fill it with the datas from my db but it works for the item that i select from txt file....and it is same for the second one
|
|
|
|
|
how do you load you're new firm into the combobox ??
show us more code of you're application.
|
|
|
|
|
hey man
thanks for your help..finally it works as i wished
cmd.Parameters.AddWithValue("@firma",cmbFirma.Text);
by that way it works as i wished...thanks again for your help
|
|
|
|
|
with welcome,
cheer's man!
|
|
|
|
|
Hi. I'm having problems in showing all the data to a listbox. all of the data will be coming from a database and will be shown depending on the choices of the user. i tried to code it but it didn't work. here's my code:
public frmMainForm()
{
InitializeComponent();
string sConnection = "Provider = Microsoft.Jet.OLEDB.4.0;" + "Data Source = Schedule.mdb";
using (OleDbConnection dbConnect = new OleDbConnection(sConnection))
{
dbConnect.Open();
if (prog == "CS")
{
string sqlString = "SELECT cs_firstcourse, cs_secondcourse, cs_thirdcourse, cs_fourthcourse, cs_fifthcourse, cs_sixthcourse, cs_seventhcourse, cs_eighthcourse, cs_ninthcourse FROM CS WHERE cs_year = @chosenYear AND cs_term = @chosenTerm;";
OleDbCommand dbCmd = new OleDbCommand();
dbCmd.CommandText = sqlString;
dbCmd.Connection = dbConnect;
dbCmd.Parameters.AddWithValue("chosenYear", chosenYear);
dbCmd.Parameters.AddWithValue("chosenTerm", choseTerm);
using (OleDbDataReader dbReader = dbCmd.ExecuteReader())
{
if (dbReader.Read() == true)
{
for (int a = 0; a < 9; a++)
{
lstBoxCourses.Items.Add(dbReader[a].ToString());
}
}
else
{
MessageBox.Show("An error has occured while trying to retrieve data from the database", "Class Scheduling: Database Access Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
dbReader.Close();
}
}
dbConnect.Close();
}
}
can someone help me?
|
|
|
|
|
When you say "It didn't work" what did happen?
An Exception?
Nothing on the display?
Your computer burst into flames?
All those who believe in psycho kinesis, raise my hand.
My 's gonna unleash hell on your ass. tastic!
|
|
|
|
|
OriginalGriff wrote: Your computer burst into flames
Ouch, remind me never to run any of your code
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|