|
Hi All,
I want the visual basic code to transfer the data from a VB application to the online application, similar to a text box in a website. I request you to email the code to tejassoft@yahoomail.com
-- modified at 14:48 Tuesday 18th October, 2005
|
|
|
|
|
If you want code written for you, go to www.RentACoder.com.
If you want help with your code, you've come to the right place. But you have to ask a specific question.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hellow to all ..
i was wondering how i can past data of text that i had copy useing the right mouse click and copy ?
in vb code of course ...
|
|
|
|
|
wow is my question is too much genius to be answered in here ?
-- modified at 13:06 Thursday 20th October, 2005
|
|
|
|
|
Help, I must be missing something simple
I declare (as I did in VB6) the following
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Object, ByVal lpString As String, ByVal lpFileName As String) As Integer
then I try to do this:
WritePrivateProfileString("test", "testKeyName", "AAA", "d:\temp\test.ini")
and I get this
Error "Object reference not set to an instance of an object"
any ideas are welcome...
|
|
|
|
|
Try defining it as such:
<DllImport("kernel32.dll", CharSet:=CharSet.Unicode, ExactSpelling:=False, CallingConvention:=CallingConvention.StdCall)> _
Private Shared Function WritePrivateProfileStringA(ByVal lpApplicationName As String, ByVal lpKeyName As Object, ByVal lpString As String, ByVal lpFileName As String) As integer
End Function
and see if that works for you.
|
|
|
|
|
Your Declare statement is wrong. Try changing it to:
Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" _
(ByVal lpApplicationName As String, _
ByVal lpKeyName As String, _
ByVal lpString As String, _
ByVal lpFileName As String) _
As Integer
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Perfect, works like a champ
|
|
|
|
|
Hello all,
How do you select the text in a datagrid with one mouseDown? Like Microsoft Access lets you select text by clicking and dragging. I have only managed to do this on the second click (after the textbox has been selected).
My text box is read only, and I want the user to be able to select a portion of text in a cell after only one click and drag operation (not a click and then a click and drag).
I appreciate any help...
Frank
|
|
|
|
|
Hi everybody,This is my first Q in this informative forum.
I'm a new student in VB.NET'so would someone help me please?
I've a project in VB.NET ,where I've SQLData base connected to my project through ADO.NET components, and it's records displayed in Textboxes.
My first question is :
How can I add a button to search specific records determined by two columns in this DB ,and that must be by using one button.
for mor clarification:
when a user want to search the DB,s/he will have two choices according to two column chosen by this user , I and the name of these two columns e.g (patient'sName,patient'sNo)will appear whether on Checkbox or Radibutton and according to any choice the textboxes will represent the search parameters.
My project's code is under the namespace " System.Data.Oledb" .
My second question is :
What is the best technique uesed to make a connection to a DB in Vb.net, the ADO.NET(oledb) provided Data in VB.NET or using a code for each task and command? why?
I would be thankful for you.
|
|
|
|
|
Deema Jack wrote: How can I add a button to search specific records determined by two columns in this DB ,and that must be by using one button.
Add a button. Add a handler. Write a stored proc that does the search based on the two fields. Call the stored proc, using the values of the text boxes, and show the result.
Deema Jack wrote: What is the best technique uesed to make a connection to a DB in Vb.net, the ADO.NET(oledb) provided Data in VB.NET or using a code for each task and command? why?
I'm not sure how you'd 'use a code for each task and command' ? Basically, the best thing to do is to create connections late, release them early. .NET has it's own connection pool. It works best if all your users log into the database with the same user/password ( so permissions are handled within the DB, not at login ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks Christian, but I tried many ways but I failed . Would you tell me please what is the code?
This is my form code:
B1 is to display the first record , B2 for the next one,B3 for the previous one& B4 for the last one. B8 is to make a search by one way,just by (PatientsNo),.So what is the code to make the search by two ways (patientsNo & PatientsName)?
Imports System.Data.OleDb
public Class Form1
Inherits System.Windows.Forms.Form
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.BindingContext(DataSet11, "PatientsTable").Position =0
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.BindingContext(DataSet11, "PatientsTable").Position=+1
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.BindingContext(DataSet11,
"PatientsTable").Position -= 1
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Me.BindingContext(DataSet11, "PatientsTable").Position = BindingContext(DataSet11, "PatientsTable").Count - 1
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Dim selcom As New OleDbCommand()
Dim drobj As OleDbDataReader
selcom.Connection = OleDbConnection1
selcom.CommandText = "select* from PatientsTable where(PatientsNo= " & TextBox1.Text & ")"
OleDbConnection1.Open()
drobj = selcom.ExecuteReader
If drobj.Read Then
TextBox1.Text = drobj.GetValue(0)
TextBox2.Text = drobj.GetValue(1)
TextBox3.Text = drobj.GetValue(2)
TextBox4.Text = drobj.GetValue(3)
TextBox5.Text = drobj.GetValue(4)
TextBox6.Text = drobj.GetValue(5)
TextBox7.Text = drobj.GetValue(6)
Else
MsgBox(" The record isn't exist")
End If
OleDbConnection1.Close()
drobj.Close()
End Sub
Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
DataSet11.Clear()
OleDbDataAdapter1.Fill(DataSet11, "PatientsTable")
End Sub
Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
Close()
End Sub
ePrivate Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
|
|
|
|
|
Deema Jack wrote: selcom.CommandText = "select* from PatientsTable where(PatientsNo= " & TextBox1.Text & ")"
Doesn't this work ? You don't need the brackets. Is PatientsNo a text field ? I assume not, but if it is, the string needs to be in quotes.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Okie, I know this will be easy for someone to help with, since I have no clue what I am doing.
I have a DataAdapter linked to a datagrid. I have a textbox that when I type in a number, will bring up all those entries with that number. Everytime I try and edit the Query, I manage to mess it up. Any advice?
I am a Mechanical Engineering intern, but my boss got sent to Germany for a week, so they decided to put me with the Computer guys here, so they have me trying to program a website for them when I am not trained for any of it. hah sorry, little rant.
|
|
|
|
|
It would be helpful to post the working and non working queries. Then someone could provide you better assistance.
|
|
|
|
|
How do you read the Hard Drive or CPU Serial Number in VB 6.0?
Thanks,
Ralph
|
|
|
|
|
|
Hi every body!
First, thank for your help.
I want to build an engine to read HTML Help file (.chm).
It can return topic, content, ... in the .chm file.
I was tried do that with API function HtmlHelp(...) (I found this function in HTML WorkShop), but it only return me the Help View with the .chm file, not any topic, content!
I really need this, please help me
Thanks!
|
|
|
|
|
hi there,
u might take a look on this library
CHM Lib
<< >>
|
|
|
|
|
How can I display text on screen without showing the VB form? The form must be hidden and the text must be transparent but 100% visible. It must not disturb the user. It will be changing text just like the Subliminal Messages in "Self Help Subliminal" software. This needs to be done in VB 6.0 only.
Plz plz help me everybody. I shall be very very greatful to you people.
Accalia
|
|
|
|
|
looks like GDI would be the way to go, but i'm not sure of the exact commands right now. try MSDN-ing GDI there's always something useful there.
|
|
|
|
|
Thank you very much for your help. I would be trying out this but I may need your help a bit as I am not too technical.
|
|
|
|
|
well then again, i may be wrong. the Draw method only allows drawing within the client area.... any help anyone?
|
|
|
|
|
Hi,
how to get the row number of the datagrid when i click on any cell of that row?
i used currentcellchanged event for this ,but i could not get the row number when i click for the first time
|
|
|
|
|
You can use the grid.currentrowindex property
|
|
|
|