Friday, June 15, 2007

Help Needed - VB 6


Mohsin - Da -
8:44 pm(39 minutes ago) quote
Help Needed - VB6
I am new to Visual Basic .. and I want to learn about timer control ...

I just want to knw how to run 2 javascripts at a single click after a definite time interval ...I mean .. wen I press button timer starts .. after 2 secs a javascript is executed and after 6 secs another is executed and the loop continues ..

Pls tell me how to run 2 javascripts at a single button click in VB after a definite span of time ... I am tired of entering into illogical & infinite loops working with while and if statements .. Pls help me !!

Quote


.::b@d b0y::.™ ~
8:47 pm(37 minutes ago) quote
hmmmmmm......

nt tht difficult..... only a bit confusing....

lemme think.... will post it in a short while.....

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote


M.Ibrahim
8:47 pm(36 minutes ago) quote
jab sy mein nay or nauman nay vb mein kaam krna shru kya hay taab sei chotay motay programmer nay janam lei hay

n mohsin i m not talkin abt u
Quote

no photo
Pritul ☠­
8:48 pm(35 minutes ago) quote
Its easy buddy ..

just enclose drag a timer onto the form .. set its desired interval .. e.g 1000 for 1 second ...

now enlose tat in while Loop ..

While Timer1.interval

*//Set of javascripts here//*

End While
Quote

no photo
Pritul ☠­
8:50 pm(34 minutes ago) quote
was this the thing u needed ??
Quote


Mohsin - Da -
8:53 pm(30 minutes ago) quote
nahi jaani .. iss se nahi hota help !!
Quote


●н.в● LosT SouL
8:56 pm(27 minutes ago) quote
Pritul once told me Boolean is involved

lekin yeh mujhe bhi nahi ata abhi tak
Quote


.::b@d b0y::.™ ~
8:58 pm(25 minutes ago) quote
programming ka koi competition ho raha hai kya orkut pe...
meri scrapbook me aaj bheed lagi hai madad maangne walo ki!!

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote

no photo
Pritul ☠­
9:03 pm(20 minutes ago) quote
Private Sub Timer1_Timer()
Static bln As Boolean
If bln Then
//code1
Else
//code2
End If
bln = Not bln
End Sub


do u need this ????
Quote


●н.в● LosT SouL
9:06 pm(17 minutes ago) quote
Quoted Message .::b@d b0y::.™ ~ @ 8:28 pm (6 minutes ago)

programming ka koi competition ho raha hai kya orkut pe...
meri scrapbook me aaj bheed lagi hai madad maangne walo ki!!

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'





Main bhi aon tumhari scrapbuk main
student banke
Quote


.::b@d b0y::.™ ~
9:10 pm(15 minutes ago) quote
@pritul
the time in this code wud be equal 4 both.....
coz ur using only 1 timer

wht he needs wud require 2 scripts in 2 different timers wid diff tym intervals.



@all
ok, its a lil tricky, but really easy as well. n00bs may try thr skills....

mayb u'll manage 2 find the apt code. this, i think, wud help develop thr programming skills....
i'll tell u correct code if the query is still left unanswered till nothr few hours...

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote


Mohsin - Da -
9:10 pm(14 minutes ago) quote
@ Pritul

no yaara .. pls read wat I have said ..

I just want to knw how to run 2 javascripts at a single click after a definite time interval ...

wat u have given uss se nahi hota .. pls help me .. anyone pls all u orkut geniuses
Quote


●н.в● LosT SouL
9:11 pm(13 minutes ago) quote
Yes

i got that thing BB is tryng to Xplain
Quote


Mohsin - Da -
9:12 pm(12 minutes ago) quote
@ Bad boy .. pls doosro ko baad mai de deyna .. mujhay abi bata dou ..

i need it urgently
Quote


●н.в● LosT SouL
9:13 pm(11 minutes ago) quote
Quoted Message Mohsin - Da - @ 8:40 pm (1 minute ago)

@ Pritul

no yaara .. pls read wat I have said ..

I just want to knw how to run 2 javascripts at a single click after a definite time interval ...

wat u have given uss se nahi hota .. pls help me .. anyone pls all u orkut geniuses




Lolz

ismain orkut geiuses ka nahi
vb geniuses ka kaam hai
Quote


.::b@d b0y::.™ ~
9:15 pm(9 minutes ago) quote
ok, herez a final hint.....

