begin process at 2012 02 14 21:31:59
  Trouver un code source :
 
dans
 
Accueil > Forum > 

Archive Visual Basic & VB.NET

 > 

Archives Visual Basic

 > 

J'AI BESOIN D'AIDE !!!! :)

 > 

largeur des bordures d'un ctrl ?


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

largeur des bordures d'un ctrl ?

lundi 2 juin 2003 à 16:31:45 | largeur des bordures d'un ctrl ?

elaphe

Bonjour,

Comment déterminer la largeur des bordures d'un controle ou d'un form (pas la même si flat 3D etc et semble varier en fonction de la résolution écran) ? Est-ce défini dans l'OS en pixels en twips etc ??

La propriété .Width renvoie la taille extérieure, si on a besoin de l'intérieur on fait koa ?

Plus fort quelle est la largeur du vertical scrollbar d'un richtextbox ? (à nouvo j'ai besoin de connaître la taille intérieure disponible)

Y'a surement une API mais laquelle ??

Merci d'avance


lundi 2 juin 2003 à 21:57:26 | Re : largeur des bordures d'un ctrl ?

ShareVB

salut

avec cette api tu doit trouver ton bonheur :) :
GetSystemMetrics

et ce code :

'In general section
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
Const SM_CXSCREEN = 0 'X Size of screen
Const SM_CYSCREEN = 1 'Y Size of Screen
Const SM_CXVSCROLL = 2 'X Size of arrow in vertical scroll bar.
Const SM_CYHSCROLL = 3 'Y Size of arrow in horizontal scroll bar
Const SM_CYCAPTION = 4 'Height of windows caption
Const SM_CXBORDER = 5 'Width of no-sizable borders
Const SM_CYBORDER = 6 'Height of non-sizable borders
Const SM_CXDLGFRAME = 7 'Width of dialog box borders
Const SM_CYDLGFRAME = 8 'Height of dialog box borders
Const SM_CYVTHUMB = 9 'Height of scroll box on horizontal scroll bar
Const SM_CXHTHUMB = 10 ' Width of scroll box on horizontal scroll bar
Const SM_CXICON = 11 'Width of standard icon
Const SM_CYICON = 12 'Height of standard icon
Const SM_CXCURSOR = 13 'Width of standard cursor
Const SM_CYCURSOR = 14 'Height of standard cursor
Const SM_CYMENU = 15 'Height of menu
Const SM_CXFULLSCREEN = 16 'Width of client area of maximized window
Const SM_CYFULLSCREEN = 17 'Height of client area of maximized window
Const SM_CYKANJIWINDOW = 18 'Height of Kanji window
Const SM_MOUSEPRESENT = 19 'True is a mouse is present
Const SM_CYVSCROLL = 20 'Height of arrow in vertical scroll bar
Const SM_CXHSCROLL = 21 'Width of arrow in vertical scroll bar
Const SM_DEBUG = 22 'True if deugging version of windows is running
Const SM_SWAPBUTTON = 23 'True if left and right buttons are swapped.
Const SM_CXMIN = 28 'Minimum width of window
Const SM_CYMIN = 29 'Minimum height of window
Const SM_CXSIZE = 30 'Width of title bar bitmaps
Const SM_CYSIZE = 31 'height of title bar bitmaps
Const SM_CXMINTRACK = 34 'Minimum tracking width of window
Const SM_CYMINTRACK = 35 'Minimum tracking height of window
Const SM_CXDOUBLECLK = 36 'double click width
Const SM_CYDOUBLECLK = 37 'double click height
Const SM_CXICONSPACING = 38 'width between desktop icons
Const SM_CYICONSPACING = 39 'height between desktop icons
Const SM_MENUDROPALIGNMENT = 40 'Zero if popup menus are aligned to the left of the memu bar item. True if it is aligned to the right.
Const SM_PENWINDOWS = 41 'The handle of the pen windows DLL if loaded.
Const SM_DBCSENABLED = 42 'True if double byte characteds are enabled
Const SM_CMOUSEBUTTONS = 43 'Number of mouse buttons.
Const SM_CMETRICS = 44 'Number of system metrics
Const SM_CLEANBOOT = 67 'Windows 95 boot mode. 0 = normal, 1 = safe, 2 = safe with network
Const SM_CXMAXIMIZED = 61 'default width of win95 maximised window
Const SM_CXMAXTRACK = 59 'maximum width when resizing win95 windows
Const SM_CXMENUCHECK = 71 'width of menu checkmark bitmap
Const SM_CXMENUSIZE = 54 'width of button on menu bar
Const SM_CXMINIMIZED = 57 'width of rectangle into which minimised windows must fit.
Const SM_CYMAXIMIZED = 62 'default height of win95 maximised window
Const SM_CYMAXTRACK = 60 'maximum width when resizing win95 windows
Const SM_CYMENUCHECK = 72 'height of menu checkmark bitmap
Const SM_CYMENUSIZE = 55 'height of button on menu bar
Const SM_CYMINIMIZED = 58 'height of rectangle into which minimised windows must fit.
Const SM_CYSMCAPTION = 51 'height of windows 95 small caption
Const SM_MIDEASTENABLED = 74 'Hebrw and Arabic enabled for windows 95
Const SM_NETWORK = 63 'bit o is set if a network is present. Const SM_SECURE = 44 'True if security is present on windows 95 system
Const SM_SLOWMACHINE = 73 'true if machine is too slow to run win95.
Private Sub Form_Load()
'KPD-Team 1998
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
'Set the graphic mode to persistent
Me.AutoRedraw = True
'retrieve information and print it to the form
Me.Print "Number of mouse buttons:" + Str$(GetSystemMetrics(SM_CMOUSEBUTTONS))
Me.Print "Screen X:" + Str$(GetSystemMetrics(SM_CXSCREEN))
Me.Print "Screen Y:" + Str$(GetSystemMetrics(SM_CYSCREEN))
Me.Print "Height of windows caption:" + Str$(GetSystemMetrics(SM_CYCAPTION))
Me.Print "Width between desktop icons:" + Str$(GetSystemMetrics(SM_CXICONSPACING))
Me.Print "Maximum width when resizing a window:" + Str$(GetSystemMetrics(SM_CYMAXTRACK))
Me.Print "Is machine is too slow to run windows?" + Str$(GetSystemMetrics(SM_SLOWMACHINE))
End Sub

