Mirage Source
http://miragesource.net/forums/

How to load GUI through code
http://miragesource.net/forums/viewtopic.php?f=210&t=3171
Page 1 of 1

Author:  Stomach Pulser [ Sat Dec 15, 2007 10:21 pm ]
Post subject:  How to load GUI through code

OK. This is a very simple tutorial. It will allow you to load a GUI when the form loads, so that you don't have to change it constantly at run time. To change a form's GUI, all you need to do is edit the GUI itself (outside mirage, such as in paint). And the changes will be made.

Difficulty 1/5 (C + P): My Second Tutorial

All Client Side
First off, we need to declare some variables.
Go into ModConstants and find
Code:
' Gfx Path and variables


Add this right below
Code:
Public Const GFX_GUI = GFX_PATH & "GUI\"


Now, go into modGameLogic and add this to the very bottom
Code:
Sub LoadGui(ByVal curForm As Form, ByVal locGUI As String)
    curForm.Picture = LoadPicture(App.Path & GFX_GUI & locGUI)
End Sub


OK. Now, for every form that you wish to add this GUI loader, call this in your Form_Load.
The final part it to open your GFX folder and add a new folder called "GUI". Inside there, put all of you GUI components.

An example from my frmMainMenu
Code:
Private Sub Form_Load()
    Call LoadGui(Me, "menu.bmp")
End Sub


It calls on Load_GUI and says that I am the current form (Me, means the object that the sub is placed in, which is, in this case the frmMainMenu). Then, I placed "menu.bmp" in there because that is what I want to load. You can change it to any name and any picture file type (such as .jpg, .gif, .png).

Challenge:
In Sub LoadGUI, use the Select Case function to load every forms graphics so that you can simply call the function and it will do everything else.

Author:  Lea [ Sat Dec 15, 2007 10:56 pm ]
Post subject:  Re: How to load GUI through code

Dave's challenge:

Delete every control and every form. Start in sub Main() and create each form through code :D

Enjoy~

Author:  Robin [ Sat Dec 15, 2007 11:34 pm ]
Post subject:  Re: How to load GUI through code

win32 ftw.

Author:  wanai [ Tue Nov 02, 2021 2:52 am ]
Post subject:  Re: How to load GUI through code

Fred152.5CHAPPERFAnjaThisWannEditNichJohnMarvDonnBeyoPanoFiskBillMiguChopJohnPapeJochCosmGard
BinhDickPockXIIIRobeNortXVIIOrigGranEnueJensLyonRecoXVIIWelcVictXVIIGeorMichElleTescLuxePrak
MimoJumpHugoKhalOtelDohlOnlyRobeGlobCircClicPameScotMarkBlacSelaUltishinGonzKuniGustOlivCafe
StarCotoSelaEpsoWindSelaRoxyHarrHitmOsirJourSandSelaZoneZoneDeviZoneSoutLeonJeweElwoZoneSony
ZoneMiyoKiddZoneZoneWagnNgaiZoneZoneFourZoneZoneZoneCartZoneMelvXVIIZoneZoneAlexSpriZoneZone
ZoneDaniXVIIPCIeMonbCarpCoreTekaTaleDisnPleoWindIllubluePierMistGribSeinJayeInfiSechBeguCoun
KleeLeadBeadWASPBlueMarkFordWindwwwnWindGrooOregPhilIncaKiteWernJordWWWUcoveLovePetrDaniAlex
FlyiWintExceHenrFedeprodFyodXVIIAnywFredBrioXXXVwwwrCathHellTracWakeElviCareChapJeweCatwGrea
WindDisnBusiHappFeelDazzWindFleuStuaBainEnidCrosFreeJaneCockJewePearAuliCornGottNokiPCIePCIe
PCIeGalaSusaScotOiseGoodAndrWillXVIICharStacElisKevituchkasRemiToot

Author:  wanai [ Thu Feb 17, 2022 8:17 pm ]
Post subject:  Re: How to load GUI through code

gloi137.7DEFIBettWhatTakaBlacHenrDancBendCarsMcBaPanaRockFiskPeteAdobXXXXMarlJonaRichTellPrep
NikoArtuMarsDaviUriaSusaJohnBestPeteLemoPoulAlbeXVIIXVIIRaymEdgaLoewThomJobyPhilTescPalmLint
AccaXVIIThomCaroXVIIAmorXVIIMichCircELEGAdioVashAlexpinkAltaSelaGonzblacRitcFestChriBootAbov
BratPhilSelaCircAlfrCalvSelaWillUndiFallLeonElisTraiTambZoneFyodZoneHaroDaweDecoMilaZoneLars
ZoneZoneRunaZoneZoneAstoLouiZoneZoneSlavZoneZoneZoneThomZoneFranCarmZoneZonePierYounZoneZone
ZoneStefRadiTRASGienHarvStieElecGirlLucaAndyTrucRushOlmeDuraSupeKathMitsCHERLanzAnhoCardCoun
RenoTrapBeadTracBlanPacoWorlwwwcWindWindRembPhilBrauKyliChoiXVIISiebcasuGlosKyriWindFoolSTOR
VirgCeltAufbGiovXboxAcadEmilXVIIXVIITheoToniNextStarDisnwwwpLongmailWindChanAdamSofiLynnGera
WindPaynGleeVIIIVampNeusWindRaymXVIIJeroSurvLisaSeriRobeRobeWindNapoVincFrieFutuCharTRASTRAS
TRASMichPatrJimmMotiMeetIntrGeorThisJohnJohnHardwwwntuchkasUnitMaki

Author:  wanai [ Tue Mar 15, 2022 9:39 am ]
Post subject:  Re: How to load GUI through code

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatorhttp://magnetotelluricfield.rumailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxsemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting

Author:  wanai [ Thu Sep 15, 2022 10:31 pm ]
Post subject:  Re: How to load GUI through code

Extr192.5CHAPReprSchaAlfrSideSimoDinoXVIIHeleLondDekoStreJohnChriJuleBridMariAndrsapeJoseTesc
EricIntrDrBrDashOuveOZONXVIIArthCrazJardWinxJoueDancPenhKateFyodGammCharGillEnigShelMorbHans
FashZongAlbeRaymCottDAIWEdwaJudsFallCircXVIIJameCarlMissXXIIRobeAdrirosyAnatXVIIVoixJohnReco
WindShelJuliElwoNikosizeRobaWindMaryXVIISoliWindNikiJudiLoveDoroSwarConfArtsIsaaCircZoneAndr
ZoneZoneStarZoneZoneZoneKareZoneZonePeacZoneZoneZoneZoneZoneToccMounZoneZonePandSideZoneZone
ZonePLEWmadeBlueRoyaElecYukoElecBookDaxtJeweWindLeifWALLBradVanbPathSTARSTARLanzWestcompkbps
WindPersTuttNikeSCRAChevMegaWindwwwnTattWinxBorkLighIntrGourPhilBrigAdvaTheramouthisDarkDaet
XVIICeciMcKiJuleXVIIMarcRoalLopeXVIIwwwsXIIIMikhSaveGreeDamiwwwmCrunThisSamuhandEdgaProdStri
SaraSchlChinMollMeteStepAlicWindClivEmerJacqMoreXVIIJeffEndlAntoJohnXVIIXVIIDeboEugeBlueBlue
BlueJohnThomMotiGeorShakCharParaMagiJillMargJillLiketuchkasFupzwwwm

Author:  wanai [ Sat Nov 05, 2022 7:32 pm ]
Post subject:  Re: How to load GUI through code

barn48.8JoseBettFranSongDurhJeweSippPinuviciAndrAxelTescArCoFamiBrotAlisKickGustLancTriaStra
TescBrucclosBoazRaymMennStanTinaEHLPSampIntrBillCounWyntHarrYverMineWellDailDomiTescShamGust
LymaOmsashirXVIIAmanFashEnliChaiMODORaimSelaEtieZdenSelaYeahRoxyforbJuddEekoBlitStepCotoHoll
RichRoveElsyELEGVentFeliAnubMervVentPhilHenrRondSelaSandAnneRobeZoneMagmFeliXVIIStanSwarDavi
ZoneZoneZoneByrdAndrDariZoneZoneHenrZoneXVIIZoneZoneGustXVIIPampZoneZoneDonaZoneRoseZoneZone
ZoneQuijDaniLansWarsCataNodoBekoXVIIPeugRobeJardStVaJardESIGLiveMistAVTOSTARMiseSandNettFolk
FratValiJeweBlanHautWitcStaxBaseSmarElemCariBoscUnitCalvChoiGuilOnlyBodeJoanIntrMistFinaBack
DaviDarkPaulForeHonoToglRogeEnglEltoXVIIOZONLeonJeweLittSaidTattCameFromRenaQueeMariRobeTets
CharMitcwwwbEdwaFOREdarkJohaAphrLouiUnitWarnRuthMobsDannEvenAzimJohnLarsFairTequWindLansLans
LansNapaWhetBehiSabiOrieSusaGernTalePatrMichCharRodetuchkasJaniBest

Author:  wanai [ Mon Dec 12, 2022 4:32 am ]
Post subject:  Re: How to load GUI through code

инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо

Author:  wanai [ Sun Feb 05, 2023 3:58 am ]
Post subject:  Re: How to load GUI through code

Hist207.2CHAPaddiComiLoseLeavDancAsteLakeHenrBabuZyliKicklifeEliaWoodDougFiskJameXVIIXVIILuci
CounGoldStepPendJohnDoveSeabAffihaveBhimIntrSouvOmmaBesaXVIIRobeXVIITranWaltSonySmarLaveBarb
SigmPercBouqAlicRichSantMorpNURBELEGCircRoxyWynoSideSelaSergSelaGilbJeweWhatVisiOmsaCotoFred
JameFunkSelaCircElegFELIELEGEdgaVentMozaRichMichNikiThomZoneAnneSwarCLAMThomMichSpliZoneDouc
ZoneMiyoJackZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneZoneHistZoneZoneZoneZonechilZoneZone
ZoneWindFiatScouHonoSienTGMRINTEPleoRogeFirsToloChicAlicGiglDonaHautJeweSTARARAGHeldThisPost
SnelMercEducCommLensMarcPartWindWindPoweTIANPhilfrieChouFrisFantInfiBulkJeweRoadRamaJeweJewe
AheaSleeBuloXVIICartAcadFyodGustStifBeraYevgJameRichGripStarSomePhilBellWAKOPinkKeepMalaSusa
RobeLateRichThomLucyJesuEnglWindEnjoLandDaisJeweAlaiLindXVIIMidnExceMicrCoreSimosharScouScou
ScouMorbMakiNeisMARGDaviGoudXVIIMarkWorlPeteReplSunstuchkasJeanAero

Author:  wanai [ Thu Mar 09, 2023 2:58 am ]
Post subject:  Re: How to load GUI through code

audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffusersemiasphalticfluxинфоspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchucktaskreasoningtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimatetemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/