English
Forum

to that Input some ask

 

Andre
Hilprecht
Hello aide,
CompileMarkSeparation
var LiterEnde% = @Create("Edit", %hWnd, "4750", 710,65,70,22)
SetFont LiterEnde%,hFont
e>

i want:
1. In so one Input only numbers to permit (no letters, Sonderzeichen, comma etc.
2. whom area on 0 To 5000 limit
3. the numbers dunkelblau in the area attend let
4. must one always if is a others Font having would like SetFont hinterschicken, or does it too for a whole procedure/Program?

i know, the are for you plenty To simple ask, but I stand integrally at the beginning.
Textbook is order and Help find I To little Examples, or you're for me
To little comments (means Idiotensicher)

ICH WILLS JA LERNEN, means custom I Help. thanks already time.
Greeting Andre
 
Ein PC ist die beste Möglichkeit Fehler zu beheben, die ohne PC gar nicht passiert wären. -frei aus Murphy's Computergesetzen

XProfan X2, Win8 Pro 64bit Update von Win7
i5 / 3,2GHz 4 GB RAM
Treibstoff: Radeberger Pils
12/18/12  
 




Thomas
Freier
to that learn Please into Quelltexten search. Examples of Edits with [...] . coloured Edits simply with the SKControl.dll create or Examples search.
Einschränkungen on simple point:
CompileMarkSeparation
Whilenot Ende%

    Waitinput

    If (val(Gettext$(NumEdit%))<0) OR  (val(Gettext$(NumEdit%))>5000)

        SetText NumEdit%,""

    EndIf

    .......weitere A
n
 
Gruß Thomas
Windows XP SP2, XProfan X2
12/18/12  
 




Julian
Schmidt
look you time SpinEdits on, is probably very the what You seek.
CompileMarkSeparation
CLS
Create("SpinEdit",%hwnd,"50;0;100",10,10,70,25)'Spinedit mit Angabe des Startwertes; Unter Grenze; Obergrenze

WhileNot iskey(27)

    waitinput

EndWh
>

Andre Hilprecht (18.12.12)
4. must one always if is a others Font having would like SetFont hinterschicken, or does it too for a whole procedure/Program?


See SetDialogFont.
 
XProfan X2
Win7 Professional, SP1, AMD FX(tm)-8350 Eight-Core Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
12/18/12  
 




Andre
Hilprecht
thanks for Help, i'll me the the row to reinziehen.

the Spinedit is already integrally useable, but after I value read have,
would like I the it of screen disappears. does it too, only The Spins (Pfeile) stay visible. Also can nevertheless letters prompt, though I the
worth on 0-5000 festgesetzt have

SetDialogFont is not for all with Create begot items, means power it a
combination of beidem.
 
Ein PC ist die beste Möglichkeit Fehler zu beheben, die ohne PC gar nicht passiert wären. -frei aus Murphy's Computergesetzen

XProfan X2, Win8 Pro 64bit Update von Win7
i5 / 3,2GHz 4 GB RAM
Treibstoff: Radeberger Pils
12/19/12  
 




Thomas
Freier
A small example with Edit and SpinEdits and How the SpinEdits destroy becomes. but deference: one SpinEdits has a Tausenderpunkt. The must to that anticipate @Translate$(s1,s2,s3) removes go.
CompileMarkSeparation
' für nur Zahlen
Def GetWindowLong(2) !"USER32", "GetWindowLongA"
Def SetWindowLong(3) !"USER32", "SetWindowLongA"
Def SetEditNumeric(1) SetWindowLong(@&(1),-16, (GetWindowLong(@&(1), -16) | $2002))
cls
var loes%=Create("Button",%hwnd,"SpinnEdit löschen",470,380,140,24)
var ed%=Create("Edit",%HWnd,"",480,10,120,24)
SetEditNumeric(ed%)'nur Ziffereingaben erlauben
sendmessage(ed%,$00C5,4,0)'nur 4 Zeichen
var spin%=Create("SpinEdit",%HWnd,"3000;0;5000",480,80,120,24)
SetEditNumeric(spin%)'nur Ziffereingaben erlauben
sendmessage(spin%,$00C5,4,0)'nur 4 Zeichen

while 1

    waitinput

    If getfocus(ed%)

        case val(gettext$(ed%)) > 5000 : settext ed%,""

    endif

    If getfocus(loes%)

        DestroyWindow(GetHandle(%hwnd,ItemID(spin%) + 1))
        DestroyWindow(spin%)

    endIf

endwhile

 
Gruß Thomas
Windows XP SP2, XProfan X2
12/19/12  
 




Andre
Hilprecht
OK, could I everything successful use and functions How desired.
The 2. part of SpinEdits must means with a 2. DestroWindow removes go.
thought I me already, having it only not probiert.

some Source from the collection I get not to that walk, there's not correctly.
auskommentiert what about me see (yet) not always what Program and what comment is. would be hilfreicher, if these Source always small and lauffähige Miniprogramme wären.
you have the lovely made. the can also one Beginner understand.

thanks

there come yet 999 ask To my Prog is done.
 
Ein PC ist die beste Möglichkeit Fehler zu beheben, die ohne PC gar nicht passiert wären. -frei aus Murphy's Computergesetzen

XProfan X2, Win8 Pro 64bit Update von Win7
i5 / 3,2GHz 4 GB RAM
Treibstoff: Radeberger Pils
12/19/12  
 




Findus
what I never rausgekrigt have is How one a Text blue power or einfärbt of a Input or Text.
 
12/21/12  
 




Thomas
Freier
Examples of Edits there here enough or simply with the SKControl.dll or as RichEdit
CompileMarkSeparation
 $H windows.ph
 $H messages.ph
 $H RichEdit.ph
 $I profalt.inc
Def GetSysColor(1) !"USER32","GetSysColor"
Declare hDlg&,Edit&,Textzeile&,hAbbruch&,Exit%
Declare font&,dll&,Text$
Cls
font&=CreateFont("Arioso",16,0,0,0,0)
hDlg& = Create("Dialog",%hWnd,"RichEdit einzeilig ohne Rahmen",400,200,400,200)
hAbbruch& = Create("Button",hDlg&,"Abbruch",180,140,70,24)
setfont hAbbruch&,font&,Text$
dll&=usedll("riched32.dll")
Edit& = control("RichEdit20A","",$543150C0,10,10,280,24,hDlg&,100,%hinstance,$200)
setfont Edit&,font&
Textzeile& = control("RichEdit20A","",$543150C0,10,80,280,24,hDlg&,100,%hinstance,$200)
setfont Textzeile&,font&
declare rtf#
dim rtf#,60
clear rtf#
long rtf#,0=60
long rtf#,4=$40000000
long rtf#,20=rgb(0,0,255)
sendmessage(Edit&,1092,1,rtf#)
sendmessage(Textzeile&,1092,1,rtf#)
dispose rtf#
ShowWindow(Edit&,0)
ShowWindow(Textzeile&,0)
SetStyle Edit&,$50FF00F4
SetStyle Textzeile&,$50FF00F4
SendMessage(Textzeile&,~EM_SETBKGNDCOLOR,0,GetSysColor(15))' Hintergrundfarbe
SendMessage(Textzeile&,~em_SetReadOnly,1,0)' nur Lesen setzen
text$="Ich screibe blau "
SendMessage(edit&, 177, $FFFF, $FFFF)'  EM_SETSEL
SendMessage(edit&, 194, 0, Addr(Text$))' EM_REPLACESEL
text$="Ich bin blau"
SendMessage(Textzeile&, 177, $FFFF, $FFFF)'  EM_SETSEL
SendMessage(Textzeile&, 194, 0, Addr(Text$))' EM_REPLACESEL
ShowWindow(Edit&,1)
ShowWindow(Textzeile&,1)
setfocus(Edit&)

WhileNot Exit%

    WaitInput
    case getfocus(Textzeile&): setfocus(hdlg&)

    If Clicked(hAbbruch&)

        Exit% = 1

    EndIf

EndWhile

DeleteObject font&
DestroyWindow(edit&)
DestroyWindow(Textzeile&)
DestroyWindow(hDlg&)
FreeDLL dll&
 
Gruß Thomas
Windows XP SP2, XProfan X2
12/21/12  
 




Findus
thanks the Try I from.
 
12/22/12  
 




Findus
thanks the works.
 
12/27/12  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

9.756 Views

Untitledvor 0 min.
Normann Strübli03/24/20
rquindt04/20/16
H.Brill08/27/15
Rainer Hoefs06/28/15
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie