|
I tend to write a dll that has methods that know how to return objects from it's resources.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am using VS.Net 2005
the DataGridView i use it has a ComboBox column
(Disply Member is Product Name but Value Member is Product ID)
i have a nother column for BarCode i want when i insert the BarCode Number in this column the value member of the combobox chenge and disply the product name of this value
this is the code i wrote but it doesn't work
private void GV_OrderDetails_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
try
{
if (GV_OrderDetails.CurrentCell.ColumnIndex == 6)
{
string BarCodeText = GV_OrderDetails.CurrentCell.Value.ToString();
if (BarCodeText.Length > 4)
{
DV_Pro.RowFilter = "Pro_ID='" + BarCodeText.Substring(0, 4) + "'";
GV_OrderDetails[2, GV_OrderDetails.CurrentRow.Index].Value = BarCodeText.Substring(0, 4);
}
}
}
catch
{ }
}
MD_NADA
|
|
|
|
|
Hi Guys,
I've been looking around for a while now, i've seen lots of classes in the .net framework that use sections of xml in the app / web.config to setup the class. I'm sure it's possible to create my own, and I'm wondering if someone can point me in the right direction for some resources on the subject.
Cheers
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
|
Excellent -
Thanks Pete.
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
i am working on a project to communicate with clinets using tcp/ip protocol.
I have a server system where this program is being done. I have clinets which are connnected to my ip. These clients are capable of accepting commands from the server and gove reply for that. For eg:- if i give %Name to clinet it will send back the system ip address.
private void button1_Click(object sender, EventArgs e)
{
Listener = new Socket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp);
IPEndPoint ipLocal = new IPEndPoint(IPAddress.Any,5005);
Listener.Bind(ipLocal);
Listener.BeginAccept(new AsyncCallback(OnClientConnect), null);
}
private void OnClientConnect(IAsyncResult asyn)
{
Client = Listener.EndAccept(asyn);
WaitForData();
}
private void WaitForData()
{
Client.BeginReceive(buffer, 0, buffer.Length, SocketFlags.None, new AsyncCallback(OnDataReceived), null);
}
private void OnDataReceived(IAsyncResult asyn)
{
Byte[] sendBytes = Encoding.UTF8.GetBytes("%Name");
string szData;
int iRx = 0 ;
iRx = Client.EndReceive(asyn);
char[] chars = new char[iRx + 1];
System.Text.Decoder d = System.Text.Encoding.UTF8.GetDecoder();
int charLen = d.GetChars(buffer, 0, iRx, chars, 0);
szData = new string(chars);
MessageBox.Show(szData.ToString());
Client.Send(sendBytes);
WaitForData();
}
The sending of data is working fine here. but when i revceive data they are all junk values even after converting to string. Junk vlaues means some single characters only
Please let me know if tehre is someone extertise in this feild as i am new to this
Thanks in advance
Harikrishnan
|
|
|
|
|
I've used:
string receivedText = System.Text.Encoding.ASCII.GetString(buffer, 0, buffer.Count));
Of course this assumes that "buffer" in your case is a byte array.
Also, please be sure to check what the client is supposed to be sending. Is it an array of values that need interpreting? Or is it a human readable string?
Phil
|
|
|
|
|
Hi
I have added a checkbox to my gridview using a template field with autopostback for the checkbox , but I can't find a way to to retrieve gridview data for the row checked.
Can anyone help please ?
thanks:
confused:
|
|
|
|
|
Hi all,
i've developed screens using Microsoft InforPath, and now i wanna add all the forms to my windows application in VISUAL STUDIO 2005,
Do we need to add any plug-in to do this?
can u please suggest me the solution.
prashanth,
s/w Engineer,
Syfnosys.
|
|
|
|
|
I want to take very fast screenshots of my full screen with a timer. I hope this can be done with DirectX.
On this page[^] is an example of doing this in C++. But... the rest of my project is in C#, so I hope it also can be done in C#. I need the screenshot as a Bitmap variabele, it won't be saved as a file.
Hopefully, someone got a full sourcecode example, because I don't know much of DirectX.
|
|
|
|
|
A generic collection i.e. cCurves is populated with data.
The collection has several fields.
I am interested in two of the fields i.e. Name and Name2
As a test, the following return data from the collection.
cCurves[0].Name1
cCurves[0].Name2
cCurves[1].Name
cCurves[1].Name2
cCurves[2].Name
cCurves[2].Name2
...
How can I use a loop to populate a simple array with the
data (Name, Name1 fields for each row) in the above collection please?
Thanks
|
|
|
|
|
for(int i=0; i<numElements; i++)
{
cCurves[i].Name1 = whatever;
cCurves[i].Name2 = whateverelse;
}
|
|
|
|
|
Can you please simplify the code as it seems to have syntax error. thanks
|
|
|
|
|
arkiboys wrote: Can you please simplify the code as it seems to have syntax error.
Ah... That is because I forgot to HTML encode the < symbol
for(int i=0; i<numElements; i++)
{
cCurves[i].Name1 = whatever;
cCurves[i].Name2 = whateverelse;
}
|
|
|
|
|
Please note that I am trying to create and populate a simple array from an existing collection. I just realised that I think you are not doing that in your earlier code. Thanks
|
|
|
|
|
You can try using foreach loop over this collection.
|
|
|
|
|
doing this at present
for (int i = 0; i <= cCurve.Count; i++)
{
}
not sure how to declare and populate an array from this collection (cCurve)
|
|
|
|
|
Array curve = new Array(cCurve.Count);
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
i want to do software updation for the application, i.e., when click Update button , if there is any new version is available it should update automatically, if there is no new version is available it should prompt a msg like " There is no newer version to update"
for this i tried with the following code
private void Updates_click(object sender, EventArgs e)
{
if (ApplicationDeployment.IsNetworkDeployed)
{
ApplicationDeployment CurrentDeploy = ApplicationDeployment.CurrentDeployment;
if (CurrentDeploy.CheckForUpdate())
{
CurrentDeploy.Update();
DialogResult dr = MessageBox.Show("Update Downloaded,Restart the Application", "Application Update", MessageBoxButtons.YesNo);
if (dr == DialogResult.Yes)
{
Application.Restart();
}
}
}
else
{
MessageBox.Show("No Updates are available", "UpDate Info");
}
}
but it is working fine for some applications but for my application it is not working.
Please Help me on this(is there any other methods to fullfil my requirement)
Thanks in advance
Praveenkumar Palla
|
|
|
|
|
How is it not working? Are you getting an error of some kind?
|
|
|
|
|
https://secure.ltcg.com/citrix/metaframexp/default/login.asp?ClientDetection=On'
http://www.dasblonde.net/PermaLink,guid,aa492057-3a39-4ab4-87c4-5adb36d3d41f.aspx
My Application(LaserControlSoftware) is giving this error- when i select appplication from startup menu.
LaserControlSoftware has encountered a problem and needs to close. We are sorry for the inconvenience.
Error Signature
EventType : clr20r3 P1 : lasercontrolsoftware.exe P2 : 1.0.0.0
P3 : 46231a32 P4 : mscorlib P5 : 2.0.0.0 P6 : 4333ab80 P7 : 32f8
P8 : d8 P9 : system.io.filenotfoundexception
PraveenKumar Palla
|
|
|
|
|
Is there a "details" button that shows the error details? You should look at the stack trace and see where the error is occurring -- is it happening in your code?
|
|
|
|
|
I would guess your issue has to do with your Application.Restart and your ApplicationDeployment object. The methods you are using assume that you are using clickOnce deployment. I am guessing that you are trying to update your application outside of ClickOnce. If you are there is a good chance that you have missed some settings. Things like the UpdateLocation. If you are using click once, then you don't have to write this code your self it will just get the latest version automatically.
Hope that helps.
Ben
|
|
|
|
|
Yes Ben
I agree with you
i will try again.
And expecting suggestions from u
Thanks in advance
PraveenKumar Palla
|
|
|
|
|
plz tell if you know :->
nims
|
|
|
|