|
I couldn't find any VB.NET specific examples, but you could probably put one together using the examples found here[^]. Specifically, look at the Scripting versions of the examples.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi everyone, can anybody give some insight on RDA, I’m exchanging data from a PDA to an SQL 2000 Server over GPRS, to pull down say 3 small records it takes about 20-30 seconds and when I increase the table size to about 250 records it still takes about 20-30 seconds, any ideas.
|
|
|
|
|
Hi,
Could any one suggest me the best sample code for Scheduler applicaion in VB.net.
I need to perform some operation on my vb.net code on regular time interval, so, I am in need of scheduler sample code to include in my project (No service related samples).
Regards.
Be simple and Be sample.
|
|
|
|
|
Have you received a reply, I have same question...
|
|
|
|
|
Hi everyone,
I have designed web pages using VB.Net. Now I need to upload all those web pages to the site. I'm using WS-FTP tool for the uploading. I uploaded all the .aspx files. Now which other type of files I need to upload? Please help me out.
|
|
|
|
|
The dll files in the bin folder.
---
b { font-weight: normal; }
|
|
|
|
|
I tried to upload the .dll files to the bin folder. But it is giving me the error as "File name or type not allowed"
Is there any other method to upload the web pages?
-- modified at 6:44 Monday 13th February, 2006
|
|
|
|
|
Each host company has its own hosting requirements. Your best source of information on this would be the support line of the site hosting your website. They can tell you the steps to go through to upload the required files and the expected directory structure of those file. They should also be able to walk you through getting your application setup and running under IIS when the files are uploaded.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
can i make a a file which will load before windows loads and modifyes specific parameters in bios??
rzvme
|
|
|
|
|
Nope.
You can't insert anything before Windows loads. Also, any code you write in any language, except assembler, won't have any runtime to run under without Windows running already.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am using the propertygrid control to get the application level parameters from the users. The object assigned to the propertygrid is created dynamically with help of reflection.emit. i achieved the functionalities of the propertygrid like Categories and Description of a property by using the SetCustomAttribute method of a property builder.
I want to achieve the combo box functionality for a property (User can select a value from the combobox for the property). I know that we can achieve this by setting the TypeConverterAttribute for the property. My problem is, each property will have to show different values in the combo(Values are coming from a Database), so dynamically i have to create a TypeConverter which is inherited from StringConverter. This typeconverter should be assingned to the property by TypeConverterAttribute.
My problem is how we have to create a TypeConverter which is inherited from StringConverter with help of Reflection.Emit.
Please give you suggestions.
Please find the code below. It is not working. I confused to write the reflection related codes. Please help me on this.
Public Shared Function GetDynamicTypeConverted(ByRef foModuleBuilder As ModuleBuilder) As Type
Dim oTypeBuilder As TypeBuilder = Nothing
Dim oMethodBuilder As MethodBuilder = Nothing
Dim oILGenerator As ILGenerator = Nothing
Dim oConstructorInfo As ConstructorInfo = Nothing
Dim oParams() As Type
Try
oTypeBuilder = foModuleBuilder.DefineType("EngStatusConverter", TypeAttributes.Class, GetType(StringConverter))
oMethodBuilder = oTypeBuilder.DefineMethod("GetStandardValuesSupported", MethodAttributes.Public, GetType(Boolean), New Type() {GetType(ITypeDescriptorContext)})
oILGenerator = oMethodBuilder.GetILGenerator
oILGenerator.Emit(OpCodes.Ldarg_0, CType(True, Object))
oILGenerator.Emit(OpCodes.Ret)
oMethodBuilder = oTypeBuilder.DefineMethod("GetStandardValues", MethodAttributes.Public, GetType(StandardValuesCollection), New Type() {GetType(ITypeDescriptorContext)})
oILGenerator = oMethodBuilder.GetILGenerator
oParams = New Type() {GetType(String)}
oConstructorInfo = GetType(StandardValuesCollection).GetConstructor(oParams)
oILGenerator.Emit(OpCodes.Ldarg_0, oConstructorInfo)
oILGenerator.Emit(OpCodes.Ret)
oMethodBuilder = oTypeBuilder.DefineMethod("GetStandardValuesExclusive", MethodAttributes.Public, GetType(Boolean), New Type() {GetType(ITypeDescriptorContext)})
oILGenerator = oMethodBuilder.GetILGenerator
oILGenerator.Emit(OpCodes.Ldarg_0, CType(True, Object))
oILGenerator.Emit(OpCodes.Ret)
Return oTypeBuilder.CreateType
Catch ex As Exception
Throw ex
End Try
End Function
|
|
|
|
|
|
Hi, Thanks for your reply.
I have to attach a TypeConverterAttribute to a property. Please see the following code.
Property definition
------------------------------------
<typeconverter(gettype(filenameconverter)), categoryattribute("document="" settings")=""> _
Public Property DefaultFileName() As String
Get
Return _defaultFileName
End Get
Set(ByVal Value As String)
_defaultFileName = Value
End Set
End Property
------------------------------------
File Name Converter
------------------------------------
Public Class FileNameConverter
Inherits StringConverter
Public Overloads Overrides Function GetStandardValuesSupported( _
ByVal context As ITypeDescriptorContext) As Boolean
Return True
End Function
Public Overloads Overrides Function GetStandardValues( _
ByVal context As ITypeDescriptorContext) _
As StandardValuesCollection
Return New StandardValuesCollection(New String() {"New File", _
"File1", _
"Document1"})
End Function
Public Overloads Overrides Function GetStandardValuesExclusive( _
ByVal context As ITypeDescriptorContext) As Boolean
Return False
End Function
End Class
My problem is, I have to create the FileNameConverter type dynamically with help of reflection. So I can return the dynamic values from GetStandardValues method.
I need a way to create a type like filenameconverter thru reflection. Please give your suggesstion.
|
|
|
|
|
Hi, the answer to your need,
is use an Attribute to pass the dynamic list to your TypeConverter. Please check my recent article here:
http://www.codeproject.com/useritems/PropertyGridEx.asp
Here is my TypeConverter :
Public Class CustomChoices
Inherits ArrayList
Public Sub New(ByVal array As ArrayList, Optional ByVal IsSorted As Boolean = False)
Me.AddRange(array)
If IsSorted Then Me.Sort()
End Sub
Public Sub New(ByVal array() As String, Optional ByVal IsSorted As Boolean = False)
Me.AddRange(array)
If IsSorted Then Me.Sort()
End Sub
Public Sub New(ByVal array() As Integer, Optional ByVal IsSorted As Boolean = False)
Me.AddRange(array)
If IsSorted Then Me.Sort()
End Sub
Public Sub New(ByVal array() As Double, Optional ByVal IsSorted As Boolean = False)
Me.AddRange(array)
If IsSorted Then Me.Sort()
End Sub
Public Sub New(ByVal array() As Object, Optional ByVal IsSorted As Boolean = False)
Me.AddRange(array)
If IsSorted Then Me.Sort()
End Sub
Public ReadOnly Property Items() As ArrayList
Get
Return Me
End Get
End Property
Public Class CustomChoicesTypeConverter
Inherits TypeConverter
Private oChoices As CustomChoicesAttributeList = Nothing
Public Overrides Function GetStandardValuesSupported(ByVal context As System.ComponentModel.ITypeDescriptorContext) As Boolean
Dim Choices As CustomChoicesAttributeList = context.PropertyDescriptor.Attributes(GetType(CustomChoicesAttributeList))
If Not Choices Is Nothing Then
oChoices = Choices
GetStandardValuesSupported = True
Else
GetStandardValuesSupported = False
End If
End Function
Public Overrides Function GetStandardValuesExclusive(ByVal context As System.ComponentModel.ITypeDescriptorContext) As Boolean
Dim Choices As CustomChoicesAttributeList = context.PropertyDescriptor.Attributes(GetType(CustomChoicesAttributeList))
If Not Choices Is Nothing Then
oChoices = Choices
GetStandardValuesExclusive = True
Else
GetStandardValuesExclusive = False
End If
End Function
Public Overrides Function GetStandardValues(ByVal context As System.ComponentModel.ITypeDescriptorContext) As System.ComponentModel.TypeConverter.StandardValuesCollection
Dim Choices As CustomChoicesAttributeList = context.PropertyDescriptor.Attributes(GetType(CustomChoicesAttributeList))
If Not oChoices Is Nothing Then
Return oChoices.Values
End If
Return MyBase.GetStandardValues(context)
End Function
End Class
Public Class CustomChoicesAttributeList
Inherits Attribute
Private oList As New ArrayList
Public ReadOnly Property Item() As ArrayList
Get
Return Me.oList
End Get
End Property
Public ReadOnly Property Values() As TypeConverter.StandardValuesCollection
Get
Return New TypeConverter.StandardValuesCollection(Me.oList)
End Get
End Property
Public Sub New(ByVal List() As String)
MyBase.New()
oList.AddRange(List)
End Sub
Public Sub New(ByVal List As ArrayList)
MyBase.New()
oList.AddRange(List)
End Sub
Public Sub New(ByVal List As ListBox.ObjectCollection)
MyBase.New()
oList.AddRange(List)
End Sub
End Class
-- modified at 9:11 Monday 10th April, 2006
|
|
|
|
|
hello ..
How to add edit button at runtime in datagrid control and also how to hide datagrid column at runtime...
can u help me in this regard....
Thanks & Regards
Nagalakshmi
|
|
|
|
|
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
how to make the sql server setting allow the remote connection?
|
|
|
|
|
Go into the SQL Server 2005 Configuration Tools, SQL Server Surface Area Configuration tool. Click on Surface Area Configuration for Services and Connections. You'll see, in the left hand navigation pane, an option called "Remote Connections". Click on that, and I think you can figure it out from there.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
how can we encounter a substring from a string that we have entered in textbox at runtime.
please, if you know send the answer (with source code prefreably) as soon as possible.
Meenakshi
|
|
|
|
|
anurag11oct wrote: how can we encounter a substring from a string that we have entered in textbox at runtime.
If by encounter you mean "find" then you can use IndexOf(subString) . If the substring is found it will return the index of where it was found, otherwise it will return -1 . If you want anything more complex then you might want to look at regular expressions.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
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
|
|
|
|