Jump to content

Recommended Posts

Posted

Hello Guys Today i find one guide on Google for Make Program in Visual BaSiC and i share here

 

Write your First Visual Basic Program

This Tutorial is for completely beginners with Visual Basic. It will teach you right from the very start, how to make your first program in Visual Basic.

Lesson 1 will give you introduction to Visual Basic and will teach you the basics.

Lesson 2 will teach you about variables.

In Lesson 3 you will learn more about Events and properties

 

  • Lesson 1

What Is Visual Basic and Why do I need it?

Visual Basic is Easy to learn Programming language.

With Visual Basic you can develop Windows based applications and games.

Visual Basic is much more easier to learn than other language (like Visual C++),

and yet it's powerful programming language.

 

Visual Basic suit more for application developing than for Games developing.

You can create sophisticated games using Visual Basic, But

If you want to make a really advanced professional game like Quake 2,

You may choose other language (like C++), that would be much more

harder to program with.

However,  Visual Basic will be probably powerful enough to suit all your application

and games programming needs.

 

The advantages of Visual Basic:

1) It's simple language. Things that may be difficult to program with other language,

    Can be done in Visual Basic very easily.

2) Because Visual Basic is so popular, There are many good resources (Books,

    Web sites, News groups and more) that can help you learn the language.

    You can find the answers to your programming problems much more easily

    than other programming languages.

3) You can find many tools (Sharewares and Freewares) on the internet that will

    Spare you some programming time.

    For example, if you want to ping a user over the internet in your program,

    Instead of writing the ping function yourself, you can download a control

    that does it, and use it in your program.

    Compare to other languages, Visual Basic have the widest variety of tools

    that you can download on the internet and use in your programs.

 

The disadvantages of Visual Basic:

1) Visual Basic is powerful language, but it's not suit for programming really

    sophisticated games.

2) It's much more slower than other langauges.

 

Click Forward to start writing now your first Visual Basic program!

 

  • Lesson 2

Learning about Variables

Using Variables is one of the most basic and important subjects

in programming, so this lesson is very important.

 

Variables are destined to save data.

You can save in variable Text or number.

For example, you can have one variable that holds the Text "Hello and Goodbye",

and have another variable that holds the number 623882

 

You can think about variables as a cabinet's drawers.

Every drawer has a sticker on it with its unique name.

You can put in each one of the drawers one number or one text String.

During your program, you can open the drawer with the sticker "TheUserName"

and get the text string that found inside the drawer.

You can also delete the text string that found inside the drawer

and put instead of it other text string.

 

 

Right now, we are going learn about 2 variable types.

The first type called Integer.

Integer variable can store an Integer number (round number without any fraction)

between -32,768 to 32,767.

 

You can store in Integer variable the number 0 or the number 375 or

the number -46, but you can't store the number 4.5 (Because of the .5)

