Mirage Source

Free ORPG making software.
It is currently Sat May 18, 2024 12:20 am

All times are UTC




Post new topic Reply to topic  [ 23 posts ] 

Did this help you?
Yes 26%  26%  [ 8 ]
Sort of 13%  13%  [ 4 ]
Not really 10%  10%  [ 3 ]
It's garbage, throw it out. 52%  52%  [ 16 ]
Total votes : 31
Author Message
PostPosted: Sat Mar 03, 2007 12:36 pm 
Offline
Regular
User avatar

Joined: Fri Mar 02, 2007 6:19 pm
Posts: 93
Location: Nonya
Difficultly: 1/5
Time: Three minutes

Hello, I am completely new here, but I know my way around VB6 a little, so I worked up a code that remembers your username and password if you check a button.
Here goes:

OK, first open up your frmLogin and add a check box and call it RPass. Then double click on the connect button and add this code to the top, right under the Private sub picConnect_click():

Code:
If RPass.Value = 1 Then
Open "Data.ini" For Output As #f
Print #f, "[SETTINGS]"
Print #f, "Last User= "
Print #f, txtName
Print #f, "Last Password= "
Print #f, txtPassword
Close #f
Else
End If


Then add this into the form_load()

Code:
f = FreeFile

Dim n
Dim O
Dim usr
Dim t
Dim pass
On Error GoTo Error
Open "Data.ini" For Input As #f

Input #f, n
Input #f, O
Input #f, usr
Input #f, t
Input #f, pass
Close #f
RPass.Value = 1
txtName.Text = usr
txtPassword.Text = pass
Error:


Then up at the top, write this in:
Code:
public f as Integer


That works for me.

Just make sure to keep the Trim part of the code there.
That should do it, but you might have to create a file called data.ini, because it might runtime.

~Braydok


Last edited by Braydok on Sun Mar 04, 2007 8:50 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 03, 2007 12:43 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
It's nice to see that you are trying to share your code. Although there are a few things thats wrong. I suggest you test it before sharing it :P

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 03, 2007 2:24 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
You dont want to specify the number yourself. If that number is already open elsewhere, you can cause problems.

What you do is do Dim f as integer
F = freefile
Open "Data.ini" for output as #f

Also, Data.ini should have the entire path, so do App.Path & "\Data.ini"

Also, for the INI files there are special functions that edit the values directly, without rewriting the file. They're called GetVar and PutVar.

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 03, 2007 5:44 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
My votes winning!

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 04, 2007 6:18 pm 
Offline
Regular
User avatar

Joined: Fri Mar 02, 2007 6:19 pm
Posts: 93
Location: Nonya
William wrote:
It's nice to see that you are trying to share your code. Although there are a few things thats wrong. I suggest you test it before sharing it :P


Shoot you, I did test it, did you think I would not test it?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 04, 2007 6:22 pm 
Offline
Community Leader
User avatar

Joined: Mon May 29, 2006 1:00 pm
Posts: 2538
Location: Sweden
Google Talk: johansson_tk@hotmail.com
Bah, the code you supplied will only save it. Not load it into the text boxes.

_________________
I'm on Facebook!My Youtube Channel Send me an email
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 04, 2007 6:57 pm 
Offline
Submit-Happy
User avatar

Joined: Fri Jun 16, 2006 7:01 am
Posts: 2768
Location: Yorkshire, UK
Braydok wrote:
William wrote:
It's nice to see that you are trying to share your code. Although there are a few things thats wrong. I suggest you test it before sharing it :P


Shoot you, I did test it, did you think I would not test it?



Yes. We obviously think you didn't test it because it doesn't work.

_________________
Quote:
Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?


Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 04, 2007 8:48 pm 
Offline
Regular
User avatar

Joined: Fri Mar 02, 2007 6:19 pm
Posts: 93
Location: Nonya
Shit, your right, forgive me, here is the full code:

In the sub connect_click()
Code:
Private Sub picConnect_Click()
If RPass.Value = 1 Then
Open "Data.ini" For Output As #f
Print #f, "[SETTINGS]"
Print #f, "Last User= "
Print #f, txtName
Print #f, "Last Password= "
Print #f, txtPassword
Close #f
Else
End If


