FRESHERSHOME
Freshers Forum

Problem in visual basic......????

This is a discussion on Problem in visual basic......???? within the Visual Basic forums, part of the Languages category; I want to print the numbers 1 to 99. i have written the following code: private sub cmdCommand1_click() dim i ...


Go Back   Jobs in India Forum > Programming > Languages > Visual Basic

Notices

Visual Basic Visual Basic Discussion Forum, Visual Basic related configuration, help, tips, source code

 
Reply
 
Thread Tools Display Modes
  #1  
Old 01-13-2008, 07:52 PM
YahooHoo
 
Join Date: Jan 2008
Posts: 1
Default Problem in visual basic......????

I want to print the numbers 1 to 99.
i have written the following code:

private sub cmdCommand1_click()
dim i as integer
for i = 1 to 99
print i
next i
end sub

what's wrong with this coding??? The output of above is all the numbers from 1 to 16??????
__________________
Powered by Yahoo!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old 01-13-2008, 07:52 PM
YahooHoo
 
Join Date: Jan 2008
Posts: 2
Default

try this
dim i as integer
if i<=99 then
i=i+1
print i
end sub
i like to share vb knowladge e-mail me for if you want to share knowladge
milandevmani321@yahoo.co.in
__________________
Powered by Yahoo!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old 01-13-2008, 08:02 PM
YahooHoo
 
Join Date: Jan 2008
Posts: 1
Default

You are viewing the window in its default size and there is only room for the display to show the first 16 numbers. Maximize the window or start it full size and there will be more room to show additional lines that have been printed.

You may need to add code to scroll the window using a scroll bar control OR print to a list box which allows scrolling a longer list. Printing to a list box is really adding items to the listbox collection.
__________________
Powered by Yahoo!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old 01-13-2008, 08:02 PM
YahooHoo
 
Join Date: Jan 2008
Posts: 1
Default

I know nothing but I would have thought you would code it something like this

private sub cmdCommand1_click()
dim i as integer
for i = 1 to 99
print i
i=i+1
next i
end sub

If that works I'll eat my modem.
the fact that you are getting an output 1 to 16 suggests that you are operating in hex and of course 16 is 1 in hex. I am so far out of my depth now that my saliva is boiling due to brain overheat.
__________________
Powered by Yahoo!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
problem, visual, basic

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Sitemap
Jobs by Location: Advertising and Marketing Jobs - IT Software Jobs - Walk-in Jobs - BPO Jobs - Government Jobs - Sales / BD Jobs - Tele Communication Jobs App Programming - Network Admin

Jobs By Location: Jobs in Bangalore - Jobs In India - Jobs in Delhi - Jobs in Hyderabad - Jobs in Kochi - Jobs in Mumbai - Jobs in Trivandrum - Jobs in pune - Jobs in Jonida - Jobs in Chennai - Jobs in Coimbator

Jobs Type: Full Time Jobs - Part Time Jobs
Latest Jobs - Accounting Jobs - Engineering Jobs - IT Jobs - Walkins - How to Face Interview - HR Round Tips - Career Info - Guide For Freshers - Apply for Jobs - Future Studies - Jobs Forums - Freshers IT Software Salary Details


All times are GMT +6.5. The time now is 07:45 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
FreshersHome.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62