|
Did you try using the SelectedItems[^] property instead? You can then simply use the last item in the collection returned by that property.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
but what if I drag upward?
|
|
|
|
|
hi there ,
in my program i have the Order Form (win Form)
in this form i have some textbox and grid
know the grid is bound the a dataset on the grid i have some filds like productID,Qunataty,UnitPrice,Total
i am filling all the data on the Form and the order is insert well to the db
now if i want to change something in this particular order i select the order detiles from the db by OrderId num
an all the order detiles are displayd on the Form
the problem is when i want to add products to the order
the product detiles that is bound to the datagrid is updated but the OrderId is not
this is the code :
if(dsOrdersDetiles1.HasChanges()==true)
{
AdOrdersDetiles.Update(dsOrdersDetiles1.Tables[0]); //only the data in the grid is update but i need the OrderId to be update in the same row .
}
how can i update order detiles when the filds are not bound ?
|
|
|
|
|
I ve class library ( installer class ) , i load embedded resource on hard desk to execute within setup. breifly , installer class execute 3 msi as embedded resources .. it was working but now it gives me error that there is another installation in progress and i ve to finish this installation before the current one.
this function that i ve to load MSI files:
void LoadMSI (string sResourceName)
{
if(!Directory.Exists (Context.Parameters ["Temp"]))
Directory.CreateDirectory (Context.Parameters ["Temp"]);
FileStream stmTemp=new FileStream (Context.Parameters ["Temp"]+sResourceName,FileMode.Create);
Stream sOurFile=Assembly.GetExecutingAssembly().GetManifestResourceStream (Assembly.GetExecutingAssembly ().GetName().Name+"."+sResourceName);
EventLog.WriteEntry("CRM","Length Of :"+sResourceName+" is "+sOurFile.Length.ToString ());
BinaryWriter bw=new BinaryWriter(stmTemp);
BinaryReader br=new BinaryReader (sOurFile);
byte[] bTemp=new byte[(int)sOurFile.Length];
bTemp=br.ReadBytes((int)sOurFile.Length );
br.Close ();
bw.Write (bTemp);
bw.Close();
stmTemp.Close();
Process pTemp=Process.Start (stmTemp.Name );
pTemp.WaitForExit ();
}
and this install override :
public override void Install(IDictionary stateSaver)
{
// scenario : load files in temp folder then execute it
LoadMSI ("DBSetup.msi");
LoadMSI("EmpowerServiceSetup.msi");
LoadMSI("EmpowerWebSetup.msi");
}
Amal ElHosseiny
|
|
|
|
|
Hi
I try to delete my Temporary Internet Files using C# Code.
I thought.. no problem, but the only file that was found is the desktop.ini...
No other files in that Directory..
<br />
private void button1_Click(object sender, EventArgs e)<br />
{<br />
<br />
string dir= Environment.GetFolderPath(Environment.SpecialFolder.InternetCache);<br />
<br />
foreach (string fileName in Directory.GetFiles(dir))<br />
{<br />
File.Delete(fileName);<br />
}<br />
}<br />
|
|
|
|
|
Under what user account are you running the code? Each user account have their own cache folder for Internet Explorer.
---
b { font-weight: normal; }
|
|
|
|
|
Hi
It's an account where the User is in the administrator group.
|
|
|
|
|
Are you sure? Check the contents of the Environment.UserName property.
---
b { font-weight: normal; }
|
|
|
|
|
Have you looked under C:\WINDOWS\TEMP\Temporary Internet files?
|
|
|
|
|
|
I've been trying to find some sort of Wrapper DLL for CAPI 1.1/2.0 functions for C#/.NET framework but I couldn't find anything of the sort.. anyone have a clue where I can begin to look? I really don't want to dive into the quagmire of developing my own DLL for this stuff.
Any help is very much appreciated, thanks
Got a coding problem? Hand it to the CodeDevil!
|
|
|
|
|
Hello everybody...
I have a TCP/IP client/server chat application.I want to add voice chat feature to my application.What is the start point ?
How can I implement this feature in c# ? How can I implement audio streaming in c# ? Please guide me.
Note : My application works on LAN and is not on internet.
Best Regards,
XironiX
[ _ Always there is another way _ ]
|
|
|
|
|
First you have to capture the audio. Try search 'audio capture' here on CP and you'll find many interesting articles.
Then you have to design some application protocol to compress and encapsulate audio data and stream it to the other host, maybe adding silence-suppression algorthms.
There are many mpeg libraries on the net, you should choose one simple to use.
Trust me, this is not simple at all.
___________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA]
|
|
|
|
|
Thanx for your answer...
Did you heared anything about Microsoft Media Service. Do you know that can I use Media Player SDK to do streaming ?
Best Regards,
Xironix
[ _ Always there is another way _ ]
|
|
|
|
|
hi.good day.just would like to ask..how can i save something into an image file(into jpg etc.) that is in the child form?thnx!
|
|
|
|
|
Well, I don't know what the problem is...
Search MSDN for Bitmap class and have a look at its methods...
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
hi,
how can i track the downloading of images from web browser control used in my application,i used begindownload event but i couldn't get the url of the image,
thanks.
|
|
|
|
|
Is there anyway to get or reference the local directory a web service is located in ?
i.e. similar to Application.StartupPath ?
|
|
|
|
|
A web service is a variant of an ASP.NET weg application. It doesn't "come alive" until it's called by some consumer and instantiated. There is no "StartupPath".. You could look into using Server.MapPath() , but web services are not my strong suit.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Right, I need to get the local path reference within the service during runtime, so I'm not worried about it not being instantiated. I'll look into MapPath(), thanks.
|
|
|
|
|
Well it appears the Server.GetPath() method is useful from a client perspective, but I need to get the local path in the service. Any other suggestions ?
|
|
|
|
|
I was wrong...just had to pass null as the path...thanks Dave.
|
|
|
|
|
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can a windows service capture HID input events?
I need to capture HID input from a remote control. I have done this and was successful in a windows application by overriding WndProc.
I need to be able to do this in a service and can't seem to get anything? Does a service have a hidden top level window I can override? Is there a way to do this?
Mary
|
|
|
|
|
Hey,
i am trying to develop a small program taking advantage of .NET Remoting.
I have a button which i want to Start and Stop the Server with.
But my problem is that I cant really find any information about how to stop the Server.
I simply start the Server by doing the following:
RemotingConfiguration.Configure("theconfiguration.config");
But then i dont know how to stop the Server again when pushing the button.
Can anyone help me ?
I can see that if i instead of using a configuration file, set it all up directly in the code there is the ChannelServices.RegisterChannel and the ChannelServices.UnregisterChannel.
But will this be the correct way to do it if i want to start and stop the Server ?
Or will i have to etc. make a new application domain and run the server there and then destroy it when i want the Server to stop ?
How should it be done ?
Hope someone can help me
Best regards
Martin
|
|
|
|