or the number 100,000 (Because It's bigger than 32767) or the

number -50,042 (Because it's smaller than -32,768)

 

 

The second type called String.

You can store in String variable any text that you want.

For example "Hello" or "abcDDefGhIjk123456 blah blah %$#@!???        Blah!"

  • Lesson 3

The Command Button's KeyPress, KeyDown and KeyUp Events

The events that will be mentioned in the following pages

are commonly used, and without learning about them

you really can't go anywhere in Visual Basic programming.

 

To try these examples, start a new project (as being

taught in Lesson 1).

 

Add 1 Command Button to your form. The Command

Button is called by default Command1.

 

Copy the following code to the code window (you

can copy and paste it using Ctrl + C for copying

and Ctrl + V for pasting):

 

 

Private Sub Command1_KeyDown(KeyCode As Integer, Shift As Integer)

    Print "KeyDown"

End Sub

 

Private Sub Command1_KeyPress(KeyAscii As Integer)

    Print "KeyPress"

End Sub

 

Private Sub Command1_KeyUp(KeyCode As Integer, Shift As Integer)

    Print "KeyUp"

End Sub

 

 

When the Command Button's KeyDown event will be executed,

"KeyDown" will be printed on the form,

When the Command Button's KeyPress event will be executed,

"KeyPress" will be printed on the form, and when

the Command Button's KeyUp event will be executed,

"KeyUp" will be printed on the form.

 

 

Run the program, and click the button with the mouse.

Nothing has happened.

It's because the KeyDown, Key_Press, and KeyUp events are

being executed Only when you press a key on the keyboard.

 

Now press any key on the keyboard, hold it down for few seconds,

and then release it.

Your form will look like this:

 

Figure 1

first-37.gif

Lets see:

The first event that been executed is the KeyDown event,

because "KeyDown" was the first text that been printed on the form.

 

The second event was KeyPress, and then again KeyDown.

After every KeyDown event that been executed, a KeyPress

event had been executed.

 

We learnt that when a key is being holded down, the

KeyDown and the KeyPress events are being executed in

this order over and over again, until the key is up again.

 

When you release the key, the KeyUp event is being executed once.

Conditional Statements Tutorial

Learn what are conditional statements (If ... Then, Select Case ...) and how to use them in your programs.

 

  • Lesson 1

 

What Are Conditional Statements?

Suppose you want to protect your program with password.

You ask from the user to enter the password.

If the password is correct - you want to let the user in, if not - you want to end the program.

 

To do this, you have to use conditional statement because

the code you will execute (let the user in or end the program) is

depend on what is the password that the user has entered.

 

One of the basics of Conditional statement are Boolean variables.

Boolean variables are commonly used in programming,

and you have to understand them before continuing with conditional statements.

 

Boolean Variables

As we learnt, String variables store text, and

Integer Variables Store numbers.

Boolean variable stores one of the following constant values:

"True", or "False".

 

For example:

 

Dim Kuku As Boolean

Kuku = True

Dim YoYo As Boolean

YoYo = False

 

What are the True and False stand for?

They are the result of every "Boolean expression".

 

Boolean Expressions

Boolean expression is like a question that

the answer to it is "True" or "False"

 

For example:

Is 4 Plus 6 is 10? True

Is 2 bigger than 4? False

 

But the question

How much is 4 Plus 6?

Is not a boolean expression, because its answer

is 10 (and not True or False)

 

Examples of Boolean expressions in the next page.

 

Make your First ActiveX Control

Learn how to make your First ActiveX Control in Visual Basic, and compile it to OCX file.

 

  • Lesson1

 

First of all, what is ActiveX Control?

ActiveX control is control like all visual basic

common controls: Command Button, Label, etc.

You can make your own ActiveX control, for example

hover button control, and use it in every VB program

you make without addition of code.

Instead of writing the same code every time you want

to use the hover button, make once hover button

ActiveX control, and drag it to your form every time you

want to use it, like it was the usual Command Button.

 

How can you make your own ActiveX control?

In this tutorial we will make a button control, that will pop

a message box when the user will click on it.

I know that it's not very useful, and for this purpose you

don't have to make an ActiveX control, but this example

will teach you how to make an ActiveX control.

 

  • Lesson 2

 

Adding more properties to the control

Now we want that the control will have all the Command Button properties.

lets add the BackColor property. Enter the following code to your form:

 

Public Property Get BackColor() As OLE_COLOR

    BackColor = Command1.BackColor

End Property

 

Public Property Let BackColor(ByVal New_BackColor As OLE_COLOR)

    Command1.BackColor() = New_BackColor

    PropertyChanged "BackColor"

End Property

 

Enter the following line to the UserControl_ReadProperties function:

Command1.BackColor = PropBag.ReadProperty("BackColor", &H8000000F)

 

Enter the following line to the UserControl_WriteProperties function:

Call PropBag.WriteProperty("BackColor", Command1.BackColor, &H8000000F)

 

The OLE_COLOR is the type of the BackColor property variable,

the same as the Boolean is the type of the Enabled property variable,

and the Integer is the type of the Height property variable.

 

 

What we did now is almost the same as we did with the Text property.

The difference is that in the text property we used

a variable (TextVariable) to store the property information.

Here we not using a variable, we read and write the information

directly to the Command1.BackColor property.

 

The Command1.BackColor property is here our variable that store

the information. Why is that?

Because when the user set the Control BackColor property,

we actually want to set the Command1 BackColor property.

Suppose the user set the Control BackColor to Black.

In that case, We want to set the Command1 BackColor to Black.

So actually, the Control BackColor property is the

Command1 BackColor property.

So instead of reading and writing to variable,

we read and write directly to the Command1 BackColor property.

 

It's exactly the same thing with all of the other properties.

 

Working with Resource File

Learn how to put mulitple Image files, Sound files, Text files and other files in one single Resource File, And how to access all these files from your program.

 

  • Lesson 1

 

What is Resource File?

Resource file is file that can contains multiple image files (BMP, GIF, JPG, ICO and more), Cursors (CUR), Sound files and other files.

All these files can be in single Resource file, and you can access them from your program. For example, you can load an icon from resource file to your Command Button.

Resource file has RES extension.

 

Why should I use Resource File?

Resource file is very useful when you use the same image several times in your code.

For example, you have two Command Buttons with the same icon or two Picture Boxes with the same BMP picture.

If you won't use resource file, but simply add the same icon to both Command Buttons Picture property, the icon will be embedded in each of the Command Buttons. so actually, your icon will be saved twice, and your application file will be bigger.

If you'll use resource file, you will have only 1 icon saved in your application.

 

 

  • Lesson 2

 

Accessing GIF and JPG files from your Program

There is no Built-In option to load GIF and JPG files, There is no vbResGIF or vbResJPG.

So to load these files you'll have to use the following Function:

 

Public Sub LoadDataIntoFile(DataName As Integer, FileName As String)

    Dim myArray() As Byte

    Dim myFile As Long

    If Dir(FileName) = "" Then

        myArray = LoadResData(DataName, "CUSTOM")

        myFile = FreeFile

        Open FileName For Binary Access Write As #myFile

        Put #myFile, , myArray

        Close #myFile

    End If

End Sub

 

 

What does this function do?

The function gets two parameters: DataName and FileName.

It simply copy the File that found in the resource file, under the CUSTOM "Folder" With the Id that found in DataName variable.

The new file name will be the String that found in the FileName variable.

 

For example,  assume I have a resource file, with EXE file that found under the CUSTOM "Folder". The EXE file ID is 101.

Calling to: LoadDataIntoFile 101, "c:\MyDir\myFile.ddd"

Will copy the EXE file to c:\MyDir\myFile.ddd

It doesn't matter if the file is EXE, GIF, JPG, TXT or WAV.

Because of that, this function can extract any file from resource file, and can be used to extract Sound files, Text files, and other files.

 

 

Credits:cuinl tripod

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • 🏰 L2EXALTA LEGACY — Interlude x45 📅 Grand Opening: 31/07/2026 — 21:30 (GMT+3) 🌐 Website: https://l2exalta.org/ 💬 Discord: https://discord.gg/zNTCZD4AcT 📌 Wiki: https://l2exalta.org/en/wiki.html#progression   ⚙️ MAIN INFO Chronicle : Interlude Rates : x45 Adena : x50 Spoil : x1 Drop : x5 Safe Enchant : +3 Files : L2OFF   💰 ECONOMY EX Coin : dynamic market currency, mined from monsters, Raid Bosses and Grand Bosses value fluctuates over time Exalta Vouchers : premium currency used for store, donations and EX Coin exchange Exchange : convert EX Coin into Exalta Vouchers Investment options : choose safer or riskier market strategies with EX Coin   ⚔️ PROGRESSION & GEAR Exalta Armors : signature top-tier gear line Forge System : upgrade weapons, armor and jewels with risk/reward mechanics Raid Boss progression tied to materials and prestige   🤖 AUTOFARM Access : Auto Hunting button, bottom-right UI Duration : controlled via tickets or in-game currency Route Mode : record custom farm routes Support Mode : healer/support builds auto-follow, heal and assist party Smart targeting logic with class-specific behavior (mage/archer/melee/support) Captcha designed not to interrupt legitimate AutoFarm sessions   🧪 BUFFER Exalta Buffer NPC/interface Scheme Buffer : save multiple buff loadouts Class presets for mage, fighter, support, PvP   🛠️ SMART GADGETS / QOL Autoloot filter Drop value tracker Boss timer tools Farm stats tracker Auto-consume system In-game server assistant   🗺️ DUNGEON FINDER / PVE Party matching with roles (Tank / Healer / DPS) Ready-check before teleport Monastery of Silence custom PvE zone Party-based reward structure   🎟️ DAILY PROGRESS / EXALTA PASS Daily and weekly tasks (farm, PvP, boss, check-in) Premium Pass track with extra rewards Monastery Daily Quest Reward boards for claiming progress   🏠 HOUSING & EXPEDITIONS Player residences with service NPCs Exalta Spirit Expeditions to themed territories Rewards vary by territory Owner-only access   🏆 PVP / TOURNAMENT Scheduled Tournament system Ranking points from wins/participation Spectator Mode for watching live matches PvP Statues for top-ranked players Anti-feed protections   🛡️ CLAN CONTENT Clan Civil War battlefield event Clan Dungeon Raid content DPS Meter for contribution tracking Support Credit system Classic siege/clan politics preserved   🏪 AUCTION / SHOPS Auction House with seller fee Black Market Dealer (limited-time special offers) Custom shops and multisells Confirmation prompts on purchases/sales   💳 DONATIONS / VIP Donation rewards linked to Exalta Vouchers VIP tiers with comfort/cosmetic bonuses Premium store Gift/promo codes for events   🎥 STREAMER / COMMUNITY Streamer Panel with visible stream links Viewer rewards system Streamer Points for cosmetics/vouchers In-game voice chat (global/party/clan/alliance/command)   🔒 FAIR PLAY Strong Anti-Bot protection Reward protection tied to valid client state Captcha on suspicious activity Staff investigation tools No bots, packet tools or modified clients allowed   👑 GRANDBOSS SPAWNS Orfen : 1 day + 1h random Core : 1 day + 1h random Queen Ant : 1 day 6h + 1h random Zaken : 2 days 12h + 1h random Baium : 5 days + 1h random Antharas : 8 days + 1h random Valakas : 11 days + 1h random   🏅 OLYMPIAD Runs Thursday, Friday, Saturday Heroes change monthly Balanced and fair matchmaking
    • yup basically another one just in case https://drive.google.com/file/d/1UtccbD9e50x3WEnQBab2PTZnBHwpcGYM/view?usp=sharing LineageWarrior.FMagic (CollideActors = True; > False) LineageWarrior.FOrc (CollideActors = True; > False) LineageWarrior.FShaman (CollideActors = True; > False) LineageWarrior.MDarkElf (CollideActors = True; > False) LineageWarrior.MDwarf (CollideActors = True; > False) LineageWarrior.MElf (CollideActors = True; > False) LineageWarrior.MFighter (CollideActors = True; > False) LineageWarrior.MMagic (CollideActors = True; > False) LineageWarrior.MOrc (CollideActors = True; > False) LineageWarrior.MShaman (CollideActors = True; > False) LineageWarrior.FDwarf (CollideActors = True; > False) LineageWarrior.FElf (CollideActors = True; > False) LineageWarrior.FFighter (CollideActors = True; > False)
    • @l2naylondev Requiring a player to log in just for the sake of logging  seems exploitable. Someone could log in only to claim the reward and immediately leave, or repeatedly change their ip. So i guess  are there are additional protections in place ? such as locking the reward by account, character , and ip. It would also be useful to add a playtime requirement. For example, after logging in, the player would need to remain active for at least x playtime  before getting the reward or other parameters configurable by the xml.  I suggest improving the system before selling it. 
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..