|
I was just cruising the message boards and I came across this.
Needless to say it's now been 20 mins so I need to get back to work but I'm just going to be thinking about how I'm going to build my RPG all afternoon.
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
Hi Experts
I am working with vs2005 winform.i am making a winform that contain
the splitter control in upper panel1 of spliter contain the gridview
and lower panel2 dock the form at run time when i am double click on the gridview i send one value to the form that i have dock in panel two.
pls help me how to send value from grid double click to docked forms
thank U
Dinesh Sharma
|
|
|
|
|
Use a delegate to communicate between forms.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
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;
namespace lastone
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'database21DataSet.Table1' table. You can move, or remove it, as needed.
this.table1TableAdapter1.Fill(this.database21DataSet.Table1);
// TODO: This line of code loads data into the 'database21DataSet1.Table1' table. You can move, or remove it, as needed.
this.table1TableAdapter.Fill(this.database21DataSet1.Table1);
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
}
private void groupBox1_Enter(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
this.table1TableAdapter.Update(database21DataSet1);
MessageBox.Show("Updated ,,,successfully");
}
private void button2_Click(object sender, EventArgs e)
{
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
}
|
|
|
|
|
You posted a ton of useless code. Type your question into google to get the sort of in depth answer I suspect you will need.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
i m working on my project.i have 4 columns in msaccess and i have connected these column to c#.now i want to make 4 ranges of each column by taking the diffrence bettten maximum and minimum value of each column.i have doen finding maximum and minimun how can i make ranges in c# using 2D array.
|
|
|
|
|
You could write your own datastructure (class) to represent ranges.
|
|
|
|
|
When an Installation Setup is made in vs2005, what are files created in registry entry while installing that setup, and when uninstalling the setup what are the corresponding files deleted from the registry of that setup.
How to know all these.
Can anyone suggest for knowing about all these things?
Thanks...
|
|
|
|
|
Some registry monitoring applications like this[^] may help.
|
|
|
|
|
|
|
haleemasher wrote: running this code it show an error does not contain definition for row index
At least you should be able to work out from compiler errors. It says, there is no RowIndex property on a GridviewUpdatedEventArgs[^].
2 things to note,
1 - Compile your application before you run. ASP.NET can compile pages on fly, but compiling first is always good.
2 - Post it in correct[^] forum next time.
|
|
|
|
|
Hi,
I need some help. Basically I have a simple HTML form like this:
<br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><br />
<html><br />
<head><br />
<title>Wap Push Test</title><br />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><br />
</head><br />
<body><br />
<form name="form1" action="http://111.111.111.111/app" method="post"><br />
xmldata:<br><br />
<br />
<textarea name="xmldata" cols="70" rows="30"><br />
<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<PUSH><br />
<UID>myid</UID><br />
<PWD>thepassword</PWD><br />
<CONTENT TYPE="binary"><br />
The content here...<br />
</CONTENT><br />
<DCS>245</DCS><br />
<UDHL>7</UDHL><br />
</PUSH><br />
<br />
</textarea><br />
<br><br />
<input name="" type="submit" value="Push"><br />
</form><br />
</body><br />
</html><br />
Simply, it's only posting the XML to the destination web application. And it's successful.
However, now I need to accomodate that module into a windows application (I'm using C#). This is what I've done:
<br />
string uri = "http://111.111.111.111/app";<br />
<br />
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);<br />
request.Method = "POST";<br />
request.UserAgent = "HTTP CP Client";<br />
request.ContentType = "application/x-www-form-urlencoded";<br />
<br />
StreamWriter writer = new StreamWriter(request.GetRequestStream());<br />
writer.WriteLine(HttpUtility.UrlEncode(strXML));<br />
writer.Close();<br />
<br />
using(HttpWebResponse response = (HttpWebResponse)request.GetResponse())<br />
{<br />
using(StreamReader reader = new StreamReader(response.GetResponseStream()))<br />
{<br />
string ack = reader.ReadToEnd();<br />
ok = true; <br />
}<br />
}<br />
And now I keep getting Internal Server Error.
Has anyone have experienced this before? Why does the HTML form is successful while the windows application generates error?
Thanks & Regards,
Adrian
|
|
|
|
|
excellence80 wrote: writer.WriteLine(HttpUtility.UrlEncode(strXML));
This line looks invalid. Writing the XML data directly won't work. You need to specify the variable name as well. Try something like,
string dataToPost = "xmldata=" + strXML;<br />
writer.WriteLine(dataToPost);
|
|
|
|
|
Navaneeth,
Thanks for the reply. I've tried that, but still giving me "The remote server returned an error: (500) Internal Server Error."
|
|
|
|
|
Oopss... My bad. I messed up the URI value, that's why i got the error.
Just realized it.
Actually your method works fine.
Thanks Navaneeth for the help
|
|
|
|
|
I have not yet manipulated text files so I need some help performing the following tasks:
1. I need to access a letter in a name (eg the 'h' in John)
2. I also need to find the name's position in a list of names (eg Joey is in position 3 here: John, Sally, Joey, Paul)
3. Finally I need to find the length (number of letters) of a name (eg the lenth of Paul is 4)
I am not limited to System.IO, but I am assuming that is the namespace that should be used for these tasks, so if one of these tasks require something not is System.IO then please tell me.
Edit:
The names are in "name1", "name2", "name3" format in the textfile. This might make things easier.
Edit 2:
Never mind I already got it. The trick is to store the file as a string and use the methods in the IEnumerator class.
modified on Tuesday, August 4, 2009 12:53 AM
|
|
|
|
|
System.IO contains nothing to do these things, why should it ?
File.ReadAllText or File.ReadAllLines will read a text file. Then the string class contains everything you need to do this stuff.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Why the hell did you get downvoted for that?
Anyway evened it out a bit
|
|
|
|
|
if names are like the following code(with quote) then you should learn Regular Expression(The 30 Minute Regex Tutorial[^])
string names = "\"name1\", \"name2\", \"name3\"";
and you can get Index of any string in string through IndexOf() , it will return -1 if there is nothing that matches with specified string or char.
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
First, use File.ReadAllText to get the file in a string variable and split it on "," to get an array of names. Then you can carry out the other things using methods in string class.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hey all, in my application, I came up with an idea. I want to be able to shake the window to be able to perform a common function that would normally require atleast a few mouse clicks. And depending on how long the user shook the window, the resulting function will differ, accordingly. I've already started coding (The planning stage made it even harder, so I decided to get my hands a little dirty). But the code that I have now, is so cra& that I'm too embarrassed to put it here for everyone to see lol.
Here's what I've trying to accomplish:
Determine whether the user shook, or moved the window.
If shook: then see how long it was shaken for.
if shaken for less than one second: perform function 1.
if shaken for 2seconds: perform function 2.
if shaken for 3seconds: perform function 3.
If the window did not shake, instead it was just moved to another spot, then don't do anything.
I'm not asking for code, but if somebody does know of any tutorials, samples, or articles that may be of help, please do share I have searched on Google etc, and I've only been able to find one article and about 50trillion sites that refer to that one article (and I can't use it since it only work on Windows 7) I've tried it and the bugger just won't work on XP. (or my other computer that runs Vista).
I'd appreciate any help I can get. Thanks everyone.
Regards,
Jason Pezzimenti.
|
|
|
|
|
You want to handle the event when the form moves, and then track movement to determine if it's a shake and use a timer to work out when the shaking stops.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thank you Christian, I had something similar to that, but I didn't use a timer. I'll give your suggestion a whirl and see how things go.
Regards,
Jason Pezzimenti.
|
|
|
|