forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Font Handle Converter

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code
View previous topic :: View next topic  
Author Message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Sat Dec 21, 2002 11:44 pm    Post subject: Font Handle Converter Reply with quote

To enable this in your programs, you'll need to run a similar routine from
your script before showing the dialog. One other drawback is that you
have to leave the elements created on the dialog for this to wrok properly.

Code:


  TITLE Font Handle Converter
 
rem     You could load all of the font names from the registry here
  list create,1
  list loadtext,1
"Arial
"Courier New
"Ms Sans Serif
"Tahoma
"Times New Roman
"Verdana

rem    Use this list to write the font names and handles to
  list create,2

  dialog create,Handle Converter,-1,0,250,220
  dialog add,Style,StL1,Courier New,9,,White,LtBlue
  dialog add,List,L1,0,0,250,200,,StL1,DBLCLICK
  dialog add,Status,Stat,DblClick list to change to that font
  dialog show

 
  %%st = 1
  %c = @count(1)
  %x = 0
  list add,2,HANDLE@tab()@tab()FONT
  repeat
    list seek,1,%x
    dialog add,Style,St%%st,@item(1),10
    dialog add,EDIT,Ed%%st,0,0,0,0,,,St%%st
    %%fHandle = @sendmsg(~Ed%%st, $0031,0,0)
    list add,2,%%fHandle@tab()@tab()@item(1)
    %%st = @succ(%%st)
    %x = @succ(%x)
  until @equal(%x,%c)
  list assign,L1,@text(2)
  list close,2
 
:Evloop
  wait event
  goto @event()
 
:L1DBLCLICK
  if @greater(@index(1),0)
    %%font = @substr(@item(L1),1,@pred(@pos(@tab(),@item(L1))))
    %G = @sendmsg(~L1, $0030,%%font,1)
  end
  goto Evloop
 
:CLOSE
  exit


_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group