|
Try " is null" instead.
---
b { font-weight: normal; }
|
|
|
|
|
yep this is the solution!
|
|
|
|
|
I want to cancel the minimize event and instead minimize to tray....
Thanks in advice
Alocto
:-DProgramming is heaven
|
|
|
|
|
I believe this should do the trick, just use the Forms Resize event since it is called when the Form is minimised.
private void Form1_Resize(object sender, System.EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
this.Visible = false;
notifyIcon1.Visible = true;
}
}
|
|
|
|
|
It just dont cancel the minimize event......
Im kinda looking for a way to stop the event because it still minimizes before hiding.....
Alocto
:-DProgramming is Heaven
|
|
|
|
|
Copy the following method into your form.
protected override void WndProc(ref Message m)
{
if (m.Msg == 0x0112)
if (((int)m.WParam & 0xFFF0) == 0xF020)
return;
base.WndProc(ref m);
}
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi everyone,
I've been having a problem when using ShowDialog (more that it doesn't do what I want it to do )
I've got a main form, from which I create a child form which I want to always be available (I use Form.Show() to show it).
Later on, the main form will then show dialog forms (using Form.ShowDialog()). The problem is that doing this causes the child form (which I want to always be available) to be blocked along with the main form, so the user can only use the new dialog form.
Is there a simple way around this? I'd prefer not to have to change using ShowDialog, because I do this all over the place. Can I just change what I do with the child form I want to always be available?
Here's a quick example piece of code which has the effect I'm trying to explain:
private void MainForm_Shown(object sender, EventArgs e)<br />
{<br />
Form alwaysAvailableChild = new Form();<br />
alwaysAvailableChild.Text = "Should be Always Available";<br />
alwaysAvailableChild.Show();<br />
<br />
Form dialog = new Form();<br />
dialog.Text = "Dialog";<br />
dialog.ShowDialog();<br />
}
Cheers in advance.
|
|
|
|
|
When you show a form with ShowDialog() you will not be able to use other forms, because the form you just showed is showed like a dialog....
Which means that other forms not will be available before the dialog is closed again...
So if you just use Show() it should not give any problems....
Hope it solved your problem..
Alocto
:-DProgramming is Heaven
|
|
|
|
|
I realise that this is an easy option to solve the problem (although I'd have to manually disable the main form myself)... but I was more wondering if there was a way to have a completely "seperate" window from the rest of the application, so that when the main window shows a dialog, my "seperate" window will be unaffected.
The reason I'm asking is that I've got my application which shows dialogs here, there, and everywhere, and now I want to add a, sort of, help window, which is always available (preferably without moving it into a seperate application).
|
|
|
|
|
I think maybe you should run your help window in a seperate thread....
Hope that solved it
Alocto
:-DProgramming is Heaven
|
|
|
|
|
Thanks... that solves it!
|
|
|
|
|
hi
i want to het hardware id (motherboard,hard,cpu and ...) . how to do ?
thanks .
|
|
|
|
|
Try using WMI to get these values. You could combine them to create a unique ID too. Microsoft has a WMI generator tool that will help with the code, you can get it here: http://www.microsoft.com/downloads/details.aspx?familyid=2CC30A64-EA15-4661-8DA4-55BBC145C30E&displaylang=en
|
|
|
|
|
got ppl know how to change form bgcolor or label fontcolor which using dropdownlist????
|
|
|
|
|
iyoko wrote: got ppl know how to change form bgcolor or label fontcolor which using dropdownlist????
Your question is a little unclear.
If you mean, change either the form background colour / label font-colour when an item is selected in a dropdownlist, the you simply need to handle one of the selection changed events (SelectedIndexChanged, SelectedValueChanged or SelectionChangeCommitted). In the event handler, you can then call a method to change the colour of the target control by setting the value of the approriate property.
|
|
|
|
|
hi
I try to write a program that can add in IE .and when I open IE it running .(windows application no web application).
I want when I right click on link in IE(or another browser)when open popup menu choose an item that I add this to popup menu .this item have runnig an external program .I don't know how can add new item in right click popup menu in IE .I search about IE programming but don't arrive anythings about this.
if you know about this , please help me.
tanks
-- modified at 4:42 Sunday 22nd October, 2006
computer
|
|
|
|
|
Hi everyone,
I wrote an java applet for smart card with eclipse(3.1) ,I wrote oncard and offcard applet and I would like use the offcard applet in visual studio .I mean I need to add the offcard applet in C#,but I don't know how can I do it because I used some type in the offcard applet that they are not known in C#(such as JCTerminal or JCard or OPApplet),If anyone knows the solution please inform me.
yours sincerely ,
Orchid.
|
|
|
|
|
how could i get that in which drive windows is installed?!
|
|
|
|
|
System.Environment.SystemDirectory returns the path to the System directory... you could just get the first character.
|
|
|
|
|
You can retrieve the path of the system directory using the Environment.SystemDirectory property and extract drive information from it:
string windowsDrive = Path.GetPathRoot(Environment.SystemDirectory);
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Dear all,
I want to calculate the execution time of a certain piece of code. I noticed that the min. value I can get is the tick which is equivalent to 100 nanoseconds. I want to know what shall I do if the code takes less 100 nanoseconds, especially on fast computers? I tried to use DateTime class and TimeSpan class but they were of no use. Any help
Regards
islheg
|
|
|
|
|
If you're using .Net 2.0, there is a new class:
System.Diagnostics.Stopwatch
----------------------------
Be excellent to each other
|
|
|
|
|
That still has a resolution of at least 10-15 milliseconds.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
From MSDN:
The Stopwatch measures elapsed time by counting timer ticks in the underlying timer mechanism. If the installed hardware and operating system support a high-resolution performance counter, then the Stopwatch class uses that counter to measure elapsed time. Otherwise, the Stopwatch class uses the system timer to measure elapsed time. Use the Frequency and IsHighResolution fields to determine the precision and resolution of the Stopwatch timing implementation.
The resolution is 0.5 nanoseconds on my 2GHz system, although the overhead of calling Start and Stop seems to be about 10 microseconds.
----------------------------
Be excellent to each other
|
|
|
|
|
Well, it looks like I'm going to have to go back and read that again! :->
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|