|
Is an error thrown? Perhaps you can quote this part of your code. It's hard to guess the mistake, when you don't know what was done?!
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
how can i open a online web page through desktop application by clicking a button.
Raheel Iqbal
|
|
|
|
|
You don't have to ask the same question more than one time within an hour. Other wait some hours, a whole day or more before the question is answered. And they don't start you new thread every thirty minutes.
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
Well I started a test and tried:
System.Diagnostics.Process.Start("http://www.google.de/");
This should start your Browser with the Google Homepage.
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
How can i hide my form when the user clicks the Close (X) button? What should i write and under which event?
|
|
|
|
|
on form close event you have to write,
this.hide();
Raheel Iqbal
|
|
|
|
|
You should catch the FormClosing event (under Net 1.1 it's just calledc closing event I think):
<br />
private void FormTest_FormClosing(object sender, FormClosingEventArgs e) {<br />
e.Cancel = true;<br />
this.Hide();<br />
}<br />
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
I've tried using your code but I'm a small problem - I'm using a notify icon class in my project and when i click the close button, my aplication exits instead of hiding.
|
|
|
|
|
Well I don't know the nofiyicon class but I don't know if this changes somtehing. I tested my code again and my form isn't closed. I put a timer on the form and I'm able to show this form again.
What does the NotifyIcon Class on your Form?
Greetings,
Ingo
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
what an idiot I am. I totally forgot to add the e.cancel = true; My bad.
|
|
|
|
|
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
if i set e.cancel = true and this.hide() then the form will not closing..and still it is visible.. i wrote the code in formClosing Event.. Any ideas..
Regards,
Saravanna
|
|
|
|
|
how can i redirect to a web page by clicking a button of desktop application, can any one help me what method should i follow.
Raheel Iqbal
|
|
|
|
|
I have made a button on my main form and I want it to show a ContextMenu when the button is clicked, not when you Right click it. Like start button on windows
In the end we're all just the same
|
|
|
|
|
Catch the MouseDown / MouseUp events there you can call a context menu even when the left Mousebutton is pressed.
<br />
private void btnMenu_MouseDown(object sender, MouseEventArgs e) {<br />
btnCreateReport.ContextMenuStrip = cmnStartMenu;<br />
this.btnCreateReport.ContextMenuStrip.Show(this.Location.X + btnMenu.Location.X + e.X, this.Location.Y + btnMenu.Location.Y + e.Y);<br />
} <br />
Where cmnStartMenu is a ContextMenuStrip
------------------------------
A bug in a Microsoft Product? No! It's not a bug it's an undocumented feature!
|
|
|
|
|
Thanks.
Now I would like this menu to be twice the size when it appears. How would you do this?
Also how would you add a sound to this menu so when you click the button, a sound is played?
In the end we're all just the same
-- modified at 8:10 Wednesday 8th February, 2006
|
|
|
|
|
|
I have a problem with the code:
private void btnMenu_MouseDown(object sender, MouseEventArgs e) {
btnCreateReport.ContextMenuStrip = cmnStartMenu;
this.btnCreateReport.ContextMenuStrip.Show(this.Location.X + btnMenu.Location.X + e.X, this.Location.Y + btnMenu.Location.Y + e.Y);
}
AN error message says:
Cannot find this.Location on Information_Device form and its the same with btnCreateReport what should I do?
In the end we're all just the same
|
|
|
|
|
Here is the error I get when I impliment the code:
The type or namespace 'btnCreateReport' could not be found (are you missing a using directive or an assembly refference?)
Information_Device.MainMenu does not contain a definition for btn_CreateReport
MainMenu is name of form with button on it.
What is 'btn_CreateReport?'
Aslo I forgot to say that I'm using Visual C# .net 2003, not 2005
In the end we're all just the same
-- modified at 5:28 Monday 6th March, 2006
|
|
|
|
|
Hi friends,
I am developing windows based application.. I am using ListBox in my application.. I dont know how to insert the images in the listbox control items.. I want to display seperate images for the items in the listbox.. Any help or suggesstion is helpful to do that..
Thanks in advance
Regards,
SAravanan
|
|
|
|
|
First, create a class that contains image, something like this:
<br />
public class ListBoxItem {<br />
<br />
public Image img;<br />
public string text;<br />
<br />
public override ToString() {<br />
return text;<br />
}<br />
}<br />
Then you need to create owner-drawn ListBox (which iherits a ListBox class).
First, set DrawMode property to OwnerDrawFixed or OwnerDrawVariable (i like the second one).
Then you need to override OnMeasureItem and OnDrawItem methods. Make sure, you've set right size for the item in measuring method so you can draw it properly later. If you want to use images with alpha channel, use ImageList.Draw which can do the job.
|
|
|
|
|
Will u please post the code.. because i am a newbiew to C#.Net
Thanks for ur help
Regards,
Saravanan
|
|
|
|
|
I need write application, so get Ip address in local network .
How much?
Thanhk.
|
|
|
|
|
If you want to find your own Ip Address, you could use this.[^]
|
|
|
|
|
If you have DNS you could just use HostIP = System.Net.Dns.GetHostByName(ServerName);
and if you have AD, you could do a DirectorySearch of computers and get a list by name, then use that to retireve the "ServerName" for your dns lookup
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|