Click here to Skip to main content
15,917,642 members
Home / Discussions / C#
   

C#

 
GeneralRe: @ Pin
fmardani7-Jul-06 4:12
fmardani7-Jul-06 4:12 
Questiontimeout expired.timeout period elapsed prior to completion of the operation or the server is not responding [modified] Pin
ayyp7-Jul-06 3:30
ayyp7-Jul-06 3:30 
AnswerRe: timeout expired.timeout period elapsed prior to completion of the operation or the server is not responding Pin
Judah Gabriel Himango7-Jul-06 4:34
sponsorJudah Gabriel Himango7-Jul-06 4:34 
GeneralRe: timeout expired.timeout period elapsed prior to completion of the operation or the server is not responding Pin
ayyp7-Jul-06 18:41
ayyp7-Jul-06 18:41 
QuestionDataView.Find(object value) Pin
peshawarcoder7-Jul-06 3:02
peshawarcoder7-Jul-06 3:02 
QuestionDisabling "X" button in WinForm Pin
stancrm7-Jul-06 2:37
stancrm7-Jul-06 2:37 
AnswerRe: Disabling "X" button in WinForm Pin
Not Active7-Jul-06 2:58
mentorNot Active7-Jul-06 2:58 
AnswerRe: Disabling "X" button in WinForm [modified] Pin
Anh_Tuan7-Jul-06 3:02
Anh_Tuan7-Jul-06 3:02 
Depend on how you would like for it to behave

1. Handle form closing event, set e.Cancel to true Or
2. Use Win32 API
<br />
// constants for menu manipulation<br />
const int SC_CLOSE = 0xF060;<br />
const int MF_BYCOMMAND = 0x0;<br />
<br />
[System.Runtime.InteropServices.DllImport("user32.dll")]<br />
public static extern IntPtr RemoveMenu(IntPtr menuHwnd, int position, int flags );<br />
<br />
public static void EnableApplicationClose( System.Windows.Forms.Form form, bool val )<br />
{<br />
	IntPtr menu = GetSystemMenu( form.Handle, val ? 1 : 0 );<br />
	if ( !val && menu != IntPtr.Zero )<br />
		RemoveMenu( menu, SC_CLOSE, MF_BYCOMMAND );<br />
	else<br />
	{<br />
		// needed when enabling the app close box to force it to redraw.<br />
		form.Enabled = false;<br />
		form.Enabled = true;<br />
	}        <br />
}<br />
<br />
[System.Runtime.InteropServices.DllImport("user32.dll")]<br />
public static extern IntPtr GetSystemMenu(IntPtr hwnd, int bRevert);


Jup

-- modified at 9:03 Friday 7th July, 2006
QuestionError : Cannot write to a closed TextWriter Pin
adityap7-Jul-06 2:01
adityap7-Jul-06 2:01 
AnswerRe: Error : Cannot write to a closed TextWriter Pin
Judah Gabriel Himango7-Jul-06 4:39
sponsorJudah Gabriel Himango7-Jul-06 4:39 
AnswerRe: Error : Cannot write to a closed TextWriter Pin
Judah Gabriel Himango7-Jul-06 4:40
sponsorJudah Gabriel Himango7-Jul-06 4:40 
GeneralProblem - Re: Error : Cannot write to a closed TextWriter [modified] Pin
adityap9-Jul-06 20:00
adityap9-Jul-06 20:00 
QuestionPage Timers Pin
Brendan Vogt7-Jul-06 1:46
Brendan Vogt7-Jul-06 1:46 
AnswerRe: Page Timers Pin
Guffa7-Jul-06 3:57
Guffa7-Jul-06 3:57 
AnswerRe: Page Timers Pin
Dustin Metzgar7-Jul-06 4:04
Dustin Metzgar7-Jul-06 4:04 
QuestionCreating an options dialog for my WinApp. Pin
anderslundsgard7-Jul-06 1:14
anderslundsgard7-Jul-06 1:14 
AnswerRe: Creating an options dialog for my WinApp. Pin
Robert Rohde7-Jul-06 4:37
Robert Rohde7-Jul-06 4:37 
QuestionHow to get data from text box respective of text position ? Pin
praveenqwe7-Jul-06 0:52
praveenqwe7-Jul-06 0:52 
AnswerRe: How to get data from text box respective of text position ? Pin
stancrm7-Jul-06 1:03
stancrm7-Jul-06 1:03 
QuestionHow to make a Class object global?? Pin
suguimoto7-Jul-06 0:25
suguimoto7-Jul-06 0:25 
AnswerRe: How to make a Class object global?? [modified] Pin
psamy7-Jul-06 0:38
psamy7-Jul-06 0:38 
AnswerRe: How to make a Class object global?? Pin
Brendan Vogt7-Jul-06 0:42
Brendan Vogt7-Jul-06 0:42 
AnswerRe: How to make a Class object global?? Pin
Guffa7-Jul-06 3:43
Guffa7-Jul-06 3:43 
GeneralHeh, doesn't work Pin
Ennis Ray Lynch, Jr.7-Jul-06 8:23
Ennis Ray Lynch, Jr.7-Jul-06 8:23 
AnswerRe: Heh, doesn't work Pin
Guffa7-Jul-06 23:45
Guffa7-Jul-06 23:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.