|
i already tried Application.Exit() but its not working.
sAqIb
|
|
|
|
|
You got multiple threads? Make sure they marked as background threads otherwise they'll keep your app alive.
Regards,
Rob Philpott.
|
|
|
|
|
how to mark threads as background threads?
sAqIb
|
|
|
|
|
|
hi,
i have a certain internet based program running on this computer, and i'd like to check it's network i/o.
i've tried to do it with basic tcplistener/tcpclients like i used to do with web programming, but apperently when its a program and not a webpage, the port is declared as 'used' and i cant listen to it.
i know there is probably some easy way to do it and i sound pretty much like a 1-day-user, but i truely have no experience with actual 'exe-programming'.
all im basicly looking for is a code to list all i/o from the selected port, and write it to console screen or whatever available.
thanks for any help.
|
|
|
|
|
Hi all!!
I have the following gridview error, and I am not sure how to fix it.
I have the following object datasource:
<asp:ObjectDataSource id="odsOrders" TypeName="MyName.BusinessLogicLayer.Order" runat="server">
</asp:ObjectDataSource>
And here is my gridview (part of it):
<asp:GridView id="gdvWineries" DataSourceID="odsOrders" DataKeyNames="ID" AutoGenerateColumns="False"
AllowPaging="true" PageSize="10" Width="100%" runat="server">
<Columns>
All my coloumns here.
</Columns>
</asp:GridView>
I have the select statement in my Page_Load event handler because the select statement can use onr of 2 methods to populate the gridview, depending on the roles of the user.
if (!Page.IsPostBack)
{
if (Role.IsInRoles("SystemAdmin"))
{
odsOrders.SelectMethod = "GetAllOrders";
}
else if (Role.IsInRoles("WineryAdmin"))
{
odsWineries.SelectParameters.Add(new Parameter("strMemberUsername", TypeCode.String,
User.Identity.Name));
odsWineries.SelectMethod = "GetWineryByMemberID";
}
}
Then at the bottom of the gridview it displays 1 2 3 4.. for the page numbers, but when I click on one of these numbers I get the following error:
The Select operation is not supported by ObjectDataSource 'odsOrders' unless the SelectMethod is specified.
Can someone please help me why I get this error and how to fix it?
Regards,
ma se
|
|
|
|
|
Hello friends,
I have an appication of recording a wave file.
But i want to specify the sound device through which only
the wave file should be recorded. That is if my machine has more than one sound card
then i want to select one (through Programmatically) and record sound from that one only.
How to do that.
Thanks in Advance.
Rahul Kulkarni
|
|
|
|
|
|
hi,
how can i count child nodes in xml file.
|
|
|
|
|
Hi there,
let the xDoc is a XmlDocument of your xml file,
then you can simply get the child count ;
xDoc.ChildNodes.Count;
|
|
|
|
|
hi
iam getting child node value is 0
what i should do
plz give one example code .
Hi,
Thanks, if u think it's good.
otherwise sorry.
|
|
|
|
|
child node VALUE, didnt you ask the number of nodes,
value is somehow different thing.
|
|
|
|
|
Hi,
I am working in the project to list all hardware device and block the accessing (disable) in both windows and MS-Dos.please give ideas for this
Gnanas
|
|
|
|
|
Hi,
I dont know in c# but I have done this in vc++ to block cd drives .
If you want ,reply me I will send you the code.
May be you can Inport that API in c# programme to do your work
<marquee>nishu
|
|
|
|
|
will you please send that code to me??
|
|
|
|
|
Hi,
May be this will help you.
#include<windows.h>
#include<winioctl.h>
void main()
{
HANDLE h;
h=CreateFile("\\\\.\\E:",GENERIC_READ|GENERIC_WRITE,FILE_SHARE_READ|FILE_SHARE_WRITE,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
DWORD r;
PREVENT_MEDIA_REMOVAL pmr;
pmr.PreventMediaRemoval=false;//here do true or false//
DeviceIoControl(h,IOCTL_STORAGE_MEDIA_REMOVAL,(void*)&pmr,sizeof(pmr),NULL,NULL,&r,NULL);
CloseHandle(h);
}
Use this code to implement yours
<maarquee>nishu
|
|
|
|
|
Include following header files
windows.h
winioctl.h
<marquee>nishu
|
|
|
|
|
Greetings all,
I'd like to retrieve all windows users, actually the user list
when the xp os starts, the user list seen in the screen.
I mean I dont want to list the hidden users like; ASPNET, HelpAssistant, SQLDebugger ...
I just want to gather a list that user who logon.
like, John, Mary, ...
I currently user tthe following code, but it retrieve all users, inculding hidden ones.
//--------------------------------------------------------------------------------
DataTable dtKullanicilar = new DataTable();
DataColumn dcAd = new DataColumn("Kullanici", typeof(string));
dtKullanicilar.Columns.Add(dcAd);
ManagementClass usersClass = new ManagementClass("Win32_UserAccount");
ManagementObjectCollection users = usersClass.GetInstances();
foreach (ManagementObject user in users)
{
DataRow dru = dtKullanicilar.NewRow();
dru["Kullanici"] = Convert.ToString(user["Name"]);
dtKullanicilar.Rows.Add(dru);
}
//--------------------------------------------------------------------------------
Thank you all ...
|
|
|
|
|
Hi,
Hey do this man!!!!
Environment.OSVersion.Platform
Environment.UserName
This will help you!!!!
<marquee>nishu
|
|
|
|
|
Thank you,
but I want to retireeve all users, not the current user
|
|
|
|
|
I developed a chat application.When i send a lengthy text or an emoticons then it shows an exception
An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll
Additional information: End of Stream encountered before parsing was completed.
below is my code of recieving data
------------------------------------------------------------------------------
public void XOnMessageRecieving(IAsyncResult ar)
{
try
{
ClsPacket stObj = (ClsPacket) ar.AsyncState; // restore state object..
if (stObj == null)
{
return; // if any of the remote end has been disposed then... finish futher processing..
}
int bytesRecieved = stObj.Soket.EndReceive(ar); // end the asynchronous call and get number of bytes recieved..
if (bytesRecieved < stObj.Bufer.Length) // if number of bytes recieverd are less than the buffer length ... i.e. 32
{
stObj.ContextBuffer.Write(stObj.Bufer,0,bytesRecieved);//put last bytes recieved...
stObj.ContextBuffer.Seek(0,0); //put reference to the begining of memory stream..
stObj.ContextBuffer.Position=0;
BinaryFormatter bFormatter = new BinaryFormatter(); //set up a formatter to deserialize object form memory stream...
try
{
EvtArgCCI cciArg = (EvtArgCCI) bFormatter.Deserialize(stObj.ContextBuffer); // decerialize object and get it as EvtArgCCI object..
ClsCCI.XFireCCIMessageEvent(cciArg); // send this information to other managers through CCI to take proper actions..
}
catch(Exception ex)
{
//here comes the exception "End of stream encountered before parsing was compeleted."
}
stObj.ContextBuffer = new MemoryStream(); // clear the memory stream.. for other message...
}
else
{
stObj.ContextBuffer.Write(stObj.Bufer,0,bytesRecieved); // keep storing the message into state object untill whole message/packet is read...
}
try
{
stObj.Soket.BeginReceive(stObj.Bufer,0,stObj.Bufer.Length,SocketFlags.None,new AsyncCallback(XOnMessageRecieving),stObj); // create an asynchrounous hook to continue recieving packets....
}
catch(Exception ex)
{
}
}
catch(Exception ex)
{
}
}
Adeel
|
|
|
|
|
hi all ,
i have a byte array where the data is represented as hexadecimal number.
I want to retrive this hexadecimal number from the byte.
then again i need to convert the hexadecimal number to float.
plz help me and give me some suggestions..
thanks in advance,
Sunita
|
|
|
|
|
Hi,
Frankly speaking I never tried this but I can suggest you something to try out.
try this,
System.Int32.Parse("your hex number",System.Globalization.NumberStyles.AllowHexSpecifier);
or
float.Parse(,System.Globalization.NumberStyles.AllowHexSpecifier);
May be this will help you.
Reply me.
<marquee>nishu
|
|
|
|
|
|
Hi
i am working on MDI in which i have multiple forms. I want that whenever a new form is opened, already opened forms get closed. Can anybody tell me how can i do that?
sAqIb
|
|
|
|