voila

ShareVB


-------------------------------
Réponse au message :
-------------------------------

> Bonjour,
>
> Comment déterminer la largeur des bordures d'un controle ou d'un form (pas la même si flat 3D etc et semble varier en fonction de la résolution écran) ? Est-ce défini dans l'OS en pixels en twips etc ??
>
> La propriété .Width renvoie la taille extérieure, si on a besoin de l'intérieur on fait koa ?
>
> Plus fort quelle est la largeur du vertical scrollbar d'un richtextbox ? (à nouvo j'ai besoin de connaître la taille intérieure disponible)
>
> Y'a surement une API mais laquelle ??
>
> Merci d'avance
>
>
>


Cette discussion est classée dans : ctrl, taille, largeur, bordures


Répondre à ce message

Sujets en rapport avec ce message

largeur de colonne sous excell [ par saib ] salutvoila je veut redimensionner des cellules et des lignes dans une feuille excell via une macro (donc vba), j'utilise donc cells(x,y).rowheight et Largeur et la Longueur d'une image [ par kuss ] Je voulais "simplement" savoir si quelqu'un sait comment lire la Largeur et la Longueur d'une image située sur le disque sans la charger ni l'ouvrir . keyascii Sendkeys mozilla [ par imparator_42 ] Bonjour a tous.J'ai un gros problème avec sendkeys et l'applicaiton mozillaPour ce qui utilise Mozilla on peut utiliser Ctrl + + pour agrendir la tail Taille mini d un formulaire [ par cath2123 ] Bonjour, Je travaille en VB 2008 et j ai un petit souci qui va peut etre vous paraitre evident: j ai un formulaire dont j essaie de diminiuer la lar Connaitre la taille (largeur*hauteur) d'une image BitMap stockée dans un champ Objet OLE ACCESS [ par toopix ] Tout est dans la question :) Insérer caractere dans une chaine. [ par Chiche69 ] Bonjour a tous, Voila ce que je voudrais faire: j'ai une textbox dans laquelle l'utilisateur ecrit quelques mots. je voudrais que chaque caractere Redimensionner la largeur de colonne [ par ipsalien ] Bonjour, J'affiche sur une feuille Excel un tableau au moyen d'un "banal" Workbooks("aa.xls").Worksheets("Feuille1").cells(1,1).value. Je souhaite q Youtube - ProgressBar & Taille de la vidéo [ par Fraggy ] Bonjour à tous, J'arrive déjà à télécharger une vidéo Youtube , mais je souhaiterais agrémenter cela d'une progressbar afin d'avoir une idée de la pr taille tableau dynamique [ par jah jah powaa ] Bonjour, J'ai un petit problème : Mon programme ouvre un fichier texte contenant une entête et un tableau contenant des valeurs séparées par des ta


Nos sponsors


Sondage...

Comparez les prix

CalendriCode

Février 2012
LMMJVSD
  12345
6789101112
13141516171819
20212223242526
272829    

Consulter la suite du CalendriCode

 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 3,744 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales