Click here to Skip to main content
15,891,473 members
Home / Discussions / C#
   

C#

 
GeneralMultiple entrys in zip, memory not being released ! Pin
Daniel Negron18-Feb-04 8:04
Daniel Negron18-Feb-04 8:04 
GeneralRe: Multiple entrys in zip, memory not being released ! Pin
Daniel Negron18-Feb-04 11:12
Daniel Negron18-Feb-04 11:12 
GeneralRe: Multiple entrys in zip, memory not being released ! Pin
Heath Stewart19-Feb-04 3:12
protectorHeath Stewart19-Feb-04 3:12 
GeneralSaving JPG File Pin
Mr_Mike18-Feb-04 7:49
Mr_Mike18-Feb-04 7:49 
GeneralRe: Saving JPG File Pin
Mazdak18-Feb-04 7:56
Mazdak18-Feb-04 7:56 
GeneralCheckBoxItem DataBinding problems Pin
ParrotBoy18-Feb-04 7:04
ParrotBoy18-Feb-04 7:04 
GeneralRe: CheckBoxItem DataBinding problems Pin
Heath Stewart18-Feb-04 11:18
protectorHeath Stewart18-Feb-04 11:18 
GeneralHiding a Fullscreen App (game) Pin
Kir Birger18-Feb-04 6:27
Kir Birger18-Feb-04 6:27 
Excuse my ignorance, i'm quite a novice to programmingSmile | :)

my problem is i can't get my program to find the appropriate window handle for it to hide/minimize when the game is in fullscreen.... it will do it fine in windowed mode (i use process.mainWindowHandle property), but after i fullscreen it (Even if i go back) it won't find the right handle again...

i've seen pieces of code using the FindWindow(string window class, string window name) method from the Windows API (user32.dll) but it will return something well out of the bounds of a window handle (way out of the bounds of an integer :p )


so i made a class that is derived from a process.. i added a method called ToggleState()
(note, hWND is also set to "this.MainWindowHandle" in the constructor of the class)

<br />
public void ToggleState()<br />
{<br />
		<br />
	if ( IsWindowVisible(hWND) != 0 )<br />
	{<br />
	this.hWND = (int) this.MainWindowHandle;<br />
							ShowWindow(this.hWND, SW_HIDE );<br />
	}<br />
		<br />
                else if ( IsWindowVisible(hWND ) == 0 )<br />
	{<br />
						ShowWindow(hWND, SW_RESTORE );<br />
	SetForegroundWindow(hWND);<br />
	}<br />
}<br />


In summary: if i launch the game in windowed mode, it will work indefinately, but then if i fullscreen it (or start in fullscreen) it will cease to function (even if i go back to windowed)

i've tried other alternatives, like creating a new process object and doing GetProcessByName and then getting the main handle of THAT (still no luck)

Thanks for your time anybody who reads thisBig Grin | :-D
GeneralRe: Hiding a Fullscreen App (game) Pin
Heath Stewart18-Feb-04 10:45
protectorHeath Stewart18-Feb-04 10:45 
GeneralAutomation Pin
yyf18-Feb-04 5:46
yyf18-Feb-04 5:46 
GeneralRe: Automation Pin
Mazdak18-Feb-04 6:03
Mazdak18-Feb-04 6:03 
GeneralRe: Automation Pin
Heath Stewart18-Feb-04 10:30
protectorHeath Stewart18-Feb-04 10:30 
GeneralRe: Automation Pin
yyf19-Feb-04 3:13
yyf19-Feb-04 3:13 
GeneralRe: Automation Pin
Heath Stewart19-Feb-04 3:20
protectorHeath Stewart19-Feb-04 3:20 
GeneralRe: Automation Pin
yyf19-Feb-04 8:13
yyf19-Feb-04 8:13 
GeneralRe: Automation Pin
Heath Stewart19-Feb-04 8:44
protectorHeath Stewart19-Feb-04 8:44 
Generalopen shared folder Pin
elite2k18-Feb-04 5:35
elite2k18-Feb-04 5:35 
GeneralRe: open shared folder Pin
CWIZO18-Feb-04 6:56
CWIZO18-Feb-04 6:56 
GeneralRe: open shared folder Pin
Heath Stewart18-Feb-04 10:20
protectorHeath Stewart18-Feb-04 10:20 
GeneralRe: open shared folder Pin
Heath Stewart18-Feb-04 10:24
protectorHeath Stewart18-Feb-04 10:24 
GeneralRe: open shared folder Pin
elite2k18-Feb-04 21:49
elite2k18-Feb-04 21:49 
GeneralRe: open shared folder Pin
Heath Stewart19-Feb-04 3:48
protectorHeath Stewart19-Feb-04 3:48 
GeneralProgressBar into StatusBar Pin
Weiye Chen18-Feb-04 4:29
Weiye Chen18-Feb-04 4:29 
GeneralRe: ProgressBar into StatusBar Pin
Heath Stewart18-Feb-04 4:51
protectorHeath Stewart18-Feb-04 4:51 
GeneralRe: ProgressBar into StatusBar Pin
Weiye Chen27-Feb-04 17:53
Weiye Chen27-Feb-04 17:53 

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.