just 4 all the luvely n00bs @ OUG!!

start timer 1
run the code
this disabled
timer 2 enabled
end timer 1

start timer 2

run the code
this disabled
timer 1 enabled
end timer 2


ab bhi ja naa kar paya, wo..... wo...... wo..... kuchh nahi kar sakta!! rehne do!!

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote


●н.в● LosT SouL
9:16 pm(8 minutes ago) quote
Quoted Message .::b@d b0y::.™ ~ @ 8:45 pm (0 minutes ago)

ok, herez a final hint.....

just 4 all the luvely n00bs @ OUG!!

start timer 1
run the code
this disabled
timer 2 enabled
end timer 1

start timer 2
run the code
this disabled
timer 1 enabled
end timer 2


ab bhi ja naa kar paya, wo..... wo...... wo..... kuchh nahi kar sakta!! rehne do!!

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'



Yaar itna barra hint nahi dena chahiye tha
it givs great ideas on the codes
Quote


●н.в● LosT SouL
9:17 pm(8 minutes ago) quote
So now should i reveal the code?
Quote


.::b@d b0y::.™ ~
9:18 pm(6 minutes ago) quote
@ lost soul
ab bachaa hi kya hai code reveal karne ko..
i hav already given the biggest code....

now do the formality.... plz!

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote


●н.в● LosT SouL
9:19 pm(5 minutes ago) quote
Quoted Message .::b@d b0y::.™ ~ @ 8:48 pm (0 minutes ago)

@ lost soul

ab bachaa hi kya hai code reveal karne ko..
i hav already given the biggest code....

now do the formality.... plz!

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'



lmaozZ

u are right
ab bacha kuch nahi

lekin baad main paa chale he is asking that "Oye yaar mujhe kuch samajh nahi aya plz sahi code dedo"
Quote


Mohsin - Da -
9:20 pm(9 minutes ago) quote
Yes HB pls do that .. i am really new here

and cant understand this
Quote


●н.в● LosT SouL
9:21 pm(8 minutes ago) quote
@bad boy


hahahhahahaha
dekh liya
Quote


.::b@d b0y::.™ ~
9:22 pm(7 minutes ago) quote
@lost soul
fir usko main baahar ka raasta dikhaaunga.....!!

abe bachche ko bhi ab samajh aa jaana chahiye ki kya karna hai!!
aur agar ab bhi nahi samjhaa... to uska code karna hi bekar hai..
usko mera suggestion hai:
"bahar jao, tehlo, aish karo, movie dekho, sitiyabaji karo, ur not worth this work!!"

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote


.::b@d b0y::.™ ~
9:23 pm(6 minutes ago) quote
@all
m sorry 4 my harsh words, but this is true!!!

cant do spoon feeding here!!

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote


Pяαтєєk ®™......
9:24 pm(5 minutes ago) quote
are phir to scrap flooder ka bhi hoga na. to flood for 250 scraps and then stop for half an hour??
Quote


●н.в● LosT SouL
9:24 pm(5 minutes ago) quote
Quoted Message .::b@d b0y::.™ ~ @ 8:52 pm (0 minutes ago)

@lost soul

fir usko main baahar ka raasta dikhaaunga.....!!

abe bachche ko bhi ab samajh aa jaana chahiye ki kya karna hai!!
aur agar ab bhi nahi samjhaa... to uska code karna hi bekar hai..
usko mera suggestion hai:
"bahar jao, tehlo, aish karo, movie dekho, sitiyabaji karo, ur not worth this work!!"

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'



kool suggestion
Quote


●н.в● LosT SouL
9:25 pm(4 minutes ago) quote
@prateek

yes

dats not too difficult
Quote


Mohsin - Da -
9:26 pm(3 minutes ago) quote
Quote


Pяαтєєk ®™......
9:29 pm(1 minute ago) quote
to bata na.......


ruka kyun hai. am trying it for a long time. and plz vb 2005 ka dena. not vb6
Quote


.::b@d b0y::.™ ~
9:29 pm(0 minutes ago) quote
@prateek...
uske liye bhi same code kaam aa sakta hai... wid a lil modifications ofcourse!!

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote
no photo
Pritul ☠­
9:30 pm(2 minutes ago) quote
this is really bad ..

@ Mohsin Da

buddy dont get depressed .. my suggestion is try try and try until u suceed .. its really bad to use such words against anybody .. all r not born coders ..

u add me at david_bkhm20@yahoo.com .. ill explain u personally how to do that with source code files and exe ..
Quote


●н.в● LosTSouL
9:31 pm(1 minute ago) quote
Ok yaar

herez the code

but it wuld`ve been good if u searched urself

Private Sub Timer1_Timer()
If Timer1.Interval Then
Webbrowser1.Navigate text1.text
timer1.enabled = False
Timer2.Enabled = True
End If
End Sub


Private Sub Timer2_Timer()
If Timer2.Interval Then
webbrowser1.navigate text2.text
timer2.enabled = False
End If
End Sub
Quote

.::b@d b0y::.™ ~
9:33 pm(1 minute ago) quote
@all

i dont intend 2 hurt anybody.... but i gs, if sumbodyz @ coding sumthn, he shud b clear wid basics... n if he isnt, he shud try tht himself.. spoon feeding takes u nowhr dude!!!

bura mat manna, but thts my opinion.. m sorry, if sum1 disagrees wid me, but i cant help tht, u know...!!

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote


Pяαтєєk ®™......
9:34 pm(1 minute ago) quote
thanks
Quote


●н.в● LosT SouL
9:34 pm(0 minutes ago) quote
Quoted Message .::b@d b0y::.™ ~ @ 9:03 pm (0 minutes ago)

@all

i dont intend 2 hurt anybody.... but i gs, if sumbodyz @ coding sumthn, he shud b clear wid basics... n if he isnt, he shud try tht himself.. spoon feeding takes u nowhr dude!!!

bura mat manna, but thts my opinion.. m sorry, if sum1 disagrees wid me, but i cant help tht, u know...!!

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'





In my personel opinion

i agree wid u
Quote


.::b@d b0y::.™ ~
9:34 pm(0 minutes ago) quote
@lost soul
ur code is according to vb6...

i'll post the corresponding code for vb2005...
but aftr ma dinner..

BRB.... m out 4 dinner!!

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote


Mohsin - Da -
9:35 pm(0 minutes ago) quote
@ Pritul

Thanks Man

@ Others ..

Thanks to all of you too ..
Quote


Pяαтєєk ®™......
9:35 pm(0 minutes ago) quote
are but how to merge that with label of 250 scraps
Quote

●н.в● LosT SouL
9:35 pm(3 minutes ago) quote
@prateek

dude
dis code is the thing mohsin asked


@bb

yeah
i dun knw .NEt too much
Quote


●н.в● LosT SouL
9:36 pm(2 minutes ago) quote
@prateek

u wanna show the no. of scraps remaining?
Quote


.::b@d b0y::.™ ~
9:37 pm(1 minute ago) quote
@prateek
i'll help u out aftr dinner!! brb

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote


Pяαтєєk ®™......
9:38 pm(0 minutes ago) quote
@ bb

thanks

will wait for you.

@ ls

yes i want to show the scraps decreasing
Quote

●н.в● LosT SouL [S][A][V][M]
9:42 pm(42 minutes ago) quote
@Bad boy

I`ll help him wid dat
when i go u can


@Prateek

make a label
set the text to 250

now make a timer

set the interval to wateva is in the script

now double click the timer

write dis code:-

While Timer1.interval
Label1.Text = Label1.text -1


and disable the timer

now make a command button

right dis code dere

Timer1.enabled = true
Quote


●н.в● LosT SouL [S][A][V][M]
9:46 pm(38 minutes ago) quote
@prateek

edit the above code if needed
Quote


Pяαтєєk ®™...... [S][A][V][M]
9:56 pm(28 minutes ago) quote
@ LS

some mistake

see the software.

http://prat2000009.googlepages.com/WindowsApplication1.rar


and the coding

Public Class Form1

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
While Timer1.Interval
Label1.Text = Label1.Text - 1
Timer1.Enabled = False
End While
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub
End Class
Quote


●н.в● LosT SouL [S][A][V][M]
9:59 pm(25 minutes ago) quote
@prateek

yaar mere bhai
mere behen
mere janu

VB 6 karle
ek tou uss idiot pritul nay sabko .NET pe laga dala hai

ab mujhe woh ata nahi
Quote


Pяαтєєk ®™...... [S][A][V][M]
10:00 pm(23 minutes ago) quote
acha bhai ruk

setup pada hua hai. VB6 abhi install karta hoon.
Quote


