Prev: dhSqliteDemo
Next: Scientific to Decimal
From: Karl E. Peterson on 30 Nov 2009 16:27 Rick Raisley wrote on 11/30/2009 : > <shudder>subclassing</shudder> > > I think I'm subclassing challenged. I avoid it like the plague, probably > because of the IDE crashing problems when breaking to change code (which I do > /all/ the time). > > If that's the only way, I'm afraid I'll have to leave this feature out. :-( See http://vb.mvps.org/samples/SysInfo - it's pretty darned easy. Drop three modules into your app, rig it so that you create a global instance of CSysInfoGeneral, and any object that wants to listen in can. -- [.NET: It's About Trust!]
From: Rick Raisley on 30 Nov 2009 16:35 "Bob Butler" <noway(a)nospam.ever> wrote in message news:%23kMWFOgcKHA.4884(a)TK2MSFTNGP04.phx.gbl... > > "Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message > news:eO8b8HgcKHA.612(a)TK2MSFTNGP06.phx.gbl... >> <shudder>subclassing</shudder> >> >> I think I'm subclassing challenged. I avoid it like the plague, probably >> because of the IDE crashing problems when breaking to change code (which >> I do /all/ the time). >> >> If that's the only way, I'm afraid I'll have to leave this feature out. >> :-( > > Code it so the subclassing is only done when the app is not running in the > IDE and/or get used to saving often! > Then I won't be able to implement and debug in the IDE, so that's not so desirable. Aw shucks! I thought this would be doable (without subclassing). ;-) Thanks for all the neat subclassing links, though, guys. -- Regards, Rick Raisley heavymetal-A-T-bellsouth-D-O-T-net
From: Karl E. Peterson on 30 Nov 2009 17:13 Rick Raisley explained on 11/30/2009 : >> Code it so the subclassing is only done when the app is not running in the >> IDE and/or get used to saving often! > > Then I won't be able to implement and debug in the IDE, so that's not so > desirable. Aw shucks! I thought this would be doable (without subclassing). > ;-) You can implement and debug in the IDE. Just subclass a window that doesn't get a lot of messages, like ThunderMain. It's really not that bad, and once you get it working as you want then turn off the hook in the IDE? -- [.NET: It's About Trust!]
From: Nobody on 30 Nov 2009 17:45 "Rick Raisley" <heavymetal-A-T-bellsouth-D-O-Tnet> wrote in message news:eO8b8HgcKHA.612(a)TK2MSFTNGP06.phx.gbl... > <shudder>subclassing</shudder> > > I think I'm subclassing challenged. I avoid it like the plague, probably > because of the IDE crashing problems when breaking to change code (which I > do /all/ the time). > > If that's the only way, I'm afraid I'll have to leave this feature out. > :-( Use this function to skip the subclassing when running in the IDE, so it doesn't crash: http://vbnet.mvps.org/code/core/isinide.htm
From: mscir on 30 Nov 2009 17:44
Rick Raisley wrote: > I'm embarrassed to ask this, but things aren't working quite as I expected. > I want to run some non-trivial code (non-trivial here means it can take a > bit of time to do) whenever a user goes back to my running program. > Basically, he could have changed the document loaded in another (non-VB) > program, and I want to see if that has happened, and if so, get information > on the active document from that program. > > Anyhow, I thought that the Form_Activate event might work, or Form_GotFocus, > but both of those don't fire when the form isn't changed (this simple > program only has one form). Form_Paint works, but fires hundreds of times, > so is not what I want. > > What can I use to determine that the user has gone back to my running app, > and as he/she may have changed the document in the other app, I would then > do a check to see if it's changed? Minimize the program when the calculations start, show just the calculation progress percentage complete in the title so it can be monitored in the taskbar, and watch for the windowstate to be changed from minimized to something else. |