|
Hi Guys,
Pls i want my program to be the topmost window when it running. And it should not respond to command keys, like Alt+F4, Alt+Tab and Ctrl+Alt+Del, that allow for the user to abruptly leave, or exit the program.
How do i accomplish this?
Thanx.
He who goes for revenge must first dig two graves.
|
|
|
|
|
Creamboy wrote: And it should not respond to command keys, like Alt+F4, Alt+Tab and Ctrl+Alt+Del
Alt+F4: You probably can disable this in some keypress event handler of your form
Alt+Tab: You need to write a keyboard hook to disable this key combination
Ctrl+Alt+Del: No way. (unless you write some Gina dll replacement)
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Greeeg wrote: Alt+Tab: You need to write a keyboard hook to disable this key combination
Please, How do i do this?
He who goes for revenge must first dig two graves.
|
|
|
|
|
|
I have do this previously. You will need a global keyboard hook. Unfortunately I do not have the code anymore. Google should provide some answers, or maybe there are an article or 2 on CodeProject.
|
|
|
|
|
As to Alt-F4:that has been asked a couple of times already this year and this time I don't feel like looking for the other posts,
and I forget who here pointed me in the right direction, so...
private const System.Int32 SC_CLOSE = 0xF060 ;
private const System.Int32 MF_ENABLED = 0x0000 ;
private const System.Int32 MF_GRAYED = 0x0001 ;
[
System.Runtime.InteropServices.DllImportAttribute
(
"User32"
,
SetLastError=true
,
EntryPoint="GetSystemMenu"
)
]
private static extern System.IntPtr
API_GetSystemMenu
(
System.IntPtr hWnd
,
System.Boolean bRevert
) ;
[
System.Runtime.InteropServices.DllImportAttribute
(
"User32"
,
SetLastError=true
,
EntryPoint="EnableMenuItem"
)
]
private static extern System.Int32
API_EnableMenuItem
(
System.IntPtr hMenu
,
System.UInt32 uIDEnableItem
,
System.UInt32 uEnable
) ;
public static bool
DisableSystemMenuClose
(
System.Windows.Forms.Form Target
)
{
return ( API_EnableMenuItem
(
API_GetSystemMenu
(
Target.Handle
,
false
)
,
SC_CLOSE
,
MF_GRAYED
) != -1 ) ;
}
public static bool
EnableSystemMenuClose
(
System.Windows.Forms.Form Target
)
{
return ( API_EnableMenuItem
(
API_GetSystemMenu
(
Target.Handle
,
false
)
,
SC_CLOSE
,
MF_ENABLED
) != -1 ) ;
}
|
|
|
|
|
I created a report with CrystalReport2005 in C#2005, the report contains a subreport, and the master report links the subreport by a grouping field (That is master report and sub report is related by the grouping field, ) when creating the linkage between the master report and subreport, then automatically generating a parameter in the subreport , It works well when I preview in the CrystalReport environment , but when I execute in the C#2005,it ask me to pass the value for the parameter. I don't know how to handle it in the C#, Could you help me on it?
Many thanks in advanced!
|
|
|
|
|
who can help me on it?
Much appreciated!
|
|
|
|
|
Thanks all, I have worked it out.
|
|
|
|
|
hi all,
can anyone please help me...im trying to pass data from my master page to the page in my content place holder...im fairly new to c# so any help would be appretiated.
thanks in advance
living life on the flip side
|
|
|
|
|
|
thnaks...i will try asp.net but i thought that this would be the right forum coz im doing it in C# code behind
living life on the flip side
|
|
|
|
|
I am new to asp.net. Iam developing a webapplication in which i use a dynamically generated table control. I add rows into it, according to the data retrieved from the database. but when i try to resubmit the values in the table to the database, only the value in the last row is getting submitted. How can i sort out this problem??
|
|
|
|
|
I guess you're new to these forums too. Please ask ASP.NET questions in the ASP.NET forum, and there only.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi all,
Suppose i have 5 text boxes among all , i want to edit first two with some special condition rest are can be edited when form load ... so while loading am setting some default value bit dont want to edit first two text box so what the property or code need to be applied here ..
textbox1.disabled could work but i dont have disabled property here ...
please help me ..
vikas da
|
|
|
|
|
Thank all who looked into my problem ...i got the solution textbox1.ReadOnly=true
vikas da
|
|
|
|
|
Use a maskedtextbox.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
Hi,
I'm adding a button to an existing app. I need to open a new window once this button is clicked. The new button has been added to an existing User Control and takes on all the attributes of the other buttons. Great.
I need to add an onClick event to my button in the code behind that will open a new browser via some javascript (window.open). When I add it it and run the code it renders the button with 2 onClick events (1 from the global attributes of the user control I guess) My onClick doesn't funtion (not a shock) I know I can have 2 functions running on 1 onClick - I separate with a semi-colon - how do I merge my onClick event into the existing one? Attribute.Add("onClick"),myButton creats a new one.
Any ideas welocme !!
Thanks
|
|
|
|
|
I'm glad you said code behind, or I may not have worked out that you're in the wrong forum. ASP.NET questions go in the.....
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
I'm glad when I said code-behind I meant C#, i'll keep it here..
|
|
|
|
|
How can i get all the machines IP of my LAN.
modified on Wednesday, July 9, 2008 7:40 AM
|
|
|
|
|
Get the network mask of your current IP, then enumerate through all the combination's in your subnet pinging each one for a response.
If you have no idea what I am talking about, read up on how IP networks work.
|
|
|
|
|
string hostname = Dns.GetHostName();
IPHostEntry ipentry = new IPHostEntry();
ipentry = Dns.GetHostEntry(hostname);
IPAddress[] ip = ipentry.AddressList;
for (int i = 0; i < ip.Length; i++)
{
string d = ip[i].ToString();
}
I found this program, will u tell me any other option
i have checked the command
net view
it displays all the machines of ur network
some thing like that i want to make
|
|
|
|
|
Hello everyone,
When executing !bpmd command in WinDbg, there is error like this, any ideas?
(there is no such error, if I start to run the application, and break in the middle of running, then type !threads again. My purpose is to use !bpmd command to set breakpoint before the application runs, so this situation makes me inconvenient.)
0:000> !bpmd
Failed to find runtime DLL (mscorwks.dll), 0x80004005
Extension commands need mscorwks.dll in order to have something to do.
thanks in advance,
George
|
|
|
|
|
Sounds like .NET is not installed, or in your PATH.
|
|
|
|