|
how can i read a serial number while running setup and validate it in vs.net 2005 ????
himanshu p.taunk
|
|
|
|
|
himanshu p taunk wrote: how can i read a serial number while running setup and validate it in vs.net 2005 ?
What serial number? Your app or VS?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
How to load and unload DLL or Plugins in VB.NET2005? I have a program that loads dll by mouse click in the menu but i don't know how to unload it,i hope someone could help me or tell me how to unload DLL and Plugins,also help me how to load it by using interfaces,thanks in advance..
<rattlesnake><3:16>
|
|
|
|
|
|
Hello guys,
I want you to help me with this...
1) I have two tables tblEmployee & tblAttendance, i made a form which let the user enter the attendance of the employee of course the attendance is in a datagrid. i did everything but the problem is when i made changes with the attendance and click "btnupdate" error message show to me tell me to make an appropriate update button.
2) i want a suggestion design for my form: I want to make a monthly form which you enter the ID of the employee and Enter the date (Month & Year) and the employee info shows to you.
I wish you could help me with this.
ok that's cool
|
|
|
|
|
hi alzaabi20xx
i understand what you are Saying and feeling sorry for you, but it will be better if you show us the code that gives you problem so that we can help. but for now we cant because we dont know what you did in your code, and it seems that you use your error trap that you have defined your self like
try
Adapter1.update(ds,"Table")
Catch ex.Exception
messagebox.show("make an appropriate update button")
end try
This is your own Error, give us your code, then we will help.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
hi Mr Vuyiswa Maseko,
thank you for your feelings towards me and I really appreciatte it and thank you again for replay....
I want to show you my form Design to let you understand it well:
Click Here:
http://www.albumtown.com/data2/f0897e959b9ad043dbdc11f4b8f9a115/84859_1289450.pjpeg[^]
this is the Error messege that shows to me:
Missing the DataColumn 'DDate' in the DataTable 'AddressBook' for the SourceColumn 'DDate'.
Here it is my Form Load code:
inc = 0<br />
con = New OleDbConnection(conString)<br />
con.Open()<br />
<br />
sql = "SELECT * FROM tblContacts"<br />
da = New OleDb.OleDbDataAdapter(sql, con)<br />
<br />
ds = New DataSet<br />
da.Fill(ds, "AddressBook")<br />
<br />
MaxRows = ds.Tables("AddressBook").Rows.Count<br />
<br />
txtFirstName.Text = ds.Tables("AddressBook").Rows(0).Item(1)<br />
txtSurname.Text = ds.Tables("AddressBook").Rows(0).Item(2)<br />
<br />
sql = "SELECT * From Attendance"<br />
da = New OleDbDataAdapter(sql, con)<br />
<br />
dt = New DataTable<br />
da.Fill(dt)<br />
<br />
dg1.DataSource = dt<br />
<br />
con.Close()
and here it is my update button code:
Dim cb As New OleDb.OleDbCommandBuilder(da)<br />
<br />
ds.Tables("AddressBook").Rows(inc).Item(1) = txtFirstName.Text<br />
ds.Tables("AddressBook").Rows(inc).Item(2) = txtSurname.Text<br />
<br />
da.Update(ds, "AddressBook")<br />
<br />
MsgBox("Data updated")
ok that's cool
|
|
|
|
|
Good morning MR alzaabi20xx
Firstly i will go line by line and we will solve the Problem with you.
|alzaabi20xx wrote
Missing the DataColumn 'DDate' in the DataTable 'AddressBook' for the SourceColumn 'DDate'.
What the Error means, there is no Field in the table AddressBook that has a name "DDate".
Another thing, how many tables are you using?
Are these tables related?
on the Following code
sql = "SELECT * FROM tblContacts" 'No Problem
da = New OleDb.OleDbDataAdapter(sql, con) 'No Problem
ds = New DataSet 'No Problem
da.Fill(ds, "AddressBook")' Problem
you have an SQl statement quering the tblContacts after that a Dataset is being filled and from nowhere i see the table "AddressBook".
MR alzaabi20xx we dont Fill in table name everywhere. ok lets sort out your code.
Can you you give me the names of your Fields in your table. and decide which table you are using.
iF you are going to use all this tables its fine, but use them in order and dont use Fields from other table.
Give me the above info and i will help
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
Hello again Mr Vuyiswa Maseko,
thank you again for replaying.
In this application i use 2 tables and as you wrote my problem is i don't know how to make a relation between both tables (tblContacts & Attendance).
ok then i made my Database using MS Access and my tables order as following:
------------- ---------------
tblContacts: Attendance
------------- ---------------
ID (PK) "Text" EmpID "Text"
FirstName "Text" DDate "Date/Time"
SurName "Text"
as you see this is my both tables...
thank you again Mr Vuyiswa Maseko and i really appreciatte what you done to me....
ok that's cool
|
|
|
|
|
Dear alzaabi20xx
its my plesure to help you.
|alzaabi20xx wrote:
ok then i made my Database using MS Access and my tables order as following:
----------------------------------------------------
tblContacts: Attendance
----------------------------------------------------
ID (PK) "Text" EmpID "Text
FirstName "Text" DDate "Date/Time
SurName "Text"
When you Create a Relation in two tables, there must be a Primary Key for each table and a foreign key. e.g
-----------------------------------------
Customer Products
============ +++++++++++++
CustomerID(PK) Product_ID(PK)
CustomerName Product_Name
Product_ID(FK) Product_Descreption
The Above will be possible with Relations Product_ID is the Primary key of the Products table and a Foreign key in the Customer table.
The Following code will help you understand.
' Open a database connection.
Dim strConnection As String = _
"Data Source=localhost;Initial Catalog=Northwind;" _
& "Integrated Security=True"
Dim cn As SqlConnection = New SqlConnection(strConnection)
cn.Open( )
' Set up a data adapter object.
Dim strSql As String = "SELECT * FROM Customers" _
& " WHERE City = 'Buenos Aires' AND Country = 'Argentina'"
Dim da As SqlDataAdapter = New SqlDataAdapter(strSql, cn)
' Load a data set.
Dim ds As DataSet = New DataSet( )
da.Fill(ds, "Customers")
' Set up a new data adapter object.
strSql = "SELECT Orders.*" _
& " FROM Customers, Orders" _
& " WHERE (Customers.CustomerID = Orders.CustomerID)" _
& " AND (Customers.City = 'Buenos Aires')" _
& " AND (Customers.Country = 'Argentina')"
da = New SqlDataAdapter(strSql, cn)
' Load the data set.
da.Fill(ds, "Orders")
' Close the database connection.
cn.Close( )
' Create a relation.
ds.Relations.Add("CustomerOrders", _
ds.Tables("Customers").Columns("CustomerID"), _
ds.Tables("Orders").Columns("CustomerID"))
When you bind the Datagrid, you are going to use "CustomerOrders" the name of the relation.
If you dont understand you will tell me.
MR alzaabi20xx we take it step by step, next we will update. try this First.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
Hello Mr Vuyiswa Maseko,
thank again for your time...
i copy the code that you've gave me and it worked but there is still a problem of the datagrid. How can i make "btnUpdate" and "btnNext" and other buttons..
thanks for your concern....
ok that's cool
|
|
|
|
|
Am Sorry i could not reply to your message, i was busy on the meetings. tomoro i will get you your answer. i have to Go now bye for now
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
Good Morning alzaabi20xx
for your Button First enter the following code
Private Sub cmdfirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdfirst.Click
'Move to the First Record
Try
Me.BindingContext(DataSet11, "Property").Position = 0
Catch ex As OleDb.OleDbException
MessageBox.Show("Canot Navigate, Because the is no Connection to the Server", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
For your Button Previous
Private Sub cmdprevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdprevious.Click
''' This will obviously point to the Previous record of the Dataset
Try
Me.BindingContext(DataSet11, "table").Position -= 1
Catch ex ex As OleDb.OleDbException
MessageBox.Show("Canot Navigate, Because the is no Connection to the Server", "WARNING", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Try
End Sub
For Button Next
'''Display Next Record
''' This will obviously point to the Next record of the Dataset
Try
Me.BindingContext(DataSet11, "property").Position += 1
Catch ex As OleDb.OleDbExceptionn
MessageBox.Show(ex.Message)
End Try
For Button Last
'move to the last Record
Try
With Me.BindingContext(DataSet11, "property")
.Position = .Count - 1
End With
Catch ex As OleDb.OleDbExceptionn
MessageBox.Show(ex.message)
End Try
For your update Button
SqlDataAdapter1.Update(DataSet11, "Property")
PLease modity this code according to your datasource. try to catch the Errors and display system Errors not your your Errors messages on the Messagebox,and that will be until you finish your Delopment. after that you can make Errors that users can understand. Contact me through E-mail vuyiswam@tshwane.gov.za because i might be codeProject the whole of today.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
Hello again Mr Vuyiswa Maseko
I'm really happy that you still patient with me...
i put all codes of the buttons and no error show to me, but i have a question if you don't mind.
Q) you wrote the following code:
Me.BindingContext(DataSet11, "property").Position += 1
"property" what is it & what should i wrote instead of it...
and thank you again for your time..
ok that's cool
|
|
|
|
|
Good Afternoon Mr alzaabi20xx
"property" is the Name of your table that you want to navigate through it, but in your case use the nameof the Relationship. remember.
alzaabi20xx our thread is becoming to long in this topic, i suggest you start contacting me on the e-mail i gave you.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
|
|
|
|
|
Well, i have a SWF (not mine) that shows a city map. I use SWF Decompiler to see some code inside it and i can use some of it.. some example is :
Flash1.SetVariable "_yscale", 120
Well, now, when i move the scale from 100% to 120% or more i need to drag it and that way i can see some areas..
The problem here is that i can't found the way to invoke the startDrag event indide SWF file
The Action Script says this :
on (press)<br />
{<br />
startDrag ("_root.mapa", false);<br />
}
I don't need to drag the ShockWave Flash Object, i need to drag the picture inside it
Can somebody help me in this ?
|
|
|
|
|
Considering this has absolutely nothing to do with VB.NET, no.
|
|
|
|
|
Hello everyone,
Can anybody help me how to access public folders on exchange server.
For example 'Public Folder/All Public Folders/Email/2007/January/Sales/..
In my application I have a requirement to automatically file email messages and attachments.
Thanks
Nas
|
|
|
|
|
Hi,
I am trying to make a custom search function for the web browser control. It works fine with single frame pages, but on pages with multiple frames such as wikipedia articles, I need to get the outermost document. I am unable to do that. Here is my code:
Dim htmldom As MSHTML.IHTMLDocument2 = CType(wBrowser.Document.DomDocument, MSHTML.IHTMLDocument2)
Dim outerMostElement As IHTMLElement
Dim doc As IHTMLDocument2 = DirectCast(wBrowser.Document.DomDocument, IHTMLDocument2)
If wBrowser.Document.Body.Parent.ClientRectangle.IsEmpty Then
outerMostElement = doc.body
Else
outerMostElement = doc.body.parentElement
End If
'Create the range
Dim range1 As MSHTML.IHTMLTxtRange = DirectCast(DirectCast(outerMostElement, MSHTML.IHTMLBodyElement).createTextRange(), MSHTML.IHTMLTxtRange)
'CType(htmldom.selection.createRange(), MSHTML.IHTMLTxtRange)
'Get the initial start point of the text range
If range1.text.Substring(myIndex).IndexOf(wordToFind) <> -1 Then
myIndex = range1.text.Substring(myIndex).IndexOf(wordToFind) + myIndex
range1.moveStart("character", myIndex)
frmSearch.Hide()
Me.Activate()
range1.findText(wordToFind, 0, 0)
range1.select()
'set the start position of the range for te next try
myIndex += wordToFind.Length
range1.collapse()
Return myIndex
Else
Return -1
End If
It gives a com casting error on pages such as wikipedia as its unable to cast doc.body.parentElement. Whats the solution to this?
Thanks in advance,
Ahmad
|
|
|
|
|
Hi. I'm trying to find out how I can select a row in a datgrid and allow my various textboxes and listboxes corresponding to the fields in the datagridview, to display the data within that row. the user then must be able to edit the data in the textboxes and the new dat should be shown in the database and when i call a procedure to save the data the new data must be stored in the dataset and the database updated. I'm sure I just need to right the code in a click event for the datagrid. the problem is which one do i use? is this how i do it? Please help(im using vb.net 2005)
Mr Oizo
|
|
|
|
|
you have to set textbox, combo box and other object datasource same as your datagridview datasoure.. and set there text value using there property...
use datagridview.columns(0).selected = true for selecting a row...
set multiselect to false to avoid multiselection...
|
|
|
|
|
hi
i am working on my assingment about pong game and it's almost done but i just want to provide control option for user so they can select their choice for control keys to control right and left paddle
so i have use module to pass the info. for another form but it's not working, so can anybody help me with this
'''
this is the code for module
<br />
Module Module1<br />
Public MyKeys(4) As Keys<br />
<br />
Public Sub main()<br />
Dim MyForm1 As New frmStart<br />
MyForm1.Show()<br />
Application.Run()<br />
End Sub<br />
End Module
'''''
this is for form load
Private Sub frmStart_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
cboKey1.Items.Add(Keys.Up)<br />
cboKey1.Items.Add(Keys.Down)<br />
cboKey1.Items.Add(Keys.Right)<br />
cboKey1.Items.Add(Keys.Left)<br />
cboKey1.Items.Add(Keys.A)<br />
cboKey1.Items.Add(Keys.Z)<br />
cboKey1.Items.Add(Keys.K)<br />
cboKey1.Items.Add(Keys.M)<br />
cboKey1.Items.Add(Keys.S)<br />
cboKey1.Items.Add(Keys.X)<br />
cboKey1.SelectedIndex = 0<br />
For I As Integer = 0 To cboKey1.Items.Count - 1<br />
cboKey2.Items.Add(cboKey1.Items.Item(I))<br />
cboKey3.Items.Add(cboKey1.Items.Item(I))<br />
cboKey4.Items.Add(cboKey1.Items.Item(I))<br />
<br />
Next<br />
cboKey2.SelectedIndex = 0<br />
cboKey3.SelectedIndex = 0<br />
cboKey4.SelectedIndex = 0<br />
MyKeys(1) = cboKey1.SelectedItem<br />
MyKeys(2) = cboKey2.SelectedItem<br />
MyKeys(3) = cboKey3.SelectedItem<br />
MyKeys(4) = cboKey4.SelectedItem<br />
Timer1.Enabled = True<br />
End Sub '''
and this code is for keydown event for another form
Private Sub frmPong_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown<br />
For J As Integer = 1 To 4<br />
Select Case MyKeys(J)<br />
Case MyKeys(1)<br />
MyBat1.Y -= 10<br />
Case MyKeys(2)<br />
MyBat1.Y += 10<br />
Case MyKeys(3)<br />
MyBat2.Y -= 10<br />
Case MyKeys(4)<br />
MyBat2.Y += 10<br />
End Select<br />
Next<br />
End Sub '''''
and code for button click
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
Dim MyForm As New frmPong<br />
MyForm.Show()<br />
MyKeys(1) = cboKey1.SelectedIndex<br />
MyKeys(2) = cboKey2.SelectedIndex<br />
MyKeys(3) = cboKey3.SelectedIndex<br />
MyKeys(4) = cboKey4.SelectedIndex<br />
Me.Hide()<br />
End Sub
'
'
so when application start the first form shows option for user and when user click buttton it's load selected controls for user
that's the hole idea
please help me with this problem
please please please
|
|
|
|
|
first of all u hv to add a items in combobox if u want to retrieve the data in second form of combobox
then write code
firstform.combobox.items()
or
save the data in database table n retrive in combobox
oke
hope u understand
byeeeeee
lucky
|
|
|
|
|
hi everyone,
i want to know whether there r any method or Trick to replace multiple spaces with single space.Let me explain
i load a text file in richtextbox.This file contain a number of lines. Now within two words of a single line there are single space(mean space(1)),double space(mean space(2)),tripple space(mean space(3)).... multiple space(mean space(n)). Now i want to Replace all occurence of multiple type of Space with Single space.
I think i properly told my problem.
anybody have idea what should i do?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
hi,
May be My Article[^] will help you if you do not found a correct solution, but you will have to change it little bit.
Chatura Dilan
|
|
|
|