Search found 54 matches

by harmonv
Nov 24, 2008 23:34
Forum: Beginners
Topic: First Code and a long way to go, Your Opinion??
Replies: 20
Views: 2992

i=8 ' Sets the counter to allow immediate exit from sub j=4 ' Sets counter for immediate exit Rather than setting counters., you can use Exit Function K.Windsor was suggesting making a card TYPE rather than using a trick like dividing by 100 to get a card's rank (Ace, One, ...) Type aCard Rank as i...
by harmonv
Nov 24, 2008 14:45
Forum: Windows
Topic: In-Memory Dialogs
Replies: 71
Views: 56643

I’m hoping that this is not too big to post. The original concept for this was from the MASM32 in-memory dialogs, implemented as a set of MASM macros. The DIALOGS.BAS module provides a simple method of creating a dialog box template in allocated memory, and creating a modal or modeless dialog from ...
by harmonv
Nov 24, 2008 13:19
Forum: Beginners
Topic: Trying to put user32 functions in a DLL
Replies: 9
Views: 1983

@Vince Thanks Vince. The code in my original post was all lifted from windows.bi and its includes... mostly windef.bi. What i'm trying to do it is make a dll that includes just those two functions. @voodooattaack The DLL --if it can be created-- will be called by another language. So, in that sense,...
by harmonv
Nov 23, 2008 14:14
Forum: Beginners
Topic: Trying to put user32 functions in a DLL
Replies: 9
Views: 1983

What do you mean by “put two user32 functions…into a DLL”? I'm probably not using the proper terminology. I apologize for that. Hmmm, so with that said, let me post a small snippet of Emergence Basic that does work. Compile this to create mydll.dll EXPORT GetWindowTextA EXPORT BringWindowToTop DECL...
by harmonv
Nov 21, 2008 20:32
Forum: Beginners
Topic: Cypher help
Replies: 8
Views: 1409

Does DIM LineBuff as string have to in the middle of the code or can I move it to the top?

It needs to appear before you use it in your program.
So you can leave it or move it.

As a general rule, it's good practice to place DIMs near the top.
Hope this helps.
-- Harmon
by harmonv
Nov 21, 2008 20:21
Forum: Beginners
Topic: Trying to put user32 functions in a DLL
Replies: 9
Views: 1983

Trying to put user32 functions in a DLL

Having a hard time trying to put two user32 functions, BringWindowToTop and GetWindowText, into a DLL and having no success. type HWND__ i as integer end type type HWND as HWND__ ptr type WINBOOL as integer type BOOL as WINBOOL '' from win/winnt.bi type LPSTR as zstring ptr extern "windows"...
by harmonv
Nov 21, 2008 15:28
Forum: General
Topic: Convert program to FreeBasic
Replies: 12
Views: 2073

Jeremy,
Take a look at the Screen Functions page in the FB manual.
FB, like QB before it, has several screen modes.
by harmonv
Nov 21, 2008 15:20
Forum: Beginners
Topic: Visual Basic Look IDE
Replies: 20
Views: 3867

yes I know but I don´t want .net. why I want to change from MS basic app is that I don´t want a language that are runtime needed like VB6 need vb6runtimes. and vb.net need .net runtimes. And what I have understand is that many other language does not need any runtimes to be run. like. freebasic. KB...
by harmonv
Nov 21, 2008 15:02
Forum: Beginners
Topic: How to calculate the week number of a given date?
Replies: 18
Views: 5861

You deserve an explanation. DateDiff fails, given (..,2,2)+1, when: 1. January 1st of a year is > Thursday and 2. Your target date in that year is any Monday after January 1st. <snip> Believe it or not this "failure" appears to be a "design feature" of DateDiff. That's per my understanding of the V...
by harmonv
Nov 21, 2008 14:56
Forum: Beginners
Topic: How to calculate the week number of a given date?
Replies: 18
Views: 5861

Zippy wrote:@harmonv

Here's one:
test = datevalue("11-21-2005")


Interesting. I had tested 2007 - 2009 but did not suspect the functions
would differ given the same settings.

I'm the one eatting crow. :-)
by harmonv
Nov 20, 2008 17:25
Forum: Beginners
Topic: How to calculate the week number of a given date?
Replies: 18
Views: 5861

@harmonv The expression is "close but no cigar". DateDiff does not work for WeekNum calculations, not without considerable exception handling. Oh? DateDiff measures the difference between two dates while DatePart simply counts, so the difference is +1 Is this your idea of "considerable exception ha...
by harmonv
Nov 19, 2008 9:03
Forum: Beginners
Topic: Visual Basic Look IDE
Replies: 20
Views: 3867

Since you like VB6, you'll probably like MS's newer BASIC package -- VB 2008 Express Edition. It comes with a very similar IDE. http://www.microsoft.com/express/vb/ You'll download a 2MB file. When you run it, you'll answer some questions and the program will download the packages you selected. The ...
by harmonv
Nov 19, 2008 8:34
Forum: Beginners
Topic: Mega-newbie Guide: 7 steps to epic failing that much less
Replies: 5
Views: 1299

Are you missing a step to download FBIDE?... or does FBIDE come bundled with the FB compiler? If it is included, several wiki/manual pages will need to be updated. Are you missing a step to download FBedit? Would you care to offer any steps on setting up and using FBedit? (the "docs" included with F...
by harmonv
Nov 19, 2008 7:50
Forum: Beginners
Topic: How to calculate the week number of a given date?
Replies: 18
Views: 5861

Re: How to calculate the week number of a given date?

There are few neat functions in vbcompat.bi, but none of them allows to retrieve the WeekOfYear(DateSerial)... The reason one isn't there is because folks want it calculated in different ways. Does a week begin on Sunday or Monday? Industry says the week starts on Monday. Church says the week start...
by harmonv
Nov 13, 2008 11:24
Forum: General
Topic: Convert program to FreeBasic
Replies: 12
Views: 2073

FreeBasic syntax is a lot like the old MSDOS QBASIC.
If you're familiar with QB, you should feel comfortable with FB.
In fact FB has a QB-mode that will run old QB code unmodified.
Good luck on your project.

Go to advanced search