|
OK, let me ask this question, how do you avoid multiple logins in windows forms application.
manv
|
|
|
|
|
There is no equivelent object in Windows Forms. There is also no such thing as a login to a Windows Forms app unless you code in your own security system.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
If you want to control a user activities in windows environment, try to look at this article[^].
|
|
|
|
|
hello
i write this code from differnt examples.i want to use dataset in my code but i think dataset is working but this code is inserting data into my table tell me how i can i modify to get benefit of dataset. plz help me soon.
Dim mycon As OdbcConnection
Dim ds As New DataSet
mycon = New OdbcConnection("DSN=BLTPS;APP=Microsoft® Visual Studio .NET;WSID=BLHOMEPC;DATABASE=BLTPS;Trusted_Connection=Yes")
Dim selectString As String = "SELECT * FROM icloct"
mycon.Open()
Dim myOdbcCommand As New OdbcCommand
myOdbcCommand.Connection = mycon
Dim adapter As OdbcDataAdapter
adapter = New OdbcDataAdapter(selectString, mycon)
adapter.SelectCommand = New OdbcCommand(selectString, mycon)
adapter.Fill(ds, "icloct")
myOdbcCommand.CommandText = "INSERT INTO icloct(locid, locdes, adduser, adddate, addtime)VALUES ('klm','yes', '', '', '')"
adapter.InsertCommand = myOdbcCommand
myOdbcCommand.ExecuteNonQuery()
adapter.Update(ds, "icloct")
mycon.Close()
|
|
|
|
|
i m using DTS package in vb.net while running the project i m getting this error:
error: 13queryinterface for interface DTS.customtask failed
how to get rid of this error ???
|
|
|
|
|
|
Hi, I've got a 2D array which I would like to sort into descending order according to the first column but keep the information in the 2nd column in the same row as the information in the first column no matter where the sort moves it to in the array. To explain more clearly:
Supposing I had this 2D array:
|5 1|
|6 2|
|3 3|
|8 4|
|2 5|
I want my bubble sort to be able to sort it into:
|8 4|
|6 2|
|5 1|
|3 3|
|2 5|
All the info I've found on bubble sorts has only been about 1D arrays. Any help or a nudge in the right direction would be really appreciated!
Thanks,
your
peter
|
|
|
|
|
Something like this:
Private Sub Sort2DArray(ByVal TwoD_Arr(,) As Double)
'
Dim Tmp_Arr(0, 1) As Double
Dim upperInd As Integer
Dim lowerInd As Integer
'
For upperInd = 0 To TwoD_Arr.GetLength(0) - 1
'
For lowerInd = (upperInd + 1) To TwoD_Arr.GetLength(0) - 1
'
If (TwoD_Arr(lowerInd, 0) > TwoD_Arr(upperInd, 0)) Then
'
Tmp_Arr(0, 0) = TwoD_Arr(lowerInd, 0)
Tmp_Arr(0, 1) = TwoD_Arr(lowerInd, 1)
'
TwoD_Arr(lowerInd, 0) = TwoD_Arr(upperInd, 0)
TwoD_Arr(lowerInd, 1) = TwoD_Arr(upperInd, 1)
'
TwoD_Arr(upperInd, 0) = Tmp_Arr(0, 0)
TwoD_Arr(upperInd, 1) = Tmp_Arr(0, 1)
End If
'
Next
'
Next
'
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim TwoD_Arr(,) As Double = {{5, 1}, {6, 2}, {3, 3}, {8, 4}, {2, 5}}
Dim i As Integer
Dim j As Integer
For i = 0 To TwoD_Arr.GetLength(0) - 1
Debug.WriteLine("UnSorted: " & TwoD_Arr(i, 0) & " " & TwoD_Arr(i, 1))
Next
Sort2DArray(TwoD_Arr)
For j = 0 To TwoD_Arr.GetLength(0) - 1
Debug.WriteLine("Sorted: " & TwoD_Arr(j, 0) & " " & TwoD_Arr(j, 1))
Next
End Sub
Returns:
UnSorted: 5 1
UnSorted: 6 2
UnSorted: 3 3
UnSorted: 8 4
UnSorted: 2 5
Sorted: 8 4
Sorted: 6 2
Sorted: 5 1
Sorted: 3 3
Sorted: 2 5
Hope that helps,
progload
|
|
|
|
|
Visual Basic 2005 Professional Edition:
I need to drag and drop an image from one PictureBox to another PictureBox where:
1) the image is visible while being dragged
2) the image can be dropped at any location within the target PictureBox
3) the image can be rotated within the target PictureBox
|
|
|
|
|
|
jo0ls at xtremevbtalk.com wrote a program that does it all!
1) Transparent backround on dragged objects.
2) See object as it is being dragged.
3) Rotate object.
4) Nudge object.
5) Delete object.
6) Drag multiple objects.
7) Drag multiple copies of an object.
8) Redrag objects.
9) Drag objects of any size
Wow!
<http: www.xtremevbtalk.com="" showthread.php?t="265584&goto=newpost">
|
|
|
|
|
Hi,
does anybody know ( or have ) some project to read doc/rtf. files? I would like to make something like document reader in VB. I'm looking for simple project for "notepad" or wordpad in visual basic.
Thanks
|
|
|
|
|
|
I want to make changes to the HTMLdocument that resides in a WebBrowser.Document
I can navigate to a web page,
WebBrowser1.Navigate(address)<br />
and the image looks good in WebBrowser1. After the document completes, I capture the event when a page element is clicked on:
Dim ClickedElement As HtmlElement<br />
Private Sub Document_Click(ByVal sender As Object, ByVal e As HtmlElementEventArgs)<br />
If (WebBrowser1.Document IsNot Nothing) Then<br />
Dim pt As Point = System.Windows.Forms.Cursor.Position<br />
pt = PointToClient(pt)<br />
pt.Offset(-WebBrowser1.Left, -WebBrowser1.Top)<br />
ClickedElement = WebBrowser1.Document.GetElementFromPoint(pt) 'WebBrowser1.Document.Window.Position)<br />
ClickedElement.ScrollIntoView(True)<br />
tblElements.Rows.Clear()<br />
AddElementToTable(ClickedElement, 0, Direction.Ascending)<br />
DataGridView1.DataSource = tblElements<br />
End If<br />
End Sub
Now I can do either of these:
'Change the ID of an element<br />
If clickedElementID = "" then ClickedElement.ID = "t_19"<br />
or
<br />
'Add a new element after the one that was clicked<br />
Dim newID As String = ClickedElement.Id & "_t1"<br />
Dim newElement As HtmlElement = WebBrowser1.Document.CreateElement(newID)<br />
newElement.Id = newID<br />
ClickedElement.InsertAdjacentElement(HtmlElementInsertionOrientation.AfterEnd, newElement)
Both of these changes show up if I check the element:
For Each el As HtmlElement In ClickedElement.Parent.Children<br />
Console.WriteLine("Sibling id: " & el.Id)<br />
Next
Sibling id: t_19
Sibling id: t_19_t1
But I can't figure out how to have the display reflect the change or how to save the UPDATED version of the html. The WebBrowser1.documenttext doesn't reflect any changes.
Thanks!
Grant
Everyone else's job looks easy
|
|
|
|
|
Can somebody please tell me how to find the remainder when one digit is divided by another digit?
Thanks and Regards
Amaneet Brar
|
|
|
|
|
Use the modulo operator MOD.
---
b { font-weight: normal; }
|
|
|
|
|
i need to open the word document in the server and display it
to the user, and save changes if any to the server back
i am able to open and display it in explore (.doc file is in url)
but save back to server ?? so for this i need some control with in with
i can open and save ,
if any of u had gown through the same problem.
pls respond
Understanding comes from failures
SUCESSES comes form understanding failures
|
|
|
|
|
What do you mean by "server"? A web server???
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
ptr_Electron wrote: but save back to server ?? so for this i need some control with in with
i can open and save ,
Check with your system administrator whether you have an appropriate permission to write (save) to your file.
|
|
|
|
|
Does anyone have a good example of a TCP/IP server using the TCPListener and TCPClient classes in VB.Net 2005?
I need to write an application that listens for TCP/IP client connections. Once a client is connected the server must maintain these connections in order to process any incoming commands and to send out status information to the clients.
Any help would be appreciated.
Tony
|
|
|
|
|
|
How do I setup project written in vb.net 2003, so application could be ran from the network drive?
David Pudel
pudel.d@dreyfus.com
|
|
|
|
|
First you copy/install the application files onto the network drive.
Next, you must install all of your app's dependencies on to each client system that will run your app. This includes the .NET framework, MDAC (if you're using ADO.NET), any ActiveX or COM objects used, etc. If there are a lot of dependencies, then you might want to write a "Client Installer" for your app to simplify the process for your users.
|
|
|
|
|
hello
i have created a DSN server named "BLTPS" through control pannel ODBC service and using a userid and password property.
now how i will connect to database through my code plz tell me which namespaces i have to add and what is the syntax.
plz help me soon
thanks
|
|
|
|
|
What you need to use is called ADO.NET. It's a collection of .NET classes under the System.Data namespace which allow you to work with various databases. This is a big subject and I highly recommend that you read up on this on MSDN. See the below link.
You should also search this website and the Internet on this subject too. There's plenty of examples out there.
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconoverviewofadonet.asp[^]
That said, you need to use the data provider classes under the System.Data.ODBC namespace. Read the above link to understand how to use them.
|
|
|
|