●н.в● LosT SouL [S][A][V][M]
10:01 pm(22 minutes ago) quote
Shukar

thnx
Quote


.::b@d b0y::.™ ~ [S][A][V][M]
10:22 pm(2 minutes ago) quote
@lost soul
oye!! .NET ko kuchh mat bolna... meri jaan hai .NET !!

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote


Pяαтєєk ®™...... [S][A][V][M]
10:23 pm(1 minute ago) quote
@ bb

help!!!

@ ls

u too installed vb6 also
Quote

.::b@d b0y::.™ ~ [S][A][V][M]
11:02 pm(1 minute ago) quote
OUG hacked once again!! no point telling anythn here!!

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote

no photo
Pritul ☠­ [S][A][V][M]
11:03 pm(1 minute ago) quote
Prateek ..

here is the code u need

drag a timer and set its interval to 1000

now

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Label1.Text = 250

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Timer1.Start()

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

If Timer1.Interval Then
webbrowser1.navigate("ur javscript")
Label1.Text = Label1.Text - 1

End If
End Sub
Quote

Pяαтєєk ®™...... [S][A][V][M]
11:08 pm(0 minutes ago) quote
Thanks pritul
Quote
no photo
Pritul ☠­ [S][A][V][M]
11:13 pm(1 minute ago) quote
but save it .. i guess this OUG also gone
Quote


.::b@d b0y::.™ ~ [S][A][V][M]
11:13 pm(0 minutes ago) quote
@pritul n others
y do u need 2 use the code in red below...?? i neva used this statement my code... whereas all my apps hav many many timer controls....

PS: my TOrkutter uses 23 timers!!




Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Label1.Text = 250

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Timer1.Start()

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

If Timer1.Interval Then
webbrowser1.navigate("ur javscript")
Label1.Text = Label1.Text - 1

End If
End Sub


--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote

†۞►§σµℓ Яєค√єя◄۞ [S][A][V][M]
11:15 pm(2 minutes ago) quote
pritul
don't worry i already took the backup
Quote

delete

Pяαтєєk ®™...... [S][A][V][M]
11:17 pm(0 minutes ago) quote
even i have taken the backup.

http://ougbackup.blogspot.com/
Quote


†۞►§σµℓ Яєค√єя◄۞ [S][A][V][M]
11:18 pm(0 minutes ago) quote
http://mainak01rex.blogspot.com/2007/06/help-needed-vb-6.html
Quote

delete
no photo
Pritul ☠­ [S][A][V][M]
11:21 pm(17 minutes ago) quote
@ Bad Boy and Others

Well its just programming Style ..

u can use other methods too ..

e.g

Public Class Welcomeform
Inherits System.Windows.Forms.Form

Dim cnt As Integer
Dim t1 As New Threading.Thread(AddressOf display)
Dim x As Integer

Public Sub display()
Do While True
x = x - 1
Label2.Text = x
t1.Sleep(1000)
Loop
End Sub

Private Sub Welcomeform_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
t1.Start()
End Sub

****************************

just used a thread here .. there r many styles like that .. u can use as per ur convinince .. no. of timers dosent matters I guess
Quote

no photo
Pritul ☠­ [S][A][V][M]
11:21 pm(16 minutes ago) quote
Thanks Soul Reaver and Prateek
Quote


.::b@d b0y::.™ ~ [S][A][V][M]
11:23 pm(14 minutes ago) quote
@pritul
na na!! i mnt i just wanted 2 know how does tht particular statement (timer1.interval) help??
coz i hav neva used it, inspite of using timers widely in my apps.

--------------------------- .:: b@d b0y ::.™ ---------------------------

'• I am free of all prejudice. I screw everyone equally... •'
Quote

no photo
Pritul ☠­ [S][A][V][M]
11:27 pm(10 minutes ago) quote
Well it works perfect for me .. reducing the counter of the label each second ..

I guess this was the easiest method .. so suggested this
Quote


Sid [S][A][V][M]
11:29 pm(8 minutes ago) quote

First of all drag a timer control to the form and a label ..

now see the properties of timer control .. there will be a thing named as Interval .. set it to 1000

now double click the timer ..

it will get u something like

Private Sub Timer1_timer

End Sub


now write in between ..

If timer1.interval then
label1.text = timer1.interval + 1000
if timer1.interval = 5000 then
Msgbox("Hello Lost Soul")
End If

Posted By Pritul In TIO
Quote