🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.visualbasic
Article #195

Re: ComboBoxについて質問

#195
From: Takaaki Mori
Date: Sat, 18 Apr 1998 00:00
60 lines
2597 bytes

Takaaki Mori wrote in message <353711ae.0@news.interq.or.jp>...
>VB5で質問です。
>ComboBoxの下のリスト部分の高さを変えることは
>できないのでしょうか。幅を変えることはメッセージを
>送ってやることでできるようですが。
>
>環境
>VB5+SP3
>Win95

>ほかに方法はないのでしょうか。
>
>なければテキストボックスとリストボックスか・・・。


元記事投稿者森です。

かなり不確実ではありますが解決しました。

コンボボックスを4つ置いて下さい。

Option Explicit

Private Declare Function GetWindow Lib "user32" _
(ByVal hwnd As Long, ByVal wCmd As Long) As Long

Private Declare Function SetWindowPos Lib "user32" _
(ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
ByVal X As Long, ByVal Y As Long, ByVal CX As Long, _
ByVal cy As Long, ByVal wFlags As Long) As Long

Private Sub Form_Load()
Me.Show
Dim R as Long

Combo4.Visible = False

R = SetWindowPos(GetWindow(Combo4.hwnd, 2), 0, 0,_
 0, Combo3.Width \ Screen.TwipsPerPixelX, _
CLng(Screen.Height \ (Screen.TwipperPixcel*2)), &H10 Or &H2 Or &H4)

R = SetWindowPos(GetWindow(Combo3.hwnd, 2), 0, 0, _
0, Combo2.Width \ Screen.TwipsPerPixelX, _
CLng(Screen.Height \ (Screen.TwipperPixcel*2)), &H10 Or &H2 Or &H4)

R = SetWindowPos(GetWindow(Combo2.hwnd, 2), 0, 0, _
0, Combo1.Width \ Screen.TwipsPerPixelX, _
CLng(Screen.Height \ (Screen.TwipperPixcel*2)), &H10 Or &H2 Or &H4)

End Sub

GetWindow(Combo2.hwnd, 2)が怪しいですが・・・。
まぁ、一応できたんでOKとしましょう。

*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
森 喬顯        Takaaki Mori
Email:  takaaki@mori.104.net
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
Technical Details
Message-ID: <3538b9fb.0@news.interq.or.jp>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <35347ba3.0@news.interq.or.jp> <6h3s98$9q1$1@news4.odn.ne.jp> <6h671h$djc$1@news4.odn.ne.jp> <353711ae.0@news.interq.or.jp>

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: 110a07,4cf68db0896ad722
X-Google-Attributes: gid110a07,public
X-Google-Thread: 105c2e,4cf68db0896ad722
X-Google-Attributes: gid105c2e,public
X-Google-Thread: 115e07,4cf68db0896ad722
X-Google-Attributes: gid115e07,public
From: "Takaaki Mori" <takaaki@mori.104.net>
Subject: Re: ComboBoxについて質問
Date: 1998/04/18
Message-ID: <3538b9fb.0@news.interq.or.jp>
X-Deja-AN: 345374993
X-NNTP-Posting-Host: 210.157.3.93
Content-Transfer-Encoding: 7bit
References: <35347ba3.0@news.interq.or.jp> <6h3s98$9q1$1@news4.odn.ne.jp> <6h671h$djc$1@news4.odn.ne.jp> <353711ae.0@news.interq.or.jp>
Content-Type: text/plain; charset="iso-2022-jp"
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4
MIME-Version: 1.0
Newsgroups: fj.lang.visualbasic,fj.os.ms-windows.programming,japan.comp.lang.visual-basic