Lufia_Maxim

Member

Total Posts: 276
Online Status: Offline
Sat Feb 28 13:20:44 EST 2009

Wow, as I suspected, the problem was a very simple one indeed.

I ended up solving it, by trying to use a different way to get the hWnd (somehow knowing that if one way didn't work, another way would fail as well). I tried using FindWindow() and after seeing Visual Studio throw me a (FindWindow is not declared) error, it dawned on me:

There was no reference to Systems.Windows.Form!

I added a reference and just like that, all errors disappeared. Running a simple test showed that it worked flawlessly!

This is exciting, as now I can finish my counter (which I may or may not release here, since I don't know if anyone would find it useful)!

Thanks for your help CK =)

the newb has learned a little bit more.



Lufia_Maxim

Member

Total Posts: 276
Online Status: Offline
Thu Mar 19 1:44:05 EDT 2009

I'm back, with another problem that is baffling me!

This one is for my project, so don't question the usefulness of this (it's useless ) .



k, so my problem is: In the problem link, line 13 is supposde to grab the t*tle of the 2nd item in the publicationArray (i'm just using "1" for now, later on it will be the var f once I get it working). Any information relating to the array is found in the helpuful link.

The problem is, it does nothing. It returns nothing, and in fact, even halts anything else after that line from executing! Running the program as-is makes nothing show up in the textbox. Commenting out line 13 makes everything after it appear in the textbox like it should ("sup" and "hey").

While I was first making this, I had trouble getting access to the array, but I've gotten that down now, and Visual Studio recognizes the array as existing with all the properties that I've given to it, so I know it's not an issue with accessing the array.

Usually I have some kind of error to work with, but this gives me nothing whatsoever.

I've tried things like "t*tle = publicationArray.GetUpperBound(0)" (GetUpperbound = returns the size of array, in this case, 3 [which is ofc 4]) and that halts any and all lines after it as well and shows nothing, so there is something about the array it doesn't like.

HELP!??! I've spent most of the entire day working on this stupid thing.



Tw1nChromeGlocks

Member

Total Posts: 11
Online Status: Offline
Sat Mar 20 14:51:06 EDT 2010

You need to Dim the publication array below the Option Strict line and above everything else in order for it to be a global variable. Otherwise it can only be accessed by the sub or function that it's contained in. This is .NET, correct?


Cyberkilla

Admin

Total Posts: 5,844
Online Status: Offline
Sat Mar 20 19:29:53 EDT 2010

Quote from Tw1nChromeGlocks
You need to Dim the publication array below the Option Strict line and above everything else in order for it to be a global variable. Otherwise it can only be accessed by the sub or function that it's contained in. This is .NET, correct?


A year too late(smiley)


Invisible War ][
Edited 1 time(s). Last edited by Cyberkilla @ Sat Mar 20 19:30:10 EDT 2010

Sociopath

Member

Total Posts: 1,492
Online Status: Offline
Sat Mar 20 20:14:55 EDT 2010

Nah it's not too late. I left this here as Lufia didn't have an answer yet. Tw1n may have solved that problem for him and solved a few admin queries at the same time.

Job done. Just need Lufia to comment on it and the thread can be closed.




Tw1nChromeGlocks

Member

Total Posts: 11
Online Status: Offline
Sat Mar 20 20:42:36 EDT 2010


Post deleted by admin