Gui or console app
if console add
setmode(50,80)
Regards
Luiz
Thanks. It's console (or old Clipper).
I tried setmode(50,80), and it produces a window of double the size,
but it is twice as high and same width, which means the text in window
is still same small size.
What I'd like is window enlarged, as well as text in the app in the
window.
Currently I get users to:
-Right-click on top grey bar of Window of the program.
-Click Properties, Font, change '8x12' to '10x18'. Then OK.
-Click 'Modify shortcut that started this window'. Then OK.
which is a bit annoying for them, especially whenever they get an
update from me, it goes back to original small size, and they have to
re-do above process.
Cheers, Sid
setmode(50,132) or switch to gtwvw
Regards
Luiz
Hi Luiz,
I tried setmode(50,132) - didn't help. It seems any number larger
than 80, returns the size back to normal small size.
What is gtwvw? I assume/hope it isn't gui, because I want to stick to
simple Clipper code.
Thanks, Sid
For console mode applications:
Left click the console window icon (upper left corner).
In the drop down menu, left click on "Properties".
In the dialog that comes up, left click the tab that says "Font".
Select a larger font. Depending upon your application, you may require
raster only fonts. You might also want to check out the "Layout" tab.
Left click "Ok" at the bottom when done, and be sure to save for future
use if that dialog box comes up.
Desktop style shortcut:
You should be able to come up with a desktop shortcut to your
application where this can all be set up to begin with. Right click an
empty area on your desktop. Click on "New", then "Shortcut". Finish
filling in information for the shortcut. Right click the new shortcut
and select properties. There will be many tabs that will have setup
information you are looking for.
Hi Luiz,
I googled on gtwvw, and sounds good in theory
-is it part of xharbour? if not how do I include it in app?
-cost?
-what lines do I add to my source?
Thnaks, Sid
Hi John,
Not sure of difference between console style vs desktop style.
No matter, because it is not for my benefit, but for my users who
think my software should make a bigger window with bigger text... they
shouldn't have to enlarge.
Thanks, Sid
I reread the list. I apologize for missing the one where you are
already doing the first suggestion listed above.
If your application installs in a network directory that comes up as the
same for all users, then one such shortcut as listed in the 2nd section,
copied to everyone or referred to by everyone should work much more
conveniently. This wouldn't allow individual preferences, but it also
doesn't "reset" when you update the application.
Perhaps this idea can serve as an interim solution while you are setting
up to use gtwvw. I think that library is already part of xHarbour and
mostly it is a matter of setting a few compile and link references. It
has been too long for me though to remember what those are.
On May 6, 6:23 am, SidReynolds <s...@optusnet.com.au> wrote:
...
> I googled on gtwvw, and sounds good in theory
> -is it part of xharbour? if not how do I include it in app?
> -cost?
> -what lines do I add to my source?
If you have the commerical version. you just start using the
functions. It is a "contrib".
http://groups.google.com/group/comp.lang.xharbour/msg/a6722c97c9dda495
... click on "More options", then "View thread".
David A. Smith
> Not sure of difference between console style vs desktop style.
> No matter, because it is not for my benefit, but for my users who
> think my software should make a bigger window with bigger text... they
> shouldn't have to enlarge.
There are some APIs, dedicated to achieve your purpose:
GetCurrentConsoleFont
GetConsoleFontInfo
GetConsoleFontSize
GetNumberOfConsoleFonts
SetConsoleFont
Beginning with Windows Vista there are additional possibilities:
GetCurrentConsoleFontEx
SetCurrentConsoleFontEx
Best regards
Saulius
Hi Saulius,
I don't understand what you are saying. I'm just a humble dos clipper
programmer converting app's to 32 bit with minimal changes. I think
you are referring to GUI coding?
Just repeating a post…
I googled on gtwvw, and sounds good in theory
-is it part of xharbour? if not how do I include it in app?
-cost?
-what lines do I add to my source?
Thanks, Sid
I suggest you to create a .BAT file that will call your application,
then create a .LNK file that will "link" to the .BAT file. So then you
could configure the .LNK file the way you want, font size, window
size, lins and cols or you could configure it to open the application
maximized (full screen 25x80). Dont forget to assign "Modify shortcut
that started this window
This way you will not have to configure it again even if you update
your main application.
This is the simplest way I know and will make the users happy but to
make your application to do that, AFAIK would require to go to GTWVW
or some other GUI that will give you the necessary tools.
Qatan
On May 6, 11:58 pm, SidReynolds <s...@optusnet.com.au> wrote:
> On May 7, 4:18 pm, "Saulius" <labi...@gmail.com> wrote:
> > > Not sure of difference between console style vs
> > > desktop style. No matter, because it is not for
> > > my benefit, but for my users who think my
> > > software should make a bigger window with bigger
> > > text... they shouldn't have to enlarge.
>
> > There are some APIs, dedicated to achieve your purpose:
> > GetCurrentConsoleFont
> > GetConsoleFontInfo
> > GetConsoleFontSize
> > GetNumberOfConsoleFonts
> > SetConsoleFont
>
> > Beginning with Windows Vista there are additional possibilities:
> > GetCurrentConsoleFontEx
> > SetCurrentConsoleFontEx
>
> I don't understand what you are saying. I'm just
> a humble dos clipper programmer converting
> app's to 32 bit with minimal changes. I think
> you are referring to GUI coding?
No. If you have the commercial version, you just start using the
functions. The commercial complier will add the necessary libraries.
The Win API is included with any of the commercial packages above
basic, I think.
> Just repeating a post…
> I googled on gtwvw, and sounds good in theory
> -is it part of xharbour? if not how do I include it in app?
> -cost?
> -what lines do I add to my source?
It depends on whether or not you have the commercial version. Why
don't you tell us?
David A. Smith
Hi David,
I downloaded software from: http://www.xharbour.com/
I use "xHarbour extended xbase compiler"
When I click on "?" it says "xBuild Wizard Version: 4.5 Dated Sep 30
2008, 14:42:25".
I also paid for it - it was a while ago... I assume this means it is
the commercial version?
Could you give a simple example code for increasing size of app window
and text in it, preferably some stand-alone code?
Thanks, Sid
On May 7, 6:34 pm, SidReynolds <s...@optusnet.com.au> wrote:
...
> On May 8, 12:58 am, dlzc <dl...@cox.net> wrote:
...
> > > > There are some APIs, dedicated to achieve your purpose:
> > > > GetCurrentConsoleFont
> > > > GetConsoleFontInfo
> > > > GetConsoleFontSize
> > > > GetNumberOfConsoleFonts
> > > > SetConsoleFont
>
> > > > Beginning with Windows Vista there are additional possibilities:
> > > > GetCurrentConsoleFontEx
> > > > SetCurrentConsoleFontEx
Some help with that:
http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/c232a523-c6c1-4654-802c-919e8fae17d1
...
> I downloaded software from:http://www.xharbour.com/
>
> I use "xHarbour extended xbase compiler"
> When I click on "?" it says "xBuild Wizard Version: 4.5
> Dated Sep 30 2008, 14:42:25".
Does not tell me anything. What did you buy?
> I also paid for it - it was a while ago... I assume this
> means it is the commercial version?
If you paid ~$150, then you got basic, and Saulius' suggestion won't
work.
> Could you give a simple example code for increasing
> size of app window and text in it, preferably some
> stand-alone code?
I'll post this again:
http://groups.google.com/group/comp.lang.xharbour/msg/a6722c97c9dda495
... click on "More options", then "View thread".
You have had suggestions that you (or your customer) create a link to
your program on their desktop, and set the link to the font size they
like:
http://groups.google.com/group/comp.lang.xharbour/msg/046a12cfbbedefff
On the old newsgroup, Massimo Belgrano provided this example
(2005mar07)
<QUOTE>
... you can change font for having similar
effect like in this little sample
screenWidth := Wvt_GetScreenWidth()
IF screenWidth >= 1280 // 1280 *960
Wvw_SetFont(,"Courier new",36,15) // 15*80=1200 36*25=900
ELSEIF screenWidth >= 1024 // 1024*760
Wvw_SetFont(,"Courier new",26,12)
ELSEIF screenWidth >= 800
Wvw_SetFont(,"Courier new",22,10)
ELSE
Wvw_SetFont(,"Courier new",17,8)
ENDIF
wvw_SetCodePage(,255) // 437)
<END QUOTE>
Or, you might try just adding
wvw_maximize()
Luiz also provided this example on the old newsgroup (2006may06)
<QUOTE>
#ifdef XGTWVW
REQUEST WvW_GetScreenWidth
REQUEST WVW_SetFont
REQUEST WVW_SetCodePage
#endif
Procedure Main
local mName := space(20)
#ifdef XGTWVW
SetDefaultWindowSize()
#endif
clear screen
@ 12, 10 say "Please enter your name:" get mName
read
@ 14, 10 say "Hello, " + alltrim(mName) + ", welcome to xHarbour."
@ 16, 10 say " "
wait
clear screen
Return
#ifdef XGTWVW
function SetDefaultWindowSize
LOCAL Result, ScreenWidth
SetMode(25,80)
Result := .T.
IF Result
screenWidth := Wvw_GetScreenWidth()
DO CASE
CASE screenWidth >= 1024
Result:= Wvw_SetFont(,'Terminal',20,10)
CASE screenWidth >= 800
IF OS_IsWinNt()
Result:= Wvw_SetFont(,'Lucida Console',16,-8)
ELSE
Result:= Wvw_SetFont(,'System',16,-8)
ENDIF
OTHERWISE
Result:= Wvw_SetFont(,'Terminal',12,6)
ENDCASE
IF Result
Wvw_SetCodePage(,255) // #define OEM_CHARSET 255 - from
wingdi.h
CLS
ENDIF
ENDIF
RETURN(Result)
#endif
<END QUOTE, with correction by "Ath">
Hopefully, some of that will work for you.
David A. Smith
Hi David,
I paid ~$145 for xHarbour Builder Personal. Is that sufficient?
I tried wvw_maximize() by itself but link error.. and I tried
Wvw_SetFont(,"Courier new",17,8) by itself but link error.
Luiz told me he downloaded from xHarbour.org, whereas I use
xHarbour.com, so he said his suggestions don't apply.
Thanks, Sid
Im the responsable from support to xharbour.com
to use gtwvw in xharbour.com is simple as
xbuild source -gui wvw.lib
Regards
Luiz
Hi Luiz,
I don't have guiwvw.lib or wvw.lib - where do I download it from?
And where I do access it in xbuild (eg under "Lib folder", next to
"lib")?
Thanks, Sid