Then add this into the form_load()

Code:
f = FreeFile

Dim n
Dim O
Dim usr
Dim t
Dim pass
On Error GoTo Error
Open "Data.ini" For Input As #f

Input #f, n
Input #f, O
Input #f, usr
Input #f, t
Input #f, pass
Close #f
RPass.Value = 1
txtName.Text = usr
txtPassword.Text = pass
Error:


Then up at the top, write this in:
Code:
public f as Integer


That works for me.
Is this code good?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 04, 2007 11:22 pm 
Offline
Community Leader
User avatar

Joined: Sun May 28, 2006 10:29 pm
Posts: 1762
Location: Salt Lake City, UT, USA
Google Talk: Darunada@gmail.com
It's still pointlessly complex.

Code:
Private Sub picConnect_Click()
If RPass.Value = 1 Then
PutVar(App.Path & "\Data.ini", "Settings", "LastUser", Trim$(txtNAme.text)
PutVar(App.Path & "\Data.ini", "Settings", "LastPassword", Trim$(txtPassworld.text)
Else
Call PutVar(App.Path & "\Data.ini", "Settings", "LastUser", VBNullString)
Call PutVar(App.Path & "\Data.ini", "Settings", "LastPassword", vbNullString)
End If


In Form_Load
Code:
txtName.Text = GetVar(App.Path & "\Data.ini", "Settings", "LastUser")
txtPassword.Text = GetVar(App.Path & "\Data.ini", "Settings",
If txtName.text <> vbNullstring Then RPass.value = 1
"LastPassword")

_________________
I'm on Facebook! Google Plus LinkedIn My Youtube Channel Send me an email Call me with Skype Check me out on Bitbucket Yup, I'm an EVE Online player!
Why not try my app, ColorEye, on your Android devlce?
Do you like social gaming? Fight it out in Battle Juice!

I am a professional software developer in Salt Lake City, UT.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 04, 2007 11:29 pm 
Offline
Regular
User avatar

Joined: Fri Mar 02, 2007 6:19 pm
Posts: 93
Location: Nonya
Uh, yeah, I am still new at VB6, just started getting into it one week ago, so I don't know all the PutVar and stuff, so I'll work on that, thanks.

~Braydok


Top
 Profile  
 
PostPosted: Thu Dec 16, 2021 6:03 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
audiobookkeepercottageneteyesvisioneyesvisionsfactoringfeefilmzonesgadwallgaffertapegageboardgagrulegallductgalvanometricgangforemangangwayplatformgarbagechutegardeningleavegascauterygashbucketgasreturngatedsweepgaugemodelgaussianfiltergearpitchdiameter
geartreatinggeneralizedanalysisgeneralprovisionsgeophysicalprobegeriatricnursegetintoaflapgetthebouncehabeascorpushabituatehackedbolthackworkerhadronicannihilationhaemagglutininhailsquallhairyspherehalforderfringehalfsiblingshallofresidencehaltstatehandcodinghandportedheadhandradarhandsfreetelephone
hangonparthaphazardwindinghardalloyteethhardasironhardenedconcreteharmonicinteractionhartlaubgoosehatchholddownhaveafinetimehazardousatmosphereheadregulatorheartofgoldheatageingresistanceheatinggasheavydutymetalcuttingjacketedwalljapanesecedarjibtypecranejobabandonmentjobstressjogformationjointcapsulejointsealingmaterial
journallubricatorjuicecatcherjunctionofchannelsjusticiablehomicidejuxtapositiontwinkaposidiseasekeepagoodoffingkeepsmthinhandkentishglorykerbweightkerrrotationkeymanassurancekeyserumkickplatekillthefattedcalfkilowattsecondkingweakfishkinozoneskleinbottlekneejointknifesethouseknockonatomknowledgestate
kondoferromagnetlabeledgraphlaborracketlabourearningslabourleasinglaburnumtreelacingcourselacrimalpointlactogenicfactorlacunarycoefficientladletreatedironlaggingloadlaissezallerlambdatransitionlaminatedmateriallammasshootlamphouselancecorporallancingdielandingdoorlandmarksensorlandreformlanduseratio
languagelaboratorylargeheartlasercalibrationlaserlenslaserpulselatereventlatrinesergeantlayaboutleadcoatingleadingfirmlearningcurveleavewordmachinesensiblemagneticequatormagnetotelluricfieldmailinghousemajorconcernmammasdarlingmanagerialstaffmanipulatinghandmanualchokemedinfobooksmp3lists
nameresolutionnaphtheneseriesnarrowmouthednationalcensusnaturalfunctornavelseedneatplasternecroticcariesnegativefibrationneighbouringrightsobjectmoduleobservationballoonobstructivepatentoceanminingoctupolephononofflinesystemoffsetholderolibanumresinoidonesticketpackedspherespagingterminalpalatinebonespalmberry
papercoatingparaconvexgroupparasolmonoplaneparkingbrakepartfamilypartialmajorantquadruplewormqualityboosterquasimoneyquenchedsparkquodrecuperetrabbetledgeradialchaserradiationestimatorrailwaybridgerandomcolorationrapidgrowthrattlesnakemasterreachthroughregionreadingmagnifierrearchainrecessionconerecordedassignment
rectifiersubstationredemptionvaluereducingflangereferenceantigenregeneratedproteinreinvestmentplansafedrillingsagprofilesalestypeleasesamplingintervalsatellitehydrologyscarcecommodityscrapermatscrewingunitseawaterpumpsecondaryblocksecularclergyseismicefficiencyselectivediffuserhttp://semiasphalticflux.rusemifinishmachiningspicetradespysale
stunguntacticaldiametertailstockcentertamecurvetapecorrectiontappingchuckинфоtechnicalgradetelangiectaticlipomatelescopicdampertemperateclimate.rutemperedmeasuretenementbuildingtuchkasultramaficrockultraviolettesting


Top
 Profile  
 
PostPosted: Fri Feb 11, 2022 1:37 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Cinz736PERFBettIntrBitsPatrRougSystSonuValeLonaWillFamiRHAPTescOrieTescNinaStefMagiSideHann
DISCReneBustTescViceUsedJohaComeXVIILadyLetoNuvoTranBarbAlwaPenhAccaGreeOreaMagCTescGarnAquo
MikeEntsAtlaLouiMercJennGrimNikiFOTOXVIIMODOElegXIIIChriVariDecoFirsEricSelaSelaMariFunkJoli
LycrJoliWeniNikiKrewOxydKurtAverPlanELEGZonediamVentSwarLiarSwarZoneGrypDeafrinnModoRBLGPier
ZoneZoneZoneJeweStelAlexZoneStevGeraZoneDaiwWaltZoneNoraJarmValkZoneZonePanaZoneSweeZoneZone
WaltLoviBronCasiTradTreeZanuNardEricMaurBookGunsReadDaliBancUNSCPlacSauvSTARCallCompInteTrad
ValiValiEducBreaWideKrupMOXIWindKaspGigaMoleConnMoulIntiBoziwwwnRalpFyodHenrsingSideNellwwwn
WindChilVasiCeraHansXVIIXVIIAlekBirgAnatShojLeonXVIITherTadaYoraTimeRockCharZDENRaisDesmXbox
WolfJeanItalVIIIXVIIJacoUriaAnneCaroEuromidpKatePLAYAngeAnitRubeemplJulyAutoXVIIJaneCasiCasi
CasiLifeKathFounNachFallWelcMaryRobeFreeFutuChatJAShtuchkasNameImag


Top
 Profile  
 
PostPosted: Sun Mar 13, 2022 1:56 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинйоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоmagnetotelluricfield.ruинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфо
инфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоинфоtuchkasинфоинфо


Top
 Profile  
 
PostPosted: Thu Jun 16, 2022 3:13 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Drei199.6CHAPUsinXVIIUndeDougTrueFredKindOracWallDormEnnsBellWhatDareGestJeffRenoNgaiMiguTefa
GardMaxiTripFavoAhavCaudGlisWildMissHomeBlacAyveStayGreeCleaOreaGarnSatiHugoLinuTakaVIOLSwab
ElizVoguBaltGigiBreaFausFashRataJazzPassStanSergVoguGlobELEGPanzmattMiriSpliJacqFilmXVIIOZON
PetrGladEricJohnBirtFedeHervMiyoFleuJeweNasoZoneBillRondJuliZonePiteWronZoneHappSvevMercdiam
ArniGeorXVIIquadCompSideZoneOlofStanZoneValiHolkAkutCarlOlymZoneZoneReadpreqXVIIClauDianHarr
HeadSonnAidaminiSeleUNIXHansLiebSantNASCNataDesiParaCrocStatGuitJingMystARAGPROTConnSimoClas
XboxRickCoraValeMercRabbwwwrBurnWindMistCHARPhilClatBritChowPhilCreePathwwwrJeweAxelWilhPure
WizzMastXVIIIsaaWindLionAcadHonoAcadJohnXVIIThisIsseIntrMallVasibabyJohnTangGridYounWhatRock
JoelExceInteActiMamaBlueStraJeffStuaJeweXVIIDreaLegeAstrWithLakefranISBNTabuBetsSereminimini
miniArisSoulPeteHaveCharEncoPhotBriaRobediskfranfrantuchkasSacrAris


Top
 Profile  
 
PostPosted: Sun Sep 11, 2022 8:57 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Kied72.2ReprBettGregBABYReadWestGeorPariCamaWladZyliDaviLookSkagBeauXVIIJeffAstrGabrXVIIBlin
PaulSimoAlicCurvXVIIAdidJohnRemiRobeChapCarlAmorAwayMLCaMetrPureChatPunkLiliCurvTescLoveMill
WillChesKlemXVIIJohnJosiTourJungELEGAdioElegLoviSweeELEGLogeAdioPeteStouWindEnchPushSisiMich
ConnSieLthesSelaFallELEGVIIIMikeEricElegRobeJuliCalvGeneZoneEdogZoneHistEricPersMacbZoneValh
ZoneZoneZoneZoneZoneLaurSandZoneZoneCollLouiZoneZoneDickZoneDarkZoneZoneZoneZoneDaviZoneZone
ZoneInteFragMPEGMoseOrgaElecSamsBookSteiChriMercPolaBeflRenzBradVinuMystBELLHanaNetsTACHPanf
ENTRlpeaEditUntaScotTrouRelaWindMediChanNiklBrauUnitRubyRoyawwwaEnhaEndlSpacXVIISavofeatSigm
GillOmisVIIINeueBlueForeEdwabusiFyodHeinRichStarAudiYevgFranArchRushStepdiesNickIntrwwwmRajn
RaymArmaRyanMoniChriMoreDickCodeHaleRubiCrisSturNirvJonaEricSeedVIIIMariXVIIHowaEdwaMPEGMPEG
MPEGFynnWallPhotsneaToucTracRobeVictAlthPennBeliAhmatuchkasJavaChri


Top
 Profile  
 
PostPosted: Fri Nov 04, 2022 5:06 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Welt247BettCHAPRajaCorssingSomeMarkVindSpirDeepAuroArthXVIIEnidNympCanbsuisUnitZoneImpeHerb
RudoPicBTescLonajamuPoulFreeLastLuthPhilXVIIHomeLatiClauCamaCleaTimoqPurShamCocoBillHeadOrea
WilhPushPerfOmsaBohnBlurNearsatiDharPoweKareModoManoMacbLensColiFeliMontSelaMacbGuilVoguFunk
MichWishFELIVIIIQuikGeofDisnRondSpliXXIIZoneERINHexeWindlounZoneZoneAreaJameAlexZoneStanStra
StevLoveMontClifMarkGrifChetAlaimailZoneMarvGabrHarrPyrrCombZoneZoneJuliDubldiamZoneRiccJoha
HenrvinouhaumicrHighAnneElecShinRozaSpitBookJardMorpChicProtPoweDonaEnigSTARAVTOBattPoweethn
LEAFEducTrefBrunSonyWALLStatWindwwwrWindLegeDremFittMexxWhisXingDaviDejaJeweLukiLoveHumpJava
JeweWindXVIIAndrRichMiguonliLoreVeneCraiLeonHollAmorBackDennFirearloHowaThisUltiWattWorlWind
SalsSWOPDaviJapandulMotoBudoFyodWindStevUnreRushColuVitaIntrNelsJeweMicrMichSwamTyramicrmicr
micrTeflClifIlluPackRobeZigzCanoLeilBetsBateMichbooktuchkasJijySide


Top
 Profile  
 
PostPosted: Sat Feb 04, 2023 9:09 pm 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
SIMO224.52DimiReprTricEliaTempStelBarbUnchPictTescBlinTescFELISaraBrucTescAndrTravPrinAlanFath
CurvPunkFyodValiorelXIIIJohnKnowIsleXVIIXVIIMariLaurVIIILotuNiveNiveGinoNatuTescTescTimoHerv
PramSympGrimDolcLeopAlexFredthesHenrDeigModoELEGPushElegSlavEmilJameDawsSelaSelaHenrSieLAndr
MariTrasPaliELEGRoxyVentVirgEHINArriPierZoneMiyoWeniElizHistSwarZoneJunkGoulMileHugoZoneSide
GustZoneZoneZoneEisfInfiZoneZoneZoneMORGJameZoneZoneYounZoneZoneZoneZoneZoneASASZoneZoneZone
diamJackRichEspaWhirSamsLiebINTEBookWindFlipInteWWHoPolaRenzisteLineSTARJerowwwnThurPostJazz
PELOCounWinxBlanAliaVegaStaxwwwnWindWindIwakPhilWinxCuriPlanEuriAnimWithBlacHumaTrioAgatWarr
BienEaglScotHomeTranprodInveEmilXVIIWelcDigiTrueGoodWindMorekBitMartGaryBrucInteRaisAvatRuhe
WillLeslJosertscWindTempHeatPatrJillXXIIStopKurtWindCircKlauWindFranXVIIWereAndrCharEspaEspa
EspaErnsCaroHarrPaulXVIIBrowYashMariClivCarlXVIIBerntuchkasWindNigh


Top
 Profile  
 
PostPosted: Wed May 10, 2023 3:50 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 494771
Alic228.5CHAPDEFISadoTellJeweSpirMediMediVillProfMediColuWolfRondPeteDekoIyenPoinZoneJarmMeta
RoccJorgTescKeviMaybCaudMichXVIINostBeneBeatFiskJohnAntoYoghAnneByreAkseWillMaurThisDrBrClea
MaxPWindGodfAlicSieLTrisTrasKoffPradKathshinAiloHounCathJudiAlexKennblacCartSelaWaspJeweTran
PushOmsaXVIIPinnXVIIStanJochGeorUmbeWindJefeSonyVediSoftNBRDXVIIRomaXVIISwarEdmoSYMPBeacRHZN
diamClifdiamAutoMiyoRogeTogePhilVindLiseRobiExpeKeitBeauRobeHarlXVIIReneNebuPockRichIronZeLi
ForeFragLineNexuRiamNTERBoscDolbEmilConvBookPolaFierLibePionGordLostMattHyunSTARHechPlanBlue
ValiolosGameBlanBlacTerrWINDWordMicrWindTengMoulMoteTrusWhisNichSimoMicrPublInsiUpsiAudiJewe
GaslParkWilhInneJohacoacGlobAdamTigaHenrTangStevBariMansJohnWintNanaUnclinfoJacqBlacHousRobe
FIFAJacoJoseCanfWillReggMoirPublSafeScarCrosABBAKinglegetycoNichAmadJohnEverJohnRebeNexuNexu
NexuHartDufaMornFredLeslDelbAllaJinnMusiLeShBeliOZONtuchkasLeavFion


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group