Click here to Skip to main content
15,899,313 members
Home / Discussions / C#
   

C#

 
GeneralRe: String of Bits to Byte[ ] Conversion Pin
Robert Rohde23-May-05 20:33
Robert Rohde23-May-05 20:33 
GeneralRe: String of Bits to Byte[ ] Conversion Pin
gordsh24-May-05 15:51
gordsh24-May-05 15:51 
GeneralShow hidden forms Pin
methodincharge23-May-05 13:30
methodincharge23-May-05 13:30 
GeneralRe: Show hidden forms Pin
Rob Tomson23-May-05 13:42
Rob Tomson23-May-05 13:42 
GeneralRe: Show hidden forms Pin
methodincharge23-May-05 13:56
methodincharge23-May-05 13:56 
GeneralRe: Show hidden forms Pin
Skynyrd24-May-05 6:55
Skynyrd24-May-05 6:55 
GeneralRe: Show hidden forms Pin
methodincharge24-May-05 7:38
methodincharge24-May-05 7:38 
GeneralRe: Show hidden forms Pin
Skynyrd24-May-05 21:41
Skynyrd24-May-05 21:41 
U dont set Form.ActiveForm to anything. Its a read only property so u can't set it anyways. U read its value to know which form in ur application is the Operating System's active window. If the value u read is Null that means the active window is an external window to ur application or it could be that there really is no active window.

System.Windows.Forms.Form.ActiveForm[^]

When ur timer in Form B (which has started when Form B has been deactivated) triggers the Tick event for the first time, the event Handler which u should include in Form B should check for the static memeber Form.ActiveForm as I posted before.

After that its just a question of style. U can either make a public get/set property in either FormA (SnapBackToB) or in FormB (SnapBackToMe) or whatever. In the first case, when A activates it would: 1) Check if Form B is open 2)check its own property and if true it would give focus to Form B. On the other hand if property was in FormB, FormA would check when it activates: 1) If Form B is open 2) If FormB's SnapBackToMe is true, it would give focus to B. As I said before, this is a question of style and there are many many ways to implement this.

Of course there r some details i havent touched like handling correctly what happens when Form B is closed and not only loosing focus (remember that the Deactivate event triggers when closing a form too) and u dont want ur SnapBackToX property to remain true when ur form B is closing....but u should be able to sort that out without too many problems.
GeneralRe: Show hidden forms Pin
methodincharge25-May-05 2:02
methodincharge25-May-05 2:02 
GeneralRe: Show hidden forms Pin
methodincharge25-May-05 14:03
methodincharge25-May-05 14:03 
GeneralShow xml node in text box without losing formatting Pin
PrachiB23-May-05 12:41
PrachiB23-May-05 12:41 
GeneralRe: Show xml node in text box without losing formatting Pin
DavidNohejl23-May-05 12:58
DavidNohejl23-May-05 12:58 
GeneralRe: Show xml node in text box without losing formatting Pin
PrachiB23-May-05 13:16
PrachiB23-May-05 13:16 
GeneralRe: Show xml node in text box without losing formatting Pin
J4amieC23-May-05 21:42
J4amieC23-May-05 21:42 
GeneralRe: Show xml node in text box without losing formatting Pin
DavidNohejl23-May-05 23:24
DavidNohejl23-May-05 23:24 
GeneralRe: Show xml node in text box without losing formatting Pin
eggie524-May-05 12:58
eggie524-May-05 12:58 
Generaltextbox transparent Pin
Sasuko23-May-05 12:07
Sasuko23-May-05 12:07 
GeneralRe: textbox transparent Pin
Christian Graus23-May-05 12:18
protectorChristian Graus23-May-05 12:18 
GeneralDrawing cube with directx Pin
Kiki9923-May-05 11:50
Kiki9923-May-05 11:50 
GeneralRe: Drawing cube with directx Pin
Christian Graus23-May-05 12:20
protectorChristian Graus23-May-05 12:20 
Generalexception not catching Pin
Rob Tomson23-May-05 11:39
Rob Tomson23-May-05 11:39 
GeneralRe: exception not catching Pin
Christian Graus23-May-05 12:00
protectorChristian Graus23-May-05 12:00 
GeneralRe: exception not catching Pin
Rob Tomson23-May-05 12:05
Rob Tomson23-May-05 12:05 
GeneralRe: exception not catching Pin
Christian Graus23-May-05 12:16
protectorChristian Graus23-May-05 12:16 
GeneralRe: exception not catching Pin
Rob Tomson23-May-05 12:32
Rob Tomson23-May-05 12:32 

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.