|
Thank You very much.
It works fine...
Rahul Kulkarni
|
|
|
|
|
I am having a problem on MS Vista with balloon tips not showing, even with simple code like:
notifyIcon1.ShowBalloonTip(3000, "Test", "This is a test ", ToolTipIcon.Info);
Is there a new peice of code I should be using?
Thanks, Ben.
|
|
|
|
|
Are you using the Enable Visual Styles in your application?
[STAThread]<br />
static void Main() <br />
{<br />
Application.EnableVisualStyles();<br />
Application.Run(new Form1());<br />
}
|
|
|
|
|
hi,
how can i hide the exit, minimize and maximize buttons that appear on the top right side of the scree inside the title bar of the form. And if it is possible, also tell me how to modify the code and the action that those button do when clicked.
thanks in advance
jamil abou khalil
|
|
|
|
|
to remove. go to publishing Designer selects the form and change the property ControlBox to false.
to intercept.
public const int WM_SYSCOMMAND = 0x0112;
public const int SC_CLOSE = 0xF060;
protected override void WndProc(ref Message m)
{
if( m.Msg == WM_SYSCOMMAND)
{
if( (int) m.WParam.ToInt32() == SC_CLOSE )
{
if (ProjectIsOpen)
{
return;
}
else
{
this.Close();
Application.Exit();
}
}
}
base.WndProc (ref m);
}
|
|
|
|
|
hi,
first thanks for your reply. second i want to ask you a more detailed question. what if i want to hide only the close button and the maximize button and keep the minimize button. The property ControlBox when set to false hides the three buttons together even if i try to set the maximizebox to true it want appear.
i hope u have a solution for that.
jamil abou khalil
|
|
|
|
|
try it.
private const int SC_CLOSE = 0xF060;
private const int SC_MAXIMIZE = 0xF030;
private const int SC_MINIMIZE = 0xF020;
private const int SC_RESTORE = 0xF120;
private const int MF_GRAYED = 0x1;
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert);
[System.Runtime.InteropServices.DllImport("user32.dll")]
private static extern int EnableMenuItem(IntPtr hMenu, int wIDEnableItem, int wEnable);
private void Disable_opt()
{
EnableMenuItem(GetSystemMenu(this.Handle, false), SC_CLOSE, MF_GRAYED);
EnableMenuItem(GetSystemMenu(this.Handle, false), SC_MAXIMIZE, MF_GRAYED);
EnableMenuItem(GetSystemMenu(this.Handle, false), SC_MINIMIZE, MF_GRAYED);
EnableMenuItem(GetSystemMenu(this.Handle, false), SC_RESTORE, MF_GRAYED);
}
|
|
|
|
|
In C Language how can we do the following..
conversion of the (int) to char
conversion of the (int) to (unsigned char) ------------interger to unsigned char
conversion of the (int) to (unsigned char *) ----------------interger to unsigned char pointer
Thanks..
|
|
|
|
|
Wrong message board
"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
|
|
|
|
|
Perhaps you should ask this in the C forum instead.
---
b { font-weight: normal; }
|
|
|
|
|
Hello all,
I have written a small windows form application in .NET 2005 using C#.
Now i have to include a functionality of automatic logging off in that application. Will u guys please help me to know whether is there any support already in .NET to do that, or should i do it through threads.
Please help me. Its very urgent. Ur help will be greatly appreciated.
Thanks and Regards
Pavan Joshi
|
|
|
|
|
|
Hi Buddies,
Could somebody help me in implementing a screenlock?
What I'm trin' to do is, if the user is not interacting with the system for a stipulated time I need to lock the screen, thereby forcing the user to enter his password to unlock the system.
Thanks to all in Advance
|
|
|
|
|
Hello,
Fast solution: create a full screen TopMost window with passwordbox.
All the best,
Martin
|
|
|
|
|
funny
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
HI GUYS,
FIRST OF ALL THANKS FOR THE REPLY.....
ISN'T IT POSSIBLE TO CALL SOME WINDOWS API THAT CAN DO THIS JOB FOR ME?
BUT I DONT HAVE ANY IDEA OF WHICH API OR HOW?
OR JUST PUT IT THE OTHER WAY...
HOW DOES Windows SCREENLOCK WORK? ANY IDEA?
|
|
|
|
|
Hi!
The corresponding Win32 function is called LockWorkStation and located in user32.dll .
You can simply use this code:
using System.Runtime.InteropServices;
public class ScreenLock
{
[DllImport("user32.dll")]
public static extern bool LockWorkStation();
}
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
thanks mav.
But how do I know the system idle time?
Does the API does it by itself(I hope no).....?
If I use Application.Idle definitely its not gonna to work.
Is there anything like System.Idle ?
thanks once again for the help & still look forward to you suggestions...
|
|
|
|
|
Hi,
Can you please tell me how can I go to the last visited tab (not the first one, as the default tabControl behaver is) when the current tab is removed?
Your help would be greatly appreciated.
|
|
|
|
|
hi,
try saving the index of the last visited tabcontrol in a global variable. it is easy to do. Declare a global variable and use the tab index change event. and asign the past index to the variable when this index changes to another.
hope it helps
jamil abou khalil
|
|
|
|
|
to use a variable doesn't just solve the problem. for instance if you turn off 2 or more tabs consecutively it won't work.
if you use a routine that allows to include and to remove several tabs then it should use a LIFO.
when eliminating a tab it removes all the occurrences of this in the LIFO and go back to the last tab of the LIFO.
|
|
|
|
|
Hi All,
i am creating a Desktop application using Microsoft Visual Studio .NET 2005..
i am using .sdf file as my database..and using typed dataset for querying data..
my problem is that when i am making changes to my records (add new, deleted, updated) then the changes reflects only till my application is running when i restart the application then i am not getting my changes...
i am using TableAdapter.Update(Datatbale) to update..
please tell me wheather i need to use any other method..
Amandeep Kirar
New Delhi, India
|
|
|
|
|
Hi ALL,
We have a standalone application which was developed in C#.Net.
Now we want to develop the same as an Eclipse Plug-in.
Since I'm a beginner to Java & its related technologies,
if you could suggest me a good way to do this,
it would be highly appreciated.
In this regard, I have the following specific queries:
1) Will I get the similar look-and-feel (atleast to the nearest)
in my Eclipse plugin?
2) Is there a Java counterpart to most of the .Net components
(Properties editor, Grid view, etch.,) ?
3) Is there any tools available to convert a .Net application
into a Java application? If so, to what extent it would be helpful?
Kindly bear my newbie-questions.
Thanks in advance,
Sarvan AL
|
|
|
|
|
1 - I dunno, but it won't be exact, as Eclipse uses horrid Java UI components
2 - No.
3 - No.
|
|
|
|
|
Can you please tell me why is that and how can I solve it?
if (backgroundWorker.IsBusy) <br />
System.Diagnostics.Process.GetCurrentProcess().Kill(); <br />
Application.Exit();
Does the work, but I have a feeling that this is not a proper way to do it!
Please help. Thank you in advance.
|
|
|
|