|
I want to make a program in VB.NET 2003 which will load 5 predetermine webpages in TabControl (5 Tab Pages), e.g:
http://www.yahoo.com
http://www.microsoft.com
http://www.abc.com
http://www.jkl.com
http://www.xyz.com
and will reload each of them in 30 seconds.
I made a program using Microsoft Web Browser (COM). But the problem is that on reload, it loads from Temporary Internet Files.
Please help me in making a program which will load 5 webpages at the same time and reload each of them from their server (not from Temporary Internet Files) every 30 seconds.
|
|
|
|
|
If you're using the COM component, there should be two Refresh methods, Refresh and Refresh2 . Refresh2 will allow you to specify that the pagtes not be cached, or to ignore the cached page and reload from the server. You can find the contant values to pass into Refresh2 here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Its what I want.
Thanx a LOT!
|
|
|
|
|
I'm beginner for VB.NET. This is my code that migrating from VB to VB.NET. I'm selecting a group of data in the same data table from my MSSQL database to a dataset,and I wish to process the data row by row inside the dataset. There is no error shown when executed,but there is not messagebox pop-up to show the OriginatingAddress when I try to test the result.
Anyone can give me a solution about this please?
Private Sub Spam_Now()
Dim conStr1 As String
Dim con1 As SqlConnection
Dim reader As IDataReader
Dim sql1 As String
Dim command As SqlCommand
Try
con1 = New SqlConnection("server=(local);database=Jacson;integrated security=true;")
sql1 = "SELECT TOP 10 * FROM TT_Member WHERE Reminder ='0' AND Status ='1'"
command = New SqlCommand(sql1, con1)
con1.Open()
reader = command.ExecuteReader
If Not reader.Read() Then
Label1.Text = "Finished - " & DateTime.Now
Else
Do
Label1.Text = "Spamming - " & DateTime.Now
OriginatingAddress = reader.GetValue("Mobile_No")
MessageBox.Show("This is my>>" & OriginatingAddress & "<<") '<<<<
If OriginatingAddress.Substring(0, 3) = "601" Then
Telco = 2
ElseIf OriginatingAddress.Substring(0, 3) = "013" Then
Telco = 3
ElseIf OriginatingAddress.Substring(0, 3) = "016" Then
Telco = 6
ElseIf OriginatingAddress.Substring(0, 3) = "019" Then
Telco = 9
End If
Reminder_Msg = "Free Msg. Subscription Reminder.Fee:Auto renewal datedate,unless cancelled. To cancel, send STOP TT to 32132."
MT_Msg = Reminder_Msg
MT_Msg = Replace(MT_Msg, "datedate", Renewal_Date3)
Loop Until Not reader.Read()
con1.Close()
End If
Catch ex As Exception
End Try
End Sub
|
|
|
|
|
First, you declared your reader variable incorrectly. It should read:
Dim conStr1 As String
Dim con1 As SqlConnection
Dim reader As SqlDataReader
Dim sql1 As String
Dim command As SqlCommand
The second thing to check is if your SELECT statement is actually returning any rows. Are you sure this is a good query?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yeah,thank you so much Mr.Dave Kreskowiak,I solve my problem. Beside the two things you found,I should convert the integer to string as the satabase structure. Thank you so much for helping me.
Regards
Drexler
|
|
|
|
|
Hi guys,
I m a newbie to data report.But i manage to do a report using data report & data environment.I also i manage to output that record to html file.But when i view the record in html format.it shows all the record but i want to print only one record from the database.Do i need to write query for that if so please guide me how to do that step by step..... Thanks in advance
Help me ASAP.....
|
|
|
|
|
I am trying to write a program using the usb port on a computer to interface with another processor to collect data. I took a look at the ms comm in vb6 and all I see are the standard serial and parallel ports. Am I missing something or it not a feature of VB6
Scott
|
|
|
|
|
This isn't even a feature in the .NET Framework. Your comparing the USB port to a Serial or Parallel port. This is simply not how this port works.
USB communication is done through the device drivers for the device you're trying to communicate with. If that device exposes a simulated "serial" port, then you can use that to talk to it. If not, you'll have to consult some kind of SDK for the device in question.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hello to anyone
i have a big problem about entering txt into another form which has a datagrid but i'm using another form which i get the data that can populate the datagrid in that form which has a datagrid...now i want to know that if i going to add new record in the other form to put into the other form which has the datagrid...if i click the new button it well supposed to display a black record from the datagrid so that i can also add record again ...here's my
code.....
//
Public Sub addrecord1()
Try
Dim x As Integer
Dim myconnection As New SqlConnection("Data Source=SDG_06;Initial Catalog=sample;User ID=sa;Password=sa")
Dim cmd As New SqlCommand("usp_datainsert", myconnection)
cmd.CommandType = CommandType.StoredProcedure
For x = 1 To 13
cmd.Parameters.Clear()
cmd.Parameters.Add("@name_of_the_school", SqlDbType.VarChar, 50, ParameterDirection.Input).Value = Form2.DataGrid6.Item(x, 1).ToString = tnameschool.Text 'datagridview1.Item(x, 1).ToString ='
cmd.Parameters.Add("@address", SqlDbType.VarChar, 50, ParameterDirection.Input).Value = Form2.DataGrid6.Item(x, 2).ToString = taddresschool.Text
cmd.Parameters.Add("@degree", SqlDbType.VarChar, 50, ParameterDirection.Input).Value = Form2.DataGrid6.Item(x, 3).ToString = cbodegree.Text
cmd.Parameters.Add("@from1", SqlDbType.Char, 10, ParameterDirection.Input).Value = Form2.DataGrid6.Item(x, 4).ToString = tfrom.Text
cmd.Parameters.Add("@to1", SqlDbType.Char, 10, ParameterDirection.Input).Value = Form2.DataGrid6.Item(x, 5).ToString = tto.Text
cmd.Parameters.Add("@please_specify", SqlDbType.VarChar, 50, ParameterDirection.Input).Value = Form2.DataGrid6.Item(x, 6) = cbograd.Text
cmd.Parameters.Add("@major_in", SqlDbType.VarChar, 50, ParameterDirection.Input).Value = Form2.DataGrid6.Item(x, 7).ToString = tmajor.Text
Form2.DataGrid6.Update()
myconnection.Open()
cmd.ExecuteNonQuery()
Next x
Catch ex As Exception
MessageBox.Show(ex.Message, "Error dito sa Addrecord1", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
End Try
///
how i'm going to renew my code
|
|
|
|
|
My application runs long and complex convertion, so i want to make it possible for the end-user to cancel this. However, as you may know, just placing a button does not help since any Visual Basic application is not able to let you use form elements while it is working.
How can i let the user cancel the process comfortably at any time?
|
|
|
|
|
Try this sample
Public Class Form1
Private bCancel as boolean
Private Sub DoLooping
While Not bCancel
Application.DoEvents()
'Do Something
End While
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
bCancel = True
End Sub
' You can also use thread.
End Class
!alien!
|
|
|
|
|
Cheesy poor man approach - use a timer or application.doevents to let the cancel button be clicked.
Better approach - do long-running processing on a background thread. Rocky Lhotka's article (link below) provides a straightforward approach for controlling a task and providing for user cancellation. You can have it implemented in 2 hours.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvnet/html/vbnet09272002.asp
Patgrape
|
|
|
|
|
I create shared add-in project in VS2003.
In the wizard, I have just tick the WORD for my test,
How can I change this project for WORD, Excel and Outlook now?
Thank you!
|
|
|
|
|
cant send focus to another control from my usercontrol
tried many thing
keypreview = true
processdialoguekey
overrides...
pls help
tnx in advance
|
|
|
|
|
Try this code
'Me is UserControl
Me.FindForm.SelectNextControl(Me, True, True, True, True)
May u be ok?
!alien!
|
|
|
|
|
|
without ActiveSync ...how to convert it??
|
|
|
|
|
Could not find stored procedure 'DBAuthenticate'.
--> cmdSelect.ExecuteNonQuery()
|
|
|
|
|
It's telling you that your database doesn't have a stored procedure called "DBAuthenticate". Either you got the SP name wrong in your code, or you're not connected to the database you think you are when this call was made.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i got the DBAuthenticate function but still the same error appears.how can i made the connection?or test the connection is there?
|
|
|
|
|
If you get this error, your connection is being made successfully. There are still the problems that I mentioned, plus the possibility that your code is either using an SQL account or running under a Windows account that does not have the permissions to execute that stored procedure.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Compiler Error Message: BC30516: Overload resolution failed because no accessible 'New' accepts this number of arguments.
objTicket = New FormsAuthenticationTicket(2, textUsername.Text, DateTime.Now.AddMinutes(30), False, dtrRoles)
i added the new sintaks as u told but this come up.
|
|
|
|
|
I think it's pretty obvious what the error means. You trying to create an object who's constructor, according the documentation, takes 3, 6, or 7 arguments. You've supplied 5 in your code. These[^] are the possibilities.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
I am developing a GUI prototype in the VB which comes with Visual Studio 2005. I am new with VB, so I believe it's a newbie question. Everything goes fine until I press "Rebuild All". When I press it, VB drops all my settings of anchors, docking etc. and centers everything. As a result, the main menu, toolbars, status bars all get centered instead of where I chose to dock them. I also tried to select "lock = true" hoping it will stop this behavior, but it does not help. There must be some way to keep the selected alignment properties, but how? Would appreciate any help. Thank you!
Nick Kisialiou
|
|
|
|
|