|
I simulated what you said you did and I get an error for partRecords that says "Declaration expected" on the mouse over tip for partRecords, which has the curvy blue line under it. Is that what you got?
If so you need to put that code in a sub. It would most likely go in the form loading sub. To create this sub you can double click the form while in [Design] view. If I'm underestimating your intellegence I don't mean to. I just don't know how much VB you know.
|
|
|
|
|
I have 700x500 canvas.
I have an image.
[b] how can I center the image on the canvas?[b]
If i have: [b]gr.DrawImage(b, 0.0F, 0.0F)[/b]..this draws it on the left hand corner of the canvas..
This is what i have:
[code]
Dim g As Graphics = Graphics.FromImage(b)
Dim gr As Graphics = Graphics.FromImage(Canvas)
Dim imageH As Single = Convert.ToSingle(b.Height)
Dim imageW As Single = Convert.ToSingle(b.Width)
Dim CanH As Single = Convert.ToSingle(Canvas.Height)
Dim canW As Single = Convert.ToSingle(Canvas.Width)
Dim bgBrush = New SolidBrush(System.Drawing.Color.White)
gr.FillRectangle(bgBrush, New Rectangle(0, 0, 700, 500))
gr.DrawImage(b, 0.0F, 0.0F)
[/code]
any ideas?
|
|
|
|
|
|
Hi gurus,
I'm working on a ATL plug-in for MS Outlook, but I would like to make it work on Outlook Express as well. I understand that it's not possilble via COM technology (as OE does not expose any COM interfaces ), but something with hooks? Any documentation on the subject?
Any help / hint would be much appreciated.
Thanks in advance,
Doru K.
|
|
|
|
|
I am a rookie student and have been asked to use ASCII to make it impossible for the user to key in alpha digits. My problem is I started the class late and have no idea how this is accomplished. If there is a good tutorial around that explains how to do it? Any help would be very much appreciated.
Steve53546
|
|
|
|
|
Steve Leverich wrote:
asked to use ASCII to make it impossible for the user to key in alpha digits.
In what? A TextBox? There are several events you can handle to do this, like KeyDown and possibly TextChanged, but, we won't write your code for you. Better yet, look through the chapters preceding the one you're in now and search for the control your going to use, not the term 'ASCII'.
RageInTheMachine9532
|
|
|
|
|
VB6:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii < 48 Or KeyAscii > 58 Then KeyAscii = 0
End Sub
this prevents the user from writing anything but digits.
|
|
|
|
|
hi
i wish to save some picture path into the Microsoft Access
im using vb6
how do i set the code where
there will be a button, the user press the button n a broswer window pop-up
then the user will select any type of picture .jpg,.gif and etc
im not very sure on wat will save in the database coz im new at this
all i wan is that the user select the picture, store in access and can be view later.
i only need help at the saving of the picture and to make the system know where is the picture
can u help me?
your help is much appreciated
thank you
Gary
|
|
|
|
|
I'm trying to add commas to the numbers in my vb6 app... like: 1,000 or 34,200 etc. Is there an easy way to do this?
|
|
|
|
|
You can format the the number as a String with commas using:
Format( expression, "###,###,###")
The documentation is here[^].
RageInTheMachine9532
|
|
|
|
|
i know it is the recordst but I dont know to read on vb.net
Option Strict Off
Option Explicit On
Friend Class frmOomsra
Inherits System.Windows.Forms.Form
Dim prstRecordSet As DataSet
#Region "Windows Form Designer generated code "
Public Sub New()
MyBase.New()
If m_vb6FormDefInstance Is Nothing Then
If m_InitializingDefInstance Then
m_vb6FormDefInstance = Me
Else
Try
'For the start-up form, the first instance created is the default instance.
If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
m_vb6FormDefInstance = Me
End If
Catch
End Try
End If
End If
'This call is required by the Windows Form Designer.
InitializeComponent()
End Sub
'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
If Disposing Then
If Not components Is Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(Disposing)
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
Public ToolTip1 As System.Windows.Forms.ToolTip
Public WithEvents Total As System.Windows.Forms.Button
Public WithEvents Previous As System.Windows.Forms.Button
Public WithEvents Next_Renamed As System.Windows.Forms.Button
Public WithEvents Delete As System.Windows.Forms.Button
Public WithEvents Add_Renamed As System.Windows.Forms.Button
Public WithEvents txtTotal_Cost As System.Windows.Forms.TextBox
Public WithEvents txtUnitPrice As System.Windows.Forms.TextBox
Public WithEvents txtBalance As System.Windows.Forms.TextBox
Public WithEvents txtQty As System.Windows.Forms.TextBox
Public WithEvents txtCustomerName As System.Windows.Forms.TextBox
Public WithEvents dtaOomsra As System.Windows.Forms.Label
Public WithEvents lblTotal_Cost As System.Windows.Forms.Label
Public WithEvents lblUnitPrice As System.Windows.Forms.Label
Public WithEvents lblBalance As System.Windows.Forms.Label
Public WithEvents lblQty As System.Windows.Forms.Label
Public WithEvents lblCustomerName As System.Windows.Forms.Label
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents DataSet1 As System.Data.DataSet
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.Total = New System.Windows.Forms.Button()
Me.Previous = New System.Windows.Forms.Button()
Me.Next_Renamed = New System.Windows.Forms.Button()
Me.Delete = New System.Windows.Forms.Button()
Me.Add_Renamed = New System.Windows.Forms.Button()
Me.txtTotal_Cost = New System.Windows.Forms.TextBox()
Me.txtUnitPrice = New System.Windows.Forms.TextBox()
Me.txtBalance = New System.Windows.Forms.TextBox()
Me.txtQty = New System.Windows.Forms.TextBox()
Me.txtCustomerName = New System.Windows.Forms.TextBox()
Me.dtaOomsra = New System.Windows.Forms.Label()
Me.lblTotal_Cost = New System.Windows.Forms.Label()
Me.lblUnitPrice = New System.Windows.Forms.Label()
Me.lblBalance = New System.Windows.Forms.Label()
Me.lblQty = New System.Windows.Forms.Label()
Me.lblCustomerName = New System.Windows.Forms.Label()
Me.DataSet1 = New System.Data.DataSet()
CType(Me.DataSet1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Total
'
Me.Total.BackColor = System.Drawing.Color.FromArgb(CType(128, Byte), CType(255, Byte), CType(255, Byte))
Me.Total.Cursor = System.Windows.Forms.Cursors.Default
Me.Total.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Total.ForeColor = System.Drawing.SystemColors.ControlText
Me.Total.Location = New System.Drawing.Point(312, 344)
Me.Total.Name = "Total"
Me.Total.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Total.Size = New System.Drawing.Size(81, 33)
Me.Total.TabIndex = 14
Me.Total.Text = "Total"
'
'Previous
'
Me.Previous.BackColor = System.Drawing.Color.FromArgb(CType(128, Byte), CType(255, Byte), CType(255, Byte))
Me.Previous.Cursor = System.Windows.Forms.Cursors.Default
Me.Previous.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Previous.ForeColor = System.Drawing.SystemColors.ControlText
Me.Previous.Location = New System.Drawing.Point(480, 400)
Me.Previous.Name = "Previous"
Me.Previous.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Previous.Size = New System.Drawing.Size(81, 33)
Me.Previous.TabIndex = 13
Me.Previous.Text = "Previous"
'
'Next_Renamed
'
Me.Next_Renamed.BackColor = System.Drawing.Color.FromArgb(CType(128, Byte), CType(255, Byte), CType(255, Byte))
Me.Next_Renamed.Cursor = System.Windows.Forms.Cursors.Default
Me.Next_Renamed.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Next_Renamed.ForeColor = System.Drawing.SystemColors.ControlText
Me.Next_Renamed.Location = New System.Drawing.Point(368, 400)
Me.Next_Renamed.Name = "Next_Renamed"
Me.Next_Renamed.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Next_Renamed.Size = New System.Drawing.Size(81, 33)
Me.Next_Renamed.TabIndex = 12
Me.Next_Renamed.Text = "Next"
'
'Delete
'
Me.Delete.BackColor = System.Drawing.Color.FromArgb(CType(128, Byte), CType(255, Byte), CType(255, Byte))
Me.Delete.Cursor = System.Windows.Forms.Cursors.Default
Me.Delete.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Delete.ForeColor = System.Drawing.SystemColors.ControlText
Me.Delete.Location = New System.Drawing.Point(232, 400)
Me.Delete.Name = "Delete"
Me.Delete.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Delete.Size = New System.Drawing.Size(81, 33)
Me.Delete.TabIndex = 11
Me.Delete.Text = "Delete"
'
'Add_Renamed
'
Me.Add_Renamed.BackColor = System.Drawing.Color.FromArgb(CType(128, Byte), CType(255, Byte), CType(255, Byte))
Me.Add_Renamed.Cursor = System.Windows.Forms.Cursors.Default
Me.Add_Renamed.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Add_Renamed.ForeColor = System.Drawing.SystemColors.ControlText
Me.Add_Renamed.Location = New System.Drawing.Point(104, 400)
Me.Add_Renamed.Name = "Add_Renamed"
Me.Add_Renamed.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Add_Renamed.Size = New System.Drawing.Size(81, 33)
Me.Add_Renamed.TabIndex = 10
Me.Add_Renamed.Text = "Add"
'
'txtTotal_Cost
'
Me.txtTotal_Cost.AcceptsReturn = True
Me.txtTotal_Cost.AutoSize = False
Me.txtTotal_Cost.BackColor = System.Drawing.SystemColors.Window
Me.txtTotal_Cost.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtTotal_Cost.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtTotal_Cost.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtTotal_Cost.Location = New System.Drawing.Point(312, 272)
Me.txtTotal_Cost.MaxLength = 0
Me.txtTotal_Cost.Name = "txtTotal_Cost"
Me.txtTotal_Cost.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtTotal_Cost.Size = New System.Drawing.Size(129, 33)
Me.txtTotal_Cost.TabIndex = 9
Me.txtTotal_Cost.Text = ""
'
'txtUnitPrice
'
Me.txtUnitPrice.AcceptsReturn = True
Me.txtUnitPrice.AutoSize = False
Me.txtUnitPrice.BackColor = System.Drawing.SystemColors.Window
Me.txtUnitPrice.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtUnitPrice.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtUnitPrice.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtUnitPrice.Location = New System.Drawing.Point(312, 216)
Me.txtUnitPrice.MaxLength = 0
Me.txtUnitPrice.Name = "txtUnitPrice"
Me.txtUnitPrice.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtUnitPrice.Size = New System.Drawing.Size(129, 33)
Me.txtUnitPrice.TabIndex = 8
Me.txtUnitPrice.Text = ""
'
'txtBalance
'
Me.txtBalance.AcceptsReturn = True
Me.txtBalance.AutoSize = False
Me.txtBalance.BackColor = System.Drawing.SystemColors.Window
Me.txtBalance.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtBalance.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtBalance.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtBalance.Location = New System.Drawing.Point(312, 144)
Me.txtBalance.MaxLength = 0
Me.txtBalance.Name = "txtBalance"
Me.txtBalance.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtBalance.Size = New System.Drawing.Size(129, 33)
Me.txtBalance.TabIndex = 7
Me.txtBalance.Text = ""
'
'txtQty
'
Me.txtQty.AcceptsReturn = True
Me.txtQty.AutoSize = False
Me.txtQty.BackColor = System.Drawing.SystemColors.Window
Me.txtQty.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtQty.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtQty.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtQty.Location = New System.Drawing.Point(312, 80)
Me.txtQty.MaxLength = 0
Me.txtQty.Name = "txtQty"
Me.txtQty.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtQty.Size = New System.Drawing.Size(129, 33)
Me.txtQty.TabIndex = 6
Me.txtQty.Text = ""
'
'txtCustomerName
'
Me.txtCustomerName.AcceptsReturn = True
Me.txtCustomerName.AutoSize = False
Me.txtCustomerName.BackColor = System.Drawing.SystemColors.Window
Me.txtCustomerName.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtCustomerName.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtCustomerName.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtCustomerName.Location = New System.Drawing.Point(312, 24)
Me.txtCustomerName.MaxLength = 0
Me.txtCustomerName.Name = "txtCustomerName"
Me.txtCustomerName.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtCustomerName.Size = New System.Drawing.Size(313, 33)
Me.txtCustomerName.TabIndex = 5
Me.txtCustomerName.Text = ""
'
'dtaOomsra
'
Me.dtaOomsra.BackColor = System.Drawing.Color.Red
Me.dtaOomsra.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.dtaOomsra.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.dtaOomsra.ForeColor = System.Drawing.Color.Black
Me.dtaOomsra.Location = New System.Drawing.Point(104, 520)
Me.dtaOomsra.Name = "dtaOomsra"
Me.dtaOomsra.Size = New System.Drawing.Size(489, 25)
Me.dtaOomsra.TabIndex = 15
Me.dtaOomsra.Text = "dtaOomsra"
'
'lblTotal_Cost
'
Me.lblTotal_Cost.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(255, Byte), CType(192, Byte))
Me.lblTotal_Cost.Cursor = System.Windows.Forms.Cursors.Default
Me.lblTotal_Cost.Font = New System.Drawing.Font("Arial", 13.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblTotal_Cost.ForeColor = System.Drawing.SystemColors.ControlText
Me.lblTotal_Cost.Location = New System.Drawing.Point(40, 272)
Me.lblTotal_Cost.Name = "lblTotal_Cost"
Me.lblTotal_Cost.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lblTotal_Cost.Size = New System.Drawing.Size(81, 33)
Me.lblTotal_Cost.TabIndex = 4
Me.lblTotal_Cost.Text = "Total cost"
'
'lblUnitPrice
'
Me.lblUnitPrice.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(255, Byte), CType(192, Byte))
Me.lblUnitPrice.Cursor = System.Windows.Forms.Cursors.Default
Me.lblUnitPrice.Font = New System.Drawing.Font("Arial", 13.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblUnitPrice.ForeColor = System.Drawing.SystemColors.ControlText
Me.lblUnitPrice.Location = New System.Drawing.Point(40, 216)
Me.lblUnitPrice.Name = "lblUnitPrice"
Me.lblUnitPrice.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lblUnitPrice.Size = New System.Drawing.Size(81, 33)
Me.lblUnitPrice.TabIndex = 3
Me.lblUnitPrice.Text = "Unit price"
'
'lblBalance
'
Me.lblBalance.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(255, Byte), CType(192, Byte))
Me.lblBalance.Cursor = System.Windows.Forms.Cursors.Default
Me.lblBalance.Font = New System.Drawing.Font("Arial", 13.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblBalance.ForeColor = System.Drawing.SystemColors.ControlText
Me.lblBalance.Location = New System.Drawing.Point(40, 152)
Me.lblBalance.Name = "lblBalance"
Me.lblBalance.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lblBalance.Size = New System.Drawing.Size(81, 33)
Me.lblBalance.TabIndex = 2
Me.lblBalance.Text = "Balance"
'
'lblQty
'
Me.lblQty.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(255, Byte), CType(192, Byte))
Me.lblQty.Cursor = System.Windows.Forms.Cursors.Default
Me.lblQty.Font = New System.Drawing.Font("Arial", 13.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblQty.ForeColor = System.Drawing.SystemColors.ControlText
Me.lblQty.Location = New System.Drawing.Point(40, 88)
Me.lblQty.Name = "lblQty"
Me.lblQty.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lblQty.Size = New System.Drawing.Size(81, 33)
Me.lblQty.TabIndex = 1
Me.lblQty.Text = "Quantity"
'
'lblCustomerName
'
Me.lblCustomerName.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(255, Byte), CType(192, Byte))
Me.lblCustomerName.Cursor = System.Windows.Forms.Cursors.Default
Me.lblCustomerName.Font = New System.Drawing.Font("Arial", 13.5!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblCustomerName.ForeColor = System.Drawing.SystemColors.ControlText
Me.lblCustomerName.Location = New System.Drawing.Point(40, 24)
Me.lblCustomerName.Name = "lblCustomerName"
Me.lblCustomerName.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.lblCustomerName.Size = New System.Drawing.Size(185, 33)
Me.lblCustomerName.TabIndex = 0
Me.lblCustomerName.Text = "Customer name"
'
'DataSet1
'
Me.DataSet1.DataSetName = "NewDataSet"
Me.DataSet1.Locale = New System.Globalization.CultureInfo("en-US")
'
'frmOomsra
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(128, Byte), CType(128, Byte))
Me.ClientSize = New System.Drawing.Size(465, 332)
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Total, Me.Previous, Me.Next_Renamed, Me.Delete, Me.Add_Renamed, Me.txtTotal_Cost, Me.txtUnitPrice, Me.txtBalance, Me.txtQty, Me.txtCustomerName, Me.dtaOomsra, Me.lblTotal_Cost, Me.lblUnitPrice, Me.lblBalance, Me.lblQty, Me.lblCustomerName})
Me.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Location = New System.Drawing.Point(4, 23)
Me.Name = "frmOomsra"
Me.Text = "Oomsra Ltd. Nig"
CType(Me.DataSet1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
#End Region
#Region "Upgrade Support "
Private Shared m_vb6FormDefInstance As frmOomsra
Private Shared m_InitializingDefInstance As Boolean
Public Shared Property DefInstance() As frmOomsra
Get
If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
m_InitializingDefInstance = True
m_vb6FormDefInstance = New frmOomsra()
m_InitializingDefInstance = False
End If
DefInstance = m_vb6FormDefInstance
End Get
Set
m_vb6FormDefInstance = Value
End Set
End Property
#End Region
'*************************************************************************
' Programer: Yogesh Bhagchandani
' Date-Wriiten: 25-3-04
'*************************************************************************
'*********************************************************************
' ADD Records
'*********************************************************************
Private Sub Add_Renamed_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Add_Renamed.Click
'UPGRADE_ISSUE: Data property dtaOomsra.Recordset was not upgraded. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup2069"'
dtaOomsra = prstRecordSet.Tables.Add
End Sub
'*********************************************************************
' Delete Records
'*********************************************************************
Private Sub Delete_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Delete.Click
'UPGRADE_ISSUE: Data property dtaOomsra.Recordset was not upgraded. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup2069"'
'dtaOomsra.Recordset.MoveNext()
'UPGRADE_ISSUE: Data property dtaOomsra.Recordset was not upgraded. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup2069"'
'dtaOomsra.Recordset.Delete()
End Sub
'*********************************************************************
' Move Records next
'*********************************************************************
Private Sub Next_Renamed_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Next_Renamed.Click
'UPGRADE_ISSUE: Data property dtaOomsra.Recordset was not upgraded. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup2069"'
'dtaOomsra.Recordset.EOF()
'UPGRADE_ISSUE: Data property dtaOomsra.Recordset was not upgraded. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup2069"'
'dtaOomsra.Recordset.MoveNext()
End Sub
'*********************************************************************
' Move Records Previous
'*********************************************************************
Private Sub Previous_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Previous.Click
'UPGRADE_ISSUE: Data property dtaOomsra.Recordset was not upgraded. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup2069"'
'dtaOomsra.Recordset.BOF()
'UPGRADE_ISSUE: Data property dtaOomsra.Recordset was not upgraded. Click for more: 'ms-help://MS.VSCC/commoner/redir/redirect.htm?keyword="vbup2069"'
'dtaOomsra.Recordset.MovePrevious()
End Sub
'*********************************************************************
' Calcualting the amount
'*********************************************************************
Private Sub Total_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Total.Click
txtBalance.Text = CStr(CDbl(txtBalance.Text) - CDbl(txtQty.Text))
txtTotal_Cost.Text = CStr(Val(txtUnitPrice.Text) * Val(txtQty.Text))
End Sub
End Class
|
|
|
|
|
I would suggest you to start from scratch and use ADO.NET. It seems there isn't much work to be done even if u start all over again.
"I think there is a world market for maybe 5 computers"
Thomas Watson, chairman of IBM, 1943
"There is no reason anyone would want a computer in their home"
Ken Olson, chairman & founder of Digital equipment, 1977
"This 'telephone' has too many shortcomings to be seriously considered as a means of communication. The device is ingerently of no value to us."
Western Union internal memo, 1876
"640 K ought to be enough for anybody."
Bill Gates, 1981
"Computers in the future may
|
|
|
|
|
I cant figure out how to use ado.net,
can be posible an example have the book for it i just cannot understand, i tried every thing but it doesn't work at all, I am still use the vb6.0 then the net
|
|
|
|
|
To start with, ADO and ADO.NET have very different approach.
ADO in vb6 is autometed at most when compared to ADO.net
Converting vb6 programs to vb.net is not very practical at most....
ok, ok! ok so! its not really effective and really difficult!
You need to understand how ADO.net captures data. read a lot of references or search and download "PDF files" using IMESH. (the best way to gather references")
You need 4 kind objects
1 connection
2 dataadapter
3 Command
4 Dataset
A Dataview can be used for further processing.
Marvin N. Guerrero
- Casting More!!
|
|
|
|
|
Hi, I have created a console application,and I am refering couple of DLL's in it. I made it into a setup package and installed in another machine, it ran well. When i installed on our network server and tried to run it. It did not run, it gave security.policy exception. Eventhough i have full control over the folder in the network i dont know why i cant run the application installed in the server from my machine. CAn anyone help me. If what i am doing is wrong I would appreciate if anyone can tell me the method of installing it properly on the network server.
Thanks
|
|
|
|
|
That's how it works. .NET applications running from network drives run in a sandbox. The easiest way to work around this is to copy the command line program to the local hard drive where you want to run it. If that is not acceptable, you will have to muck around with .NET security policies, and decide the best way to grant full permissions. There is a bit of a learning curve, so if you can just copy to the local drive, you will be better off!
|
|
|
|
|
I want to create a form such as a dialog box or a user control having return value
how can i do it
(for creating a dialogbox such as inputbox i defined a public variable and
in fact i did not have return value but i save return value that user enterde in the my inputbox in this public var)
thanx for your helps
|
|
|
|
|
Best way to do it is to set a public property or variable. There are no return values such that your see in a Function statement.
RageInTheMachine9532
|
|
|
|
|
Calling a Form using the ShowDialog method, you can return a DialogResult value.
What a piece of work is man, how noble in reason, how infinite in faculties, in form and moving how express and admirable . . . and yet to me, what is this quintessence of dust? -- Hamlet, Act II, Scene ii.
|
|
|
|
|
you can make a function is a module that shows a form as modal and returns the value from it.
|
|
|
|
|
You can use a Shared Variable in the form class that will hold the value to be returned.
"I think there is a world market for maybe 5 computers"
Thomas Watson, chairman of IBM, 1943
"There is no reason anyone would want a computer in their home"
Ken Olson, chairman & founder of Digital equipment, 1977
"This 'telephone' has too many shortcomings to be seriously considered as a means of communication. The device is ingerently of no value to us."
Western Union internal memo, 1876
"640 K ought to be enough for anybody."
Bill Gates, 1981
"Computers in the future may
|
|
|
|
|
Hi
Tanx but I couldn't undrestand what u mean
please descibe your solution.
|
|
|
|
|
create a form (frmMessageBox) and a module (mdlMsgBox)
in the mdlMsgBox create a Function :
public function MyMsgBox() as integer
frmMessageBox.Show vbModal
MyMsgBox = frmMessageBox.ReturnValue
end function
where ReturnValue is a public Get property (read only) of the form.
|
|
|
|
|
Hi
Tanx but I couldn't undrestand what u mean
please descibe your solution.
|
|
|
|
|
Try this
1st dim your second form from your main form.
2nd In the second form user will enter data into any object (text rdo...)
3rd exiting the form will be "me.hide".
4th control is then back to the main form at which point you can read the values that are in the objects of the second form.
ex;
Dim findEntry As New frmSearch
findEntry.ShowDialog() 'Form is shown. Used to set variables for search
If findEntry.DialogResult <> DialogResult.Abort Then ' Do search when true, = Abort when cancel btn clicked
sSearchText = findEntry.txtSearchText.Text
sSearchItem = CStr(findEntry.cboItems.SelectedItem)
findEntry.Close()
sSearch is a variable which is assigned the value from the second form.
Last step is to close the second form.
|
|
|
|
|