Article View: be.comp.programming
Article #4582Re: Gradient achtergrond
From: Billyke
Date: Wed, 13 Aug 2003 18:57
Date: Wed, 13 Aug 2003 18:57
76 lines
3695 bytes
3695 bytes
"Cliff Beeckman" <cliffbeeckman@pandora.be> wrote in message
news:5Nv_a.65367$F92.7402@afrodite.telenet-ops.be...
> thx voor het adres...
>
> ik heb ook even de code geprobeerd voor een XP-style te verkrijgen in mijn
> programma's. De code heb ik mooi gekopieerd en geplakt en een bestandje
met
> de naam van mijn programma + .exe.manifest maar hij geeft telkens opnieuw
> een foutmelding dat de configuratie van de toepassing verkeerd is. Zijn er
> nog andere mogelijkheden om dit te verkrijgen of weet er iemand waaraan
dit
> ligt?
>
> "Billyke" <gert.verstappen@gmx.net> schreef in bericht
> news:bhduiv$lu3$1@reader10.wxs.nl...
> >
> > "Cliff Beeckman" <cliffbeeckman@pandora.be> wrote in message
> > news:0Nu_a.65263$F92.7291@afrodite.telenet-ops.be...
> > > Iemand een idee hoe je een een gradient achtrgrond verkrijgt in de
forms
> > van
> > > VB6?
> > >
> > >
> >
> > Zonder API's: http://www.mvps.org/vbnet/code/forms/gradientform.htm
> > Met API's: http://www.mvps.org/vbnet/code/forms/gradientfill.htm
> >
> >
>
>
If you provide a manifest, but your application does not link to
ComCtl32.dll, then it will fail to load - sometimes with no error message!.
You need to call at least InitCommonControls before any visual elements are
displayed. Sometimes, you don't need to do anything because your application
may already link to ComCtl32.dll (for example, if it includes any of the
Windows Common Controls provided with Visual Basic), however, to be certain
it works it is best to call InitCommonControls prior to displaying any
forms.
Here is the code you need at the start of your application to ensure you've
linked to ComCtl32.dll:
Private Type tagInitCommonControlsEx
lngSize As Long
lngICC As Long
End Type
Private Declare Function InitCommonControlsEx Lib "comctl32.dll" _
(iccex As tagInitCommonControlsEx) As Boolean
Private Const ICC_USEREX_CLASSES = &H200
Public Function InitCommonControlsVB() As Boolean
On Error Resume Next
Dim iccex As tagInitCommonControlsEx
' Ensure CC available:
With iccex
.lngSize = LenB(iccex)
.lngICC = ICC_USEREX_CLASSES
End With
InitCommonControlsEx iccex
InitCommonControlsVB = (Err.Number = 0)
On Error Goto 0
End Function
Public Sub Main()
InitCommonControlsVB
'
' Start your application here:
'
End Sub
Bron:
http://www.vbaccelerator.com/home/VB/Code/Libraries/XP_Visual_Styles/Using_XP_Visual_Styles_in_VB/article.asp
Technical Details
Message-ID:
<bhe1pv$onc$1@reader10.wxs.nl>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!kibo.news.demon.net!demon!newshub1.home.nl!home.nl!newsfeed.multikabel.nl!newsfeed.wxs.nl!textnews.wxs.nl!not-for-mailReferences:
<0Nu_a.65263$F92.7291@afrodite.telenet-ops.be> <bhduiv$lu3$1@reader10.wxs.nl> <5Nv_a.65367$F92.7402@afrodite.telenet-ops.be>Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: fcea4,3ed78da5e943485a X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2003-08-13 12:00:02 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!kibo.news.demon.net!demon!newshub1.home.nl!home.nl!newsfeed.multikabel.nl!newsfeed.wxs.nl!textnews.wxs.nl!not-for-mail From: "Billyke" <gert.verstappen@gmx.net> Newsgroups: be.comp.programming Subject: Re: Gradient achtergrond Date: Wed, 13 Aug 2003 20:57:35 +0200 Organization: Planet Internet Lines: 78 Message-ID: <bhe1pv$onc$1@reader10.wxs.nl> References: <0Nu_a.65263$F92.7291@afrodite.telenet-ops.be> <bhduiv$lu3$1@reader10.wxs.nl> <5Nv_a.65367$F92.7402@afrodite.telenet-ops.be> NNTP-Posting-Host: 81.11.137.192 X-Trace: reader10.wxs.nl 1060801151 25324 81.11.137.192 (13 Aug 2003 18:59:11 GMT) X-Complaints-To: abuse@planet.nl NNTP-Posting-Date: 13 Aug 2003 18:59:11 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165