Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,154,193 members, 7,822,026 topics. Date: Thursday, 09 May 2024 at 02:17 AM

Post Ur Vb 6.0 Questions Here - Programming (9) - Nairaland

Nairaland Forum / Science/Technology / Programming / Post Ur Vb 6.0 Questions Here (40261 Views)

A Comprehensive Tutorial On Vb 6.0 / My Board Games In Vb 6.0 / Vb 6.0/vb .NET & Intranet/internet Application Development (2) (3) (4)

(1) (2) (3) ... (6) (7) (8) (9) (10) (11) (12) ... (16) (Reply) (Go Down)

Re: Post Ur Vb 6.0 Questions Here by soolari(m): 8:28pm On Mar 29, 2009
I want, To it also, well this the que= vb program to calculate the 4 different courses and with the student result, and g.p Thanx @lucky and write the source code out
Re: Post Ur Vb 6.0 Questions Here by soolari(m): 8:29pm On Mar 29, 2009
I want, To it also, well this the que= vb program to calculate the 4 different courses and with the student result, and g.p Thanx @lucky and write the source code out
Re: Post Ur Vb 6.0 Questions Here by luckyCO(m): 11:04am On Mar 31, 2009
You mean you need just a code that will calculate student GP after accepting scores from the system.
Let me give u clue for a single student .

dim GPx as single,TotalCouserPoint as integer

private sub command1_Click
dim gp as single
GPx =0
TotalCouserPoint=0

CaculateGrade val(textbox1.text),4)
CaculateGrade val(textbox2.text),3)
CaculateGrade val(textbox3.text),2)
CaculateGrade val(textbox4.text),6)
CaculateGrade val(textbox5.text),2)
CaculateGrade val(textbox6.text),2)

gp=GPx /TotalCouserPoint
msgbox "GP is " & gp

end sub


private sub command2_Click
GPx =0
TotalCouserPoint=0

'if you created your textbox in an array use this
dim gp as single
dim J as integer
for J=0 to textbox1.Ubound

CaculateGrade(val(textbox1(j).text),val(lblCoursePoint(j).caption))

next j


gp=GPx /TotalCouserPoint
msgbox "GP is " & gp

end sub


private function CaculateGrade(Score as Integer,CouserPoint as integer) as string

if Score >100 or Score <0 then exit function
Counter =Counter +1

select case score
case 90-100
GPx =GPx + (5.0*CouserPoint )
TotalCouserPoint =TotalCouserPoint +5.0
msgbox "A"

case 70-89
msgbox "B"
GPx =GPx + (4 * CouserPoint )
TotalCouserPoint =TotalCouserPoint +4.0

case 50-69
msgbox "C
GPx =GPx + (3.0* CouserPoint )
TotalCouserPoint =TotalCouserPoint +3.0

case 40-49
msgbox "P"
GPx =GPx + (2.0* CouserPoint )
TotalCouserPoint =TotalCouserPoint +2.0
case else
msgbox "F"
end select

end sub

You need to create testboxes just as the number of your courses and the same time you should provide what will feed you with the course point.

See how this helps you. U might get some bugs since I didnt code it on the environment, so please do bear with, I know you can correct if any.

Remain Blessed.
Re: Post Ur Vb 6.0 Questions Here by soolari(m): 11:54am On Mar 31, 2009
Thanx, very much thiz iz another assignment write a vb program to design a payroll of a company, use any vairable thanx am, expectin 2day thanx
Re: Post Ur Vb 6.0 Questions Here by soolari(m): 12:28pm On Mar 31, 2009
And, give me ur phone no, plz am xpectin dat assgnment plz
Re: Post Ur Vb 6.0 Questions Here by fatezy(m): 12:32pm On Mar 31, 2009
@soolari, try doing some yourself & ask questions when u r stuck, Its not helpful if lucky0 writes everythin 4 u
Re: Post Ur Vb 6.0 Questions Here by soolari(m): 3:34pm On Mar 31, 2009
Am, askin cause i vista lappy no gre install the visual studio and i haven't tried it b4 that why am askin, if nut i wunt ask, instead be teachin ppl
Re: Post Ur Vb 6.0 Questions Here by fatezy(m): 4:17pm On Mar 31, 2009
Ok, Try visual studio 2008. Thats what I use on my vista.
Re: Post Ur Vb 6.0 Questions Here by soolari(m): 9:20pm On Mar 31, 2009
Whr, can i get that frm @fatezy or and hlp me with that assignment am sumittin it 2morrow thanx
Re: Post Ur Vb 6.0 Questions Here by fatezy(m): 10:55pm On Mar 31, 2009
If u stay in lag, u could try comp. village
Re: Post Ur Vb 6.0 Questions Here by soolari(m): 4:40am On Apr 01, 2009
yeah i stay in lag, wht about this assignment can u just hlp me out, thankx
Re: Post Ur Vb 6.0 Questions Here by luckyCO(m): 1:35pm On Apr 03, 2009
fatezy:

