|
HEHEHEHE i already got it... thank you for your attemp... it just came up to my mind....
tnx tnx tnx
nothing is impossible.....
|
|
|
|
|
hi,
how to use Excel as backend.
i have to save each days information into one Excel file.
ie. entering name, age,address and phone no fields and when we click save button all these fields saved in one Excel file. one Excel file for each day
can u help me
|
|
|
|
|
you have to quit excel file after you click Save
XLapplication.quit
and using a loop u have to change its name
e.g.
i+=1
excelfileName= "File"&str(i)
|
|
|
|
|
I used the code below, but it not work for RichTextBox
Dim selStart As Integer
Dim srchMode As Microsoft.VisualBasic.CompareMethod
Try
selStart = InStr(rtbSource.Text, txtFind.Text, srchMode)
If selStart = 0 Then
MessageBox.Show("Can not find """ & txtFind.Text, "Khmer Web Browser", MessageBoxButtons.OK, MessageBoxIcon.Information)
Exit Sub
End If
rtbSource.Select(selStart - 1, txtFind.Text.Length)
rtbSource.ScrollToCaret()
Catch ex As Exception
End Try
................
|
|
|
|
|
|
I'm trying to save Outlook 2003 Calendar attachments in my local drive using VB.NET but without success.
Can any one help?
Thanks
Sbr
|
|
|
|
|
Hi guys,
Am writen an application that the result for the form is preview with crystal report. In crystal report I create a OLE DB connection to the database. when I deploy the application it is looking report database on the machine that it was develope. example of code:
Dim path1 As String = My.Application.Info.DirectoryPath '' path
'' change path of the database
report.DataSourceConnections.Item(0).SetConnection("", "" & path1 & "\db.mdb", False)
review and give me ur feed back, even it there is a better way to bind the report i would gladly accept
thanks
|
|
|
|
|
At design-time put all your reports and mdb file into your application folder and make sure you access them using "Application.Startuppath" or ur "Application.Info.DirectoryPath" during development.
Ensure that you package all your reports and mdb file into the application folder (as hidden file preferably) during deployment.
Let me know hoow this helps u.
cheers
S.S.O
|
|
|
|
|
am not sure if i understand what is happen but some how all u guys advice i have tried. can u plz tell me how to bind a crystal report to visual studio 2005, when the crystal connect to the database via OLE DB.
Thanks
Ricky
|
|
|
|
|
I don't think the issue of connection engine matter if your application is using same connection to the database.
create a new form say frmCrystal and add the CrystalReportViewer control on the form. Don't set the reportsource as design but set ur Reportsource at runtime to the report you want to display.
example:
Private Sub frmCrystal_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
rptViewer.ReportSource = Application.StartupPath & "\rpt.rpt"
End Sub
All the best.
SSOnuh
|
|
|
|
|
How could I make a transparent button so that it is not shown in a vb. net form, but I should be able to click it on its current position?
cezzzar
|
|
|
|
|
By setting the .Opacity value. You'll have to set it to 1, and not 0. If you set Opacity to 0, the button kills itself and is no longer usable.
I'm sorry, excuse that answer. .Opacity is not a property of the Button. I don't believe you can do this with the native .NET button class. You may have to use an image-replacement, or write a new button class that inherits from a .Opacity-enabled base-class.
More Information:
1. http://www.codeproject.com/buttonctrl/EasyTransparentBut.asp
Jonathan Sampson
www.SampsonResume.com
|
|
|
|
|
I would use a panel with no border and transparent background color, and use the panels click event. This way it will be invisible, but clickable. I just tested this and it worked fine.
Posted by The ANZAC
|
|
|
|
|
Hi all,
I am in need of some help, and I think what I'm trying to do is fairly simple, I'm just messing up somehwere.
I'm basically trying to play a video in vb.net. I've found a way to embed a windows media player into the form and have also gone to properties and set the URL to the video i want it to play......However when i go to debug it, i keep gettng build error messages, after selecting 'yes' the form pops up but the video does not play.
I cannot understand why? also I have found that when i try to start afresh and rebuild the whole project and name it something different (other than the default name that appears) it produces an error message saying that it cannot debug the target (filename) is missing. <--- what does that mean???
I would greatly appreciate if anybody out there could help me.
(also i understand i may need to look at the msdn microsoft docs.......where do i find them?)
Thanks again
Jaidev
|
|
|
|
|
Uhhh...If you get an error during the compile, chances are good that an .EXE file was not written to the hard drive, so there's nothing to execute. You can not just ignore the errors and expect your app to work.
What's the error that you're getting?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
jady84 wrote: msdn microsoft docs
msdn.microsoft.com. Or, just google - "play video vb.net site:msdn.microsoft.com" is a good way to start.
jady84 wrote: keep gettng build error messages, after selecting 'yes' the form pops up but the video does not play.
It's showing you the last exe that compiled properly, not anything to do with the ( apparently broken ) code you just tried to compile.
I HATE that VS does that.
Christian Graus - C++ MVP
|
|
|
|
|
Is there a way to logon to a website that requires a userid and password from vb.net?
ty
|
|
|
|
|
Can you be more specific?
There are several ways to login to a website that uses a username and password. Check out the .NET 2.0 User Login Controls. Or check out the Cookies classes the framework aswell. You could also use sessions.
What exactly do you want to accomplish?
Jonathan Sampson
www.SampsonResume.com
|
|
|
|
|
I simply want to get the content of a site that is password protected:
dim userid = "myuserid"
dim password = "mypassword"
Dim res As Byte() = web.DownloadData("myhttp://....")
I'm thinking I need to set userid and passwored using web.Icredentials or something before I make that call, but I'm not sure how to do that.
thanks!
|
|
|
|
|
Yes, you need to navigate to the login page, work out how to fill the form, and how to submit it. Unless they offer a webservice.
Christian Graus - C++ MVP
|
|
|
|
|
Really? I'm thinking there must be some generic code for this. For instance, there are many programs that routinely recognize a logon web page and fill the forms for you. Right?
|
|
|
|
|
How do you think they work ? They are HTML parsers, and they fill the form fields for you, based on having stored where they are in the page, and what you typed in them before.
Christian Graus - C++ MVP
|
|
|
|
|
hello
here i am posting my code for quiz application and i want to randomize 4 answers 3 wrong and 1 correct answers i manage to randomize correct answer but other three answers are not but it shows three wrong answers but it's from other question
Dim Question(14), Ans1(14), WrongAns(14, 3), Clue(14), CorrectAns(14) As String
Dim TotalQuestion2 As Integer
Dim Score2 As Integer
Dim startTime As DateTime
Dim Time As Date
Dim N As Integer
Dim Asked(14) As Boolean
Private Sub mnuFileTyAns_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuFileTyAns.Click
Dim MyForm As New frmSQuiz
MyForm.Show()
MyForm.ActiveForm.Text = "Well Come " & Address & " to Type - In - Answer Section ...."
Me.Close()
End Sub
Private Sub mnuHelpAbout_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuHelpAbout.Click
Dim MyForm As New frmAbout
MyForm.Show()
MyForm.txtAbout.Visible = True
MyForm.ActiveForm.Text = "About Quiz ......"
End Sub
Private Sub mnuFileExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuFileExit.Click
Me.Close()
End Sub
Private Sub frmMultiple_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
Randomize()
Time = Now
'get questions and answers arrays
Question(0) = "Macadamia and almonnd are types of what ?" : Ans1(0) = "Nuts" : WrongAns(0, 0) = "Fruit" : WrongAns(0, 1) = "Tree" : WrongAns(0, 2) = "Vagetable" : WrongAns(0, 3) = "Powder" : Clue(0) = "Do you know about any magazine ?" : CorrectAns(0) = "Nuts"
Question(1) = "In astrology the star sign Piseces is represented by which animal ?" : Ans1(1) = "Fish" : WrongAns(1, 0) = "Donkey" : WrongAns(1, 1) = "Lion" : WrongAns(1, 2) = "Snake" : WrongAns(1, 3) = "Lynx" : Clue(1) = "It,s very testy" : CorrectAns(1) = "Fish"
Question(2) = "Where is Tower bridge ?" : Ans1(2) = "London" : WrongAns(2, 0) = "Dubai" : WrongAns(2, 1) = "USA" : WrongAns(2, 2) = "India" : WrongAns(2, 3) = "Pakistan" : Clue(2) = "Sterling" : CorrectAns(2) = "London"
Question(3) = "Where is liberty statue ?" : Ans1(3) = "USA" : WrongAns(3, 0) = "London" : WrongAns(3, 1) = "Dubai" : WrongAns(3, 2) = "India" : WrongAns(3, 3) = "Pakistan" : Clue(3) = "NY" : CorrectAns(3) = "USA"
Question(4) = "In geography where is Mount Fuji ?" : Ans1(4) = "Japan" : WrongAns(4, 0) = "Taiwan" : WrongAns(4, 1) = "China" : WrongAns(4, 2) = "USA" : WrongAns(4, 3) = "Pakistan" : Clue(4) = "It's very small country " : CorrectAns(4) = "Japan"
Question(5) = "What 'L' is an engine for hauling railway trains ?" : Ans1(5) = "Locomotive" : WrongAns(5, 0) = "Load" : WrongAns(5, 1) = "Loose" : WrongAns(5, 2) = "Non of these" : WrongAns(5, 3) = "Late" : Clue(5) = "What's your motive ?" : CorrectAns(5) = "Locomotive"
Question(6) = "If a scooter travels at 20 miles/H,how many miles will it travel in half an hour ?" : Ans1(6) = "10-miles" : WrongAns(6, 0) = "12-miles" : WrongAns(6, 1) = "20-miles" : WrongAns(6, 2) = "5-miles" : WrongAns(6, 3) = "20.5-miles" : Clue(6) = "Some thing devided by 2" : CorrectAns(6) = "10-miles"
Question(7) = "Which london park has an open-air theatre and a zoo ?" : Ans1(7) = "Regent's Park" : WrongAns(7, 0) = "King Park" : WrongAns(7, 1) = "Queen Park" : WrongAns(7, 2) = "Safari Park" : WrongAns(7, 3) = "Zoo Park" : Clue(7) = "'Enter - G' make one word" : CorrectAns(7) = "Regent's Park"
Question(8) = "In science is neon a solid, liquid or gas under normal conditions ?" : Ans1(8) = "Gas" : WrongAns(8, 0) = "Liquid" : WrongAns(8, 1) = "Solid" : WrongAns(8, 2) = "Non of These" : WrongAns(8, 3) = "Powder" : Clue(8) = "We use it every day" : CorrectAns(8) = "Gas"
Question(9) = "On which side of the road do cars drive in Australia ?" : Ans1(9) = "Left" : WrongAns(9, 0) = "Right" : WrongAns(9, 1) = "In-Middle" : WrongAns(9, 2) = "Both" : WrongAns(9, 3) = "Non" : Clue(9) = "What do you think in UK?" : CorrectAns(9) = "Left"
Question(10) = "In sport kung fu is which countries martial art ?" : Ans1(10) = "Chinese" : WrongAns(10, 0) = "Japanese" : WrongAns(10, 1) = "Indian" : WrongAns(10, 2) = "Korian" : WrongAns(10, 3) = "Pakistani" : Clue(10) = "Population is big issue" : CorrectAns(10) = "Chinese"
Question(11) = "In which country would you find the industrial port of Le Harve ?" : Ans1(11) = "France" : WrongAns(11, 0) = "USA" : WrongAns(11, 1) = "China" : WrongAns(11, 2) = "Japan" : WrongAns(11, 3) = "Rusia" : Clue(11) = "Do you remember any Tower...?" : CorrectAns(11) = "France"
Question(12) = "How many wheels does a unicycle have ?" : Ans1(12) = "One" : WrongAns(12, 0) = "Two" : WrongAns(12, 1) = "Three" : WrongAns(12, 2) = "Four" : WrongAns(12, 3) = "Non" : Clue(12) = "It's hard to drive" : CorrectAns(12) = "One"
Question(13) = "In food which fruit is dried to make a prune ?" : Ans1(13) = "Plum" : WrongAns(13, 0) = "Mengo" : WrongAns(13, 1) = "Banana" : WrongAns(13, 2) = "Orange" : WrongAns(13, 3) = "Apple" : Clue(13) = "It's round,sweet and some time it's sour" : CorrectAns(13) = "Plum"
Question(14) = "In which sport are the Ashes a trophy ?" : Ans1(14) = "Cricket" : WrongAns(14, 0) = "Foot Ball" : WrongAns(14, 1) = "Snooker" : WrongAns(14, 2) = "Rugby" : WrongAns(14, 3) = "Hockey" : Clue(14) = "Some time player stand at silly point" : CorrectAns(14) = "Cricket"
Call GetNextQuestion()
lbltime.Text = Format(Time, "dd MMM yyyy")
startTime = DateTime.Now()
Timer1.Start()
End Sub
Private Sub GetNextQuestion()
Dim LB() As Label = {lblA, lblB, lblC, lblD}
Dim J As Integer
Do
N = CInt(Rnd() * 14)
Loop Until Asked(N) = False
Asked(N) = True
lblQuestion.Text = Question(N)
Dim ansWX As String = WrongAns(N, J)
Dim ansWR As String = CorrectAns(N)
'randomize 3 wrong answers
For J = 0 To 3
Do
ansWX = WrongAns(CInt(Rnd() * 14), 3)
Loop Until ansWX <> ansWR And ansWX <> LB(0).Text And ansWX <> LB(1).Text And ansWX <> LB(2).Text
LB(J).Text = ansWX
Next J
'randomize one correct answer
LB(CInt(Rnd() * 3)).Text = ansWR
lblA.BackColor = Color.Beige
lblB.BackColor = Color.Beige
lblC.BackColor = Color.Beige
lblD.BackColor = Color.Beige
End Sub
wating for rep.
thank you
|
|
|
|
|
bapu2889 wrote: here i am posting my code for quiz application and i want to randomize 4 answers 3 wrong and 1 correct answers i manage to randomize correct answer but other three answers are not but it shows three wrong answers but it's from other question
The purpose of using a capital letter at the beginning of a sentence and a period at the end of the sentence is to make it possible to distinguish sentences from each other. The purpose of distinguishing sentences from each other is to make them readable.
When you post code in the forum, use the pre tag to keep the formatting.
---
b { font-weight: normal; }
|
|
|
|
|
ROTFL - we need an English forum. In fact, I think it should be called the Plain English forum, given that it's for basic English questions.
Christian Graus - C++ MVP
|
|
|
|
|