Click here to Skip to main content
16,005,099 members
Home / Discussions / C#
   

C#

 
GeneralString of Bits to Byte[ ] Conversion Pin
gordsh23-May-05 15:59
gordsh23-May-05 15:59 
GeneralRe: String of Bits to Byte[ ] Conversion Pin
S. Senthil Kumar23-May-05 18:11
S. Senthil Kumar23-May-05 18:11 
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 
Its a tricky problem because u dont want the form snapping back to B when ur only activating A and not an external app.

Still, i think u can do it this way (havent tried it but it looks pretty sound):

Create a timer in the B Form with a low interval. 1-10 miliseconds will do.
When B looses focus (deactivates), start timer and in the Tick handler check for the static member Form.ActiveForm and stop ur timer. If ActiveForm is FormA then dont do anything. If ActiveForm gives u Null then the active window is no longer part of ur app and u should set a property in ur A Form, for example SnapBackToB to true.

Whenever A handles and Activate event, check for _snapBackToB and if true, activate Form B.

That should do it.

Oh, one other thing, when Form B activates, it should always check for SnapBackToB in form A and set it to False.

GL, and if things dont work at all as I/u expect please let me know :p

P.D. Its important u stop the timer after first tick because, even if it doesnt harm the algorithm, a timer running with that small interval may not let windows detect correctly ur idle app and u might have issues with power management, screensavers, etc.
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 
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 

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.