@soolari, try doing some yourself & ask questions when u r stuck, Its not helpful if lucky0 writes everythin 4 u

Thanks for your advice, that is what I always advice my young programmers but they would think I dont want to teach them.
I had little problem when I was in the school abt it, where people would like u to spoon feed them with programming at then u see them not programmers.
Instead of provoking them or to making them think otherwise I give them what they want.
But I dont call it waste of time.
Re: Post Ur Vb 6.0 Questions Here by soolari(m): 4:50am On Apr 05, 2009
Not dat, i dnt wana do it my slf u are mistakin, b4 i no hw 2 do configuration no, 1 teach me just that am not gettin the right software that iz, well are u hlpin me out nw, or nut
Re: Post Ur Vb 6.0 Questions Here by luckyCO(m): 2:44pm On Apr 06, 2009
Am lost, please can u ask ur question again?
Re: Post Ur Vb 6.0 Questions Here by soolari(m): 9:29am On Apr 07, 2009
Vb program for a Payroll of a company usin any vairable
Re: Post Ur Vb 6.0 Questions Here by luckyCO(m): 11:45am On Apr 07, 2009
U will only do a work for and I will write it for u.
Describe to me what u want and hw u want me to write the program for u.
I want to u to be my system analysis.If I get it 2day I will write the program for u.
Am doing so such dat you will be part of the solution.

Hope am not demanding much from u.
Re: Post Ur Vb 6.0 Questions Here by faoni572(m): 3:10pm On Apr 07, 2009
Hi luckyCO, how are you doing? Pls I have two questions and they are:

1. How can someone create database and table at run time instead of creating it in MS Access first
2. How can someone write code that can minimise a program to tray (to be among the icons at the right hand side) instaed of task bar and when someone click the icon on the tray it will show up again

Many thanks to you for the help you have been given me. I will be expecting your reply.
Re: Post Ur Vb 6.0 Questions Here by luckyCO(m): 4:12pm On Apr 08, 2009
That is small but long code that I cant just type here now. I will write it maybe tomorrow I will sent it to u.
Happy easter in Advance!
Re: Post Ur Vb 6.0 Questions Here by luckyCO(m): 10:57am On Apr 10, 2009
You need 2 command button,textbox, picture box and timer to make this work. I hv written the program, so download and run it.

I couldnt upload the file for u but you can hit www.cyprosoft.net/products/SystemTray.rar to download the sample code.

Take care
Happy Easter!

U may look at its code below

Option Explicit
Private Type NOTIFYICONDATA
cbSize As Long
hWnd As Long
uId As Long
uFlags As Long
ucallbackMessage As Long
hIcon As Long
szTip As String * 64
End Type

Private Const NIM_ADD = &H0
Private Const NIM_MODIFY = &H1
Private Const NIM_DELETE = &H2
Private Const WM_MOUSEMOVE = &H200
Private Const NIF_MESSAGE = &H1
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4

Private Declare Function Shell_NotifyIcon Lib "shell32" _
Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid _
As NOTIFYICONDATA) As Boolean

Dim t As NOTIFYICONDATA
Dim Conn As String

Private Sub Command1_Click()
On Error GoTo errh

CommonDialog1.FileName = "DbName.mdb"
CommonDialog1.ShowSave
Conn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & IIf(Right(UCase(CommonDialog1.FileName), 4) <> ".MDB", CommonDialog1.FileName & ".mdb", CommonDialog1.FileName)

Dim ADOXcatalog As New Catalog
ADOXcatalog.Create (Conn)

Exit Sub
errh:
MsgBox Err.Description

End Sub

Private Sub Command2_Click()
On Error GoTo errh
Dim SQL As String
SQL = "CREATE TABLE " & txtTableName.Text & "(Name text, Address text, age number)"
Dim db As New ADODB.Connection
db.ConnectionString = Conn
db.Open
db.Execute SQL

Exit Sub
errh:
MsgBox Err.Description

End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

Timer1.Enabled = False

t.cbSize = Len(t)
t.hWnd = Picture1.hWnd
t.uId = 1&

Shell_NotifyIcon NIM_DELETE, t

End Sub

Private Sub mnumin_Click()
Me.WindowState = 0
End Sub

Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'click to activate
'If Button = 1 Then
' Me.PopupMenu menu1
'End If

'right click to activate
If Hex(X) = "1E3C" Then
Me.PopupMenu menu1
End If

