|
because your posts are always helpful and trusted
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
|
J4amieC wrote: Welldone, you just did this guy's homework for him. Now he learns nothing.
bang bang, you shut him down
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
HOW DO U KNOW THAT THIS IS A HOMEWORK ????????????
MAY THAT GUY WAKING A BIG BUISNESS APPLICATION AND HE WANTS TO USE THIS FEATURE,,,,,
><think twice="" before="" go="" attack=""
=""
<div="" class="ForumSig">Mohamad A. Flefel
mflefel@hotmail.com
+962 79 5963865
C#.net & VB.net Developer
|
|
|
|
|
Wow, I guess resource file hasn't come to mind to make this easier.
|
|
|
|
|
Hi all
I'm trying to make something like the online notification from MSN, so i want the pop-up form not to recieve any focus at all.
what i have done so far:
1. overrided the property ShowWithoutActivation to return true so that when the form is displayed, the form is not activated!!(and i see that activated event do not occur)
protected override bool ShowWithoutActivation
{
get
{
return true;
}
}
2. i make sure that the MsgForm.TopMost=false because the topmost feature always activate the form which is bad. because then , after i click first time on the notifiation form it starts to get the focus when i pop-up it.
the problem: if i dont use the TopMost, its working fine but.. i need it to be on top of programs otherwise it will not be shown.
Please help me.
Thanks.
R.Z
|
|
|
|
|
I can't think of what you could do... why do you have to have it so it doesn't get focus?
|
|
|
|
|
Im trying to do something like MSN's user online notification.
the small form never get the focus, but it always on-top.
so it is possible.
R.Z
|
|
|
|
|
There are several ways to accomplish that, i've created a few apps using this feature (it gets boring though ) and most were built from an example found on codeproject. I say, look through the articles, those guys spend a lot of time writing them, and are worth reading!
- - - --[ i love it when a plan comes together ]-- - - -
|
|
|
|
|
I'm looking for a way to update bulk data from DataTable to a SQL server since the updating procedure row at the time takes a lot of time in a large scale database as the one i work with.
|
|
|
|
|
you can use the concepts of OpenXML for bulk updates in sql server. this can minimize ur updates from a number of rows to be updated to 1.
regards
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
Hi all,
Can any one suggest mw how to check selected node is parent or child for visualc# treeview control?
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
hi,
this will let u know if the node has another node as a child for it or no.
if it has a child it will retrun true.
if (treeView1.SelectedNode.FirstNode != null)<br />
return true;<br />
hope it helps.
best regards
jamil abou khalil
|
|
|
|
|
hi,
Thanks a lot
Know is Drop, Unknown is Ocean
|
|
|
|
|
hi,
your welcome. but please note that the method i gave to u will return true it the node has another node as a child for it. meaning that if a node i a child and has a child it will return true.
also it wont retrun true explicitly for the root nodes except they have a child or more.
if u need more help please contact me on my msn: jamilaboukhalil@hotmail.com
jamil abou khalil
|
|
|
|
|
hi this link might help you for treeview in c#
http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c91c.aspx#q1097q
regards
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
Dear Respected Programmers
Kindly let me know the method, How may I use lounch "netscape.exe" with "http://www.yahoo.com"? <= using C#
thank you
|
|
|
|
|
System.Diagnostic.Process.Start(@"netscape.exe", @"http://www.yahoo.com");
|
|
|
|
|
hi,
try using the link label.
jamil abou khalil
|
|
|
|
|
Hi,
I want to compare two objects. I make a object and get the services from my machine, after sometime I make another object and get the services form my machine. I compare the two and popup a messagebox with the result of the comparation. But always is "distint", and the services are the same.
How can I do this?
I have do a example what enclose.
example:
public partial class Form1 : Form
{
ServiceController[] scServicesA;
public ServiceController scTempB;
public ServiceController scTempA;
public Form1()
{
InitializeComponent();
scServicesA = ServiceController.GetServices();
int cuentaA = 0;
clbA.Items.Clear();
clbB.Items.Clear();
foreach (ServiceController scTempA in scServicesA)
{
cuentaA += 1;
clbA.Items.Add(scTempA.DisplayName + " (" + scTempA.ServiceName + ")" + "\r\n");
}
Timer tmr = new Timer();
tmr.Interval = 3000;
tmr.Enabled = true;
tmr.Tick += new EventHandler(tmr_tick);
lblCuentaA.Text = cuentaA.ToString();
}
public int cuentaB;
public void tmr_tick(object sender, EventArgs e)
{
clbB.Items.Clear(); //Borra lo que tenga.
cuentaB = 0;
ServiceController[] scServicesB;
scServicesB = ServiceController.GetServices();
foreach (ServiceController scTempB in scServicesB)
{
clbB.Items.Add(scTempB.DisplayName + " (" + scTempB.ServiceName + ")" + "\r\n");
cuentaB += 1; //incrementa el contador de servicios.
}
lblCuentaB.Text = cuentaB.ToString();
if (clbA.Equals(clbB)) MessageBox.Show("Son IGUALES");
else MessageBox.Show("Son DISTINTOS");
}
}
Thanks,
Fernando
|
|
|
|
|
Fernando, you haven't received any replies because you posted a whole bunch of code, with no formatting (next time use <pre> tags around the source code), and the source code variables and comments are in Spanish. Could you clarify exactly where the problem in your code is?
|
|
|
|
|
I want have a object with the initial services from my machine (in the code "scServicesA"), and perdidically compare that services ("scServicesA") with the actual services in the machine (in the code "scServicesB"). I want check if something to add or delete some service in my machine.
The problem is: when I compare ("if (scServicesA.Equals(scServicesB)) MessageBox.Show("IS THE SAME");"), the response is always the same "IS NOT THE SAME", even if I add or delete services.
The next is only an example to know how compare, really I want compare the services what are running ("ServiceControllerStatus.Running").
example:
public partial class Form1 : Form
{
ServiceController[] scServicesA;
public ServiceController scTempB;
public ServiceController scTempA;
public Form1()
{
InitializeComponent();
scServicesA = ServiceController.GetServices();
int cuentaA = 0;
clbA.Items.Clear();
clbB.Items.Clear();
foreach (ServiceController scTempA in scServicesA)
{
cuentaA += 1;
clbA.Items.Add(scTempA.DisplayName + " (" + scTempA.ServiceName + ")" + "\r\n");
}
Timer tmr = new Timer();
tmr.Interval = 3000;
tmr.Enabled = true;
tmr.Tick += new EventHandler(tmr_tick);
lblCuentaA.Text = cuentaA.ToString();
}
public int cuentaB;
public void tmr_tick(object sender, EventArgs e)
{
clbB.Items.Clear();
cuentaB = 0;
ServiceController[] scServicesB;
scServicesB = ServiceController.GetServices();
foreach (ServiceController scTempB in scServicesB)
{
clbB.Items.Add(scTempB.DisplayName + " (" + scTempB.ServiceName + ")" + "\r\n");
cuentaB += 1; }
lblCuentaB.Text = cuentaB.ToString();
if (scServicesA.Equals(scServicesB)) MessageBox.Show("Son IGUALES");
else MessageBox.Show("Son DISTINTOS");
}
}
Thanks,
Fernando
|
|
|
|
|
Well, scServicesB and scServicesA are both arrays. They will never be equal because they are distinct object. Are you trying to compare the elements in those arrays for equality?
|
|
|
|
|
Yes, I want to compare the values, no the references. I get the services, and write they in scServiceA (imagine 2 services, serviceone and servicetwo). After 5 minutes I get the services again, but write they in scServiceB, and compare scServiceA and scServiceB for know what serviceone and servicetwo are.
Thanks,
Fernando
|
|
|
|
|
Why not just compare the elements? Something like:
if(scServiceA[0] == scScerviceB[0] && scService[1] == scServiceB[1])
{
}
Is that what you're trying to do?
|
|
|
|