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

Pages: 1-4041-

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 3:53

Did you enjoy writing that program?

Name: Anonymous 2008-08-15 4:14

>>1
Presumably since your program is stuck in a loop, it can't do any of the normal bookkeeping it would do with regard to responding to events or updating its display. Insert the thing what makes it process events somewhere in your loop.

Name: Anonymous 2008-08-15 5:57

Application.DoEvents() does this, though it's not really a great solution. It might be better to subscribe to the Application.Idle event and do processing in that.

Name: Anonymous 2008-08-15 6:27

>>2
yes, it was actually my first time writing code in anything other than java.. thank community college for that. some quick googling though turned up the fact that java can't access windows api functions easily which I needed so I randomly decided to download sharpdevelop and bust out some c#.

>>3
thanks for the response

>>4
thanks for the more specific response! I'll try it out tomorrow :)

Name: Anonymous 2008-08-15 11:04

>>5
Come back to Java. The community needs you.

Name: Anonymous 2008-08-15 14:21

DID YOU KNOW
..the default location for php.ini on Windows is C:\WINDOWS?

Name: Anonymous 2008-08-15 15:11

>>7
Is that even relevant to the topic, or is it just your way of saying ``I've read ``PHP for Dummies''''?

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 :)

Name: Anonymous 2008-08-15 16:02

>>9
3 years into a computer engineering degree … they're finally going to be teaching me C
Enjoy your degree. You deserve it.

Name: Anonymous 2008-08-15 16:03

3 years into a computer engineering degree … they're finally going to be teaching me C
Sorry, I forgot to BBCode.

Name: Anonymous 2008-08-15 16:15

>>10
That post is so un/prog/-like. Is there some hidden insult in it?

Name: Anonymous 2008-08-15 16:20

>>12
You don't understand /prog/.

Name: Anonymous 2008-08-15 16:23

>>12, see >11

Name: Anonymous 2008-08-15 16:24

>>14
Okay, that's the second time I’ve failed at BBCode today. I'm going to commit seppuku, goodbye /prog/.

Name: Anonymous 2008-08-15 16:35

>>15
And nothing of value was lost

Name: Anonymous 2008-08-15 17:15

>>9
Are you retarded?
Just cheat, dumbfuck.

Name: Anonymous 2008-08-15 20:13

What the fuck. I'm in computer engineering and C was our very first language. VHDL (digital design) is also in a first semester course, and assembly in the second semester. Then it goes into matlab, some JAVA for the design class, etc.

Are you sure you didn't get tricked into a software eng. (aka FLAMING RETARD) degree?

Name: Anonymous 2008-08-15 20:37

DON'T HELP HIM

Name: Anonymous 2008-08-15 20:37

VHDL is fuckin gay. Seriously, what a bunch of fucking BOLLOCKS. I had to take a course where we used VHDL and all I learned was that VHDL is a piece of shite.

Why didnt those chavs at VHDL implement a DSL in The Algorithmic Language Scheme. It would have been way more extensible, and cause less headaches for REAL scientists, not those fake ass engineers that think they run the world.

Name: Anonymous 2008-08-15 20:46

>>18
Back to /an/, please

Name: Anonymous 2008-08-15 21:31

>>20
REAL scientists use REALBasic.

Name: Anonymous 2008-08-15 21:41

You could just play the game.

Name: Anonymous 2008-08-15 22:47

computer engineering always seems to attract the dim witted individuals

Name: Anonymous 2008-08-15 22:50

>>24
I believe you mean Software Engineering, sir, the Phrenology of computing.

Name: Anonymous 2008-08-16 0:23

>>25
every computer engineer i know is jut in it for the money
lol little do they know that scheme is the next dot com bubble and im getting in on it.

Name: Anonymous 2008-08-16 0:46

>>26
ಠ_ಠ

Name: Anonymous 2008-08-16 10:56

>>25
Actually, Software Engineering is more like the Homeopathy of computing.

Name: Anonymous 2008-08-16 10:58

>>28
More like the homoerotica of computing

Name: prospective CS student 2008-08-16 11:05

what makes software engineering so damn gay?

Name: Anonymous 2008-08-16 11:42

>>30
The same thing that makes any new age bullshit so damn gay.

Name: Anonymous 2008-08-16 12:30

OP HERE:

why do people hate computer engineers :(

>>18
My courses are sort of screwed up because of transferring schools and the disparities between the order of the courses at either one. I've taken some courses like Circuits Analysis 2 and Engineering Statistics and other bullshit that most other beginning 3rd years haven't taken yet, but on the other hand as of now all I have experience with is java (and c# :D). It'll (presumably) work out in the end.

>>20
I just took VHDL and I agree with you that it's retarded. I can't imagine they use it at any of the places I'd like to eventually be employed, but they probably do and I'll probably be stuck using it just because it would piss me off.

>>23
i lost


PS: If I were to pick either software engineering or computer science to minor in, which should I choose? Or something else entirely?

Name: Anonymous 2008-08-16 12:32

>>32
Because they are people like you. Read >>1, you'll understand

Name: Anonymous 2008-08-16 13:01

>>32
Oh, for fuck's sake, haven't you been reading the thread? Stay the fuck away from Software Engineering. That sort of evil bullshit is the bane of software development.

Name: Anonymous 2008-08-16 18:36

>>8
Every time I see a title like that, all I can think is, "Yes, yes it is."

Name: Anonymous 2008-08-17 8:30

>>34
That sort of evil bullshit is the bone of software development.
o hi i fixed your post

Name: Anonymous 2008-08-17 8:34

>>36
o hi i'm an enterprise faggort

Fixed that for you

Name: Anonymous 2008-08-17 8:43

>>37
Perhaps I should make it more obvious for you:
I am the bone of my software development. Java is my body and design patterns are my blood.

Name: Anonymous 2008-08-17 9:09

>>38
gb2/jp/

Name: Anonymous 2010-12-06 9:36

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2011-02-04 12:26

Name: Anonymous 2011-02-04 15:29

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