End Sub

Private Sub Timer1_Timer()
Static i As Long, img As Long
t.cbSize = Len(t)
t.hWnd = Picture1.hWnd
t.uId = 1&
t.uFlags = NIF_ICON
t.hIcon = Picture1.Picture
Shell_NotifyIcon NIM_MODIFY, t
Timer1.Enabled = True
i = i + 1
If i = 2 Then i = 0
End Sub

Private Sub Form_Load()
txtTableName.Text = "StudentTable"

t.cbSize = Len(t)
t.hWnd = Picture1.hWnd
t.uId = 1&
t.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
t.ucallbackMessage = WM_MOUSEMOVE
t.hIcon = Picture1.Picture
t.szTip = "Click To Restore" & Chr$(0)

Shell_NotifyIcon NIM_ADD, t

Timer1.Enabled = True

'Me.Hide

App.TaskVisible = Time

End Sub
Re: Post Ur Vb 6.0 Questions Here by soolari(m): 12:16pm On Apr 12, 2009
Thanx hun.@lucky but whr can i get the command button on vb 2008, i only see the text box and others but i can see the command butn
Re: Post Ur Vb 6.0 Questions Here by soolari(m): 12:19pm On Apr 12, 2009
Happy EastEr 2 u too, thanx pal
Re: Post Ur Vb 6.0 Questions Here by aminoritse(m): 2:12pm On Apr 14, 2009
I need help please on how i can include a photo ie image uploading object on registration form tn be able to capture passport in jpg or bitmap format along with other data of individuals. database is designed with ms access, front end with vb6. thanks as you help.
Re: Post Ur Vb 6.0 Questions Here by aminoritse(m): 2:44pm On Apr 14, 2009
Can someone in the house tell me if its possible to package reports designed with crystal report writer along vb6 program such that the report can be viewed at run time. HOW AND WITH WHAT CONNECTION? Thanks.
Re: Post Ur Vb 6.0 Questions Here by rockafela(m): 9:28am On Apr 15, 2009
AminORITSE HOW FAR BRO, >UR MA BRODA WEL KNWN 4RM UR NAME AM OMAGBEMI 4RM DA SOUTH-SOUTH NO MATTER WAT ALWAYS REPRESENT LYK DA PRESIDENT 1VE, mcfida101 at yahu dot com
Re: Post Ur Vb 6.0 Questions Here by luckyCO(m): 4:03pm On Apr 15, 2009
U need to scroll down, all the tools are there on the toolbox.
There are many tabs, so drill down thru them, u will see the command button.
Re: Post Ur Vb 6.0 Questions Here by tunjilana: 4:53pm On Apr 19, 2009
Please can anyone help with free ebooks on visual basic 2005
Re: Post Ur Vb 6.0 Questions Here by luckyCO(m): 2:53pm On Apr 22, 2009
enter www.4shared.com and type what u need.
Re: Post Ur Vb 6.0 Questions Here by kkycee(m): 1:37pm On Apr 23, 2009
can any person help me with vb 6.0 code that can generate ASCII codes.write the code,run it and cope the G.U.I with the code and send it to kkycee@yahoo.com .thank alots
Re: Post Ur Vb 6.0 Questions Here by luckyCO(m): 2:52pm On Apr 23, 2009
kkycee:

can any person help me with vb 6.0 code that can generate ASCII codes.write the code,run it and cope the G.U.I with the code and send it to kkycee@yahoo.com .thank alots

I dont realy understand what u are asking.But in any case below is a code that generate ASCII Code for u

For J=0 to 255
print "ASCII Of " & J & " is " & chr(j)
next j

or
For J=0 to 255
msgbox "ASCII Of " & J & " is " & chr(j)
next j


Or
dim Store as string

For J=0 to 255
store= store & "ASCII Of " & J & " is " & chr(j) & vbcrlf
next j
clipboard.clear
clipboard.settext store

Note if vbcrlf gives u error please use vbclrf it is a code for carriae return.

Thanks
Re: Post Ur Vb 6.0 Questions Here by StanIyke(m): 8:28pm On Apr 23, 2009
Hey lucky i need 2 search for a particular record in a database{access}. How do i get 2 do that wit a primary key supplied by the person. Eg act number. I aw8 ur rply. Tanx
Re: Post Ur Vb 6.0 Questions Here by Kobojunkie: 1:05am On Apr 26, 2009
Google SQL SELECT statement and WHERE claus

(1) (2) (3) ... (6) (7) (8) (9) (10) (11) (12) ... (16) (Reply)

Java Programming For Dummies / Nigerian Software Engineer given test to prove he is an engineer at JFK Airport / Facebook Is Suing Me For This

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 35
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.