Click here to Skip to main content
15,890,557 members
Home / Discussions / C#
   

C#

 
GeneralRe: move ball in c# form with timer Pin
saeedjaafari13-Apr-12 4:04
saeedjaafari13-Apr-12 4:04 
GeneralRe: move ball in c# form with timer Pin
vishal ch surve13-Apr-12 22:31
vishal ch surve13-Apr-12 22:31 
GeneralRe: move ball in c# form with timer Pin
vishal ch surve13-Apr-12 22:34
vishal ch surve13-Apr-12 22:34 
AnswerRe: move ball in c# form with timer Pin
Luc Pattyn13-Apr-12 6:19
sitebuilderLuc Pattyn13-Apr-12 6:19 
GeneralRe: move ball in c# form with timer Pin
saeedjaafari13-Apr-12 6:54
saeedjaafari13-Apr-12 6:54 
QuestionHelp Pin
Amaan2313-Apr-12 2:43
Amaan2313-Apr-12 2:43 
AnswerRe: Help Pin
TenmanS1413-Apr-12 4:02
TenmanS1413-Apr-12 4:02 
GeneralRe: Help Pin
Amaan2313-Apr-12 4:59
Amaan2313-Apr-12 4:59 
Questionnew learner Pin
lawal olanrewaju Daniel13-Apr-12 2:19
lawal olanrewaju Daniel13-Apr-12 2:19 
AnswerRe: new learner Pin
Not Active13-Apr-12 2:28
mentorNot Active13-Apr-12 2:28 
AnswerRe: new learner Pin
V.13-Apr-12 2:32
professionalV.13-Apr-12 2:32 
AnswerRe: new learner Pin
BobJanova13-Apr-12 2:39
BobJanova13-Apr-12 2:39 
QuestionHow can we delegate an array Pin
Fred 3413-Apr-12 2:06
Fred 3413-Apr-12 2:06 
AnswerRe: How can we delegate an array Pin
V.13-Apr-12 2:31
professionalV.13-Apr-12 2:31 
GeneralRe: How can we delegate an array Pin
Fred 3413-Apr-12 3:44
Fred 3413-Apr-12 3:44 
GeneralRe: How can we delegate an array Pin
V.13-Apr-12 3:46
professionalV.13-Apr-12 3:46 
QuestionCorrectly Disposing of MDI Child Forms. Pin
cjb11013-Apr-12 0:29
cjb11013-Apr-12 0:29 
AnswerRe: Correctly Disposing of MDI Child Forms. Pin
BobJanova13-Apr-12 2:37
BobJanova13-Apr-12 2:37 
GeneralRe: Correctly Disposing of MDI Child Forms. Pin
cjb11015-Apr-12 21:51
cjb11015-Apr-12 21:51 
QuestionPaging in SQL Pin
Billa212-Apr-12 20:41
Billa212-Apr-12 20:41 
AnswerCross posted from Database forum Pin
Pete O'Hanlon12-Apr-12 22:18
mvePete O'Hanlon12-Apr-12 22:18 
QuestionProjectProblem Pin
Madhavsingh12-Apr-12 19:26
Madhavsingh12-Apr-12 19:26 
AnswerRe: ProjectProblem Pin
egenis12-Apr-12 20:01
egenis12-Apr-12 20:01 
QuestionAlwaysOnTop behavior - Windows Forms vs. Win32? Pin
Ravi Bhavnani12-Apr-12 18:59
professionalRavi Bhavnani12-Apr-12 18:59 
I have an MFC desktop app that implements the "Always On Top" feature by calling:
bool bOnTop = ...
CWnd* pWndOnTop = (CWnd *) (bOnTop ? &CWnd::wndTopMost : &CWnd::wndNoTopMost);
SetWindowPos (pWndOnTop, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
This works as expected.  Regardless of whether or not the app is always on top of other windows, all child dialogs (both modal and modeless) are shown on top of the app's main window.

A Windows Forms version of the app attempts to do the same thing by P/Invoking SetWindowPos().  Although the app's main window responds as expected, all modal child Forms (both modal and modeless) fail to appear on top of the app's main window, and are instead occluded by the topmost main Form.  I tried setting Form.TopMostand Form.TopLevel instead of calling SetWindowPos() but am still unable to display the modal child Forms on top of the main Form.

I've Googled far and wide and have browsed both SO and MSDN to no avail.  A nudge in the right direction would be appreciated.  I'd hate to have to nix this feature because of a problem with .NET.  (I'm sure it's me and not .NET, but I'm at my wit's end.)

Thanks for any pointers you can send my way.

/ravi
My new year resolution: 2048 x 1536
Home | Articles | My .NET bits | Freeware
ravib(at)ravib(dot)com


modified 13-Apr-12 1:19am.

AnswerRe: AlwaysOnTop behavior - Windows Forms vs. Win32? Pin
Alan N12-Apr-12 23:21
Alan N12-Apr-12 23:21 

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.