Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

halo

Name: Anonymous 2008-08-15 3:36

so I wrote a program in c# to keep rerolling character stats in a baldurs gate 2 window after finding them in memory and adding them up, and it works fine, except for one part of it..

I have an output box (created using a RichTextBox in a form) that shows how many times it's rerolled, current stats, best roll so far, etc but it doesn't work properly.

the program simulates mouse clicks on the reroll button and for some reason it will work and update and display the form for a short time and then the title bar of the form will turn that sort of faded blue like it lost focus and it won't display anything until the program is finished running.

I've tried using the form methods Show, BringToFront, Activate, SetTopLevel(true) setting TopMost=true and Focus, basically anything likely sounding, even right in the main loop but it still happens regularly some 5-10 seconds into running the program.

tl;dr I need a way of making a form in c# display and update when it's not focused, or to somehow keep focus while still letting me click another application? gah

Name: Anonymous 2008-08-15 15:39

>>4
application.DoEvents() worked great, thanks! I'm gonna try a version using the idle event just to see how that works, not that the program really needs to be perfect.

>>6
I'm hardly out there in industry, but isn't java pretty much dominating the job market? i'm pretty sure the community doesn't need another pre college grad writing awful code.

besides, 3 years into a computer engineering degree (out of 5.. that's how long it takes to get a bachelors at RIT, with the co-oping they make you do) they're finally going to be teaching me C. the community college I went to first only taught java, which is sort of irrelevant in my future field :( With any luck I wont have to touch java again.

but anyway.. the results: it took 42745 rolls to get enough stat points for 18's in everything but charisma, and a /98 strength modifier. not bad. kensai/mage here i come :)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List