|
all textboxes are in PANEL named pnlTextBoxes
dim txt as Syetm.Windows.Forms.Textbox<br />
For each txt in pnlTextBoxes.controls<br />
SomeThing=txt.AnyPropery<br />
Next
|
|
|
|
|
In VBA there is no a lot of objects.....such as pnlTextBoxes, controls and other...
Best regards,
Konstantin
|
|
|
|
|
Hi all,
We want to start a VB6 windows app from a windows service in VB.NET 2003. After installing the windows service, it starts the app as a "process" (we can see it in the task manager) and we cannot see the form, so we couldn´t inertact with it.
How we can make to start normally this window app?
Thanks in advance...
Time flies like an arrow
-- modified at 9:57 Wednesday 15th February, 2006
|
|
|
|
|
The service which starts the app has to have the "allow interact with desktop" flag set in order to be able to propagate this to any application started by it and in order to show up with a form or sth similar.
The other method would be to you start the application in the context of a user instead of the system, which has the benefit that the program does not run in the system context (with even more that administrative rights) but only in the limited user context.
All Settings to be made in Administrative Tools/Computer Management/Services.
|
|
|
|
|
thanks!!!!
-- modified at 15:39 Wednesday 15th February, 2006
|
|
|
|
|
I'll say this one more time, because no matter how many times you ask the question, the answer doesn't change!
It's a CUSTOM BUTTON implementation! You can find such an example right here[^]!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave is right.
The standard button control won't show an icon when FlatStyle=System.
Your only choices are to:
A) Change FlatStyle back to Standard.
B) Use a custom button control, like the one Dave linked to.
|
|
|
|
|
I need to retvieve report from 2 tables which have same values in field of one
table. 2 of the tables dont have primary key.I need to retrieve depending on month. plz help me(In cystal reports using vb.net)
|
|
|
|
|
I have a number of experience on using 2 dimension array in VB.NET,
I would like to know some better, and standard pattern to write it.
for an example,
We need to pass a set of patient record from a modules to a form,
this record include all the current male patients(no fixed length).
the record includes (name, sex, age)
Please give me advise and write down your coding style in this issue.
Thanks!!
|
|
|
|
|
I wouldn't use arrays at all.
Make a class with the properties for a patient. Create objects from the class and put the objects in a list, for an example an ArrayList.
---
b { font-weight: normal; }
|
|
|
|
|
I'll second the other reply and extend it a bit.
1) Create a Patient Class including all the attributes for the patient (name, gender, age, et al.)
2) Create a PatientCollection class, inheriting from CollectionBase (see Walkthroughs in help for
details on how to do this)
The Patient class is a gimme. It is pretty much a canonical example of a class/object to be used in a program.
The PatientCollection is a bit more work than the ArrayList but is safer and since you have Option Strict turned on (hint, hint) it will save some casting in your code.
hth
Alan.
|
|
|
|
|
How can I auto-populate two MS Word document fields (customer name) and (address)
From the Northwind database
Example:
MS Word Document: New customer Information
This is to inform you Mr. _________(customer name) has a new address of _______ (address)
Here is my scenario:
User logs in to web page and updates a record for the customer’s new address, which will be stored in the customers table of the Northwind database. User wants to print the above word document: New Customer Information which will contain the updated data
I have visual studio 2003, and Visual studio tools for office
|
|
|
|
|
hi
i want to know how to crete table through quries in access
i had created table test1 with one field id which is autonumber i had used following code
strSql = "Create Table test1(Id AutoNumber)"
conn.Execute strSql
but it gives error syntax error in field definition
what i want is that id should be primary key and autonumber
ddd
-- modified at 2:08 Wednesday 15th February, 2006
|
|
|
|
|
The autonumber column type in Access is called "INTEGER IDENTITY". Also, you must set the primary key.
Here's an example:
strSql = "CREATE TABLE test1 (" & _
"id INTEGER IDENTITY NOT NULL, " & _
"CONSTRAINT PrimaryKey PRIMARY KEY (id))"
conn.Execute strSql, , adCmdText + adExecuteNoRecords
|
|
|
|
|
|
Hi, I am using VB.NET 2003/MS Access. I am getting data from a table into a particular datatable in a dataset. say the data fields are ID, Name, Period and Address. I want to obtain a record from the table for a particular period and ID. How can this be done using a select statement?
With Best Regards,
Mayur
|
|
|
|
|
SELECT * FROM TableName WHERE [ID]=@ID AND Period=@Period
!alien!
|
|
|
|
|
Thnx for your reply. Can you please provide some additional steps as to how I can get the values obtained by the select statement into different variables. I am a fresher in .Net.
how do you write the select statement for selecting records from datatable.
your select statement -
SELECT * FROM tablename WHERE [ID]=@ID AND Period=@Period
how do we replace tablename with dataset.tables(0)?
With Best Regards,
Mayur
-- modified at 0:46 Wednesday 15th February, 2006
|
|
|
|
|
This is example.
Private Sub FillDataGrid()
Dim strId As String = "" 'Set Id
Dim strPeriod As String = "" 'Set Period
Dim tableName As String = "" 'Set tableName
Dim connstring As String = "" 'Set ConnectionString
Dim selectSQL As String = "SELECT * FROM " + tableName + " WHERE [ID]='" + strId + "' AND Period='" + strPeriod + "'"
Dim conn As New OleDb.OleDbConnection(connstring)
Dim cmd As New OleDb.OleDbCommand(selectSQL, conn)
Dim ds As New DataSet
Dim da As New OleDb.OleDbDataAdapter(cmd)
Try
conn.Open()
da.Fill(ds)
DataGrid1.DataSource = ds.Tables(0)
Catch ex As Exception
MessageBox.Show(ex.Message, ex.Source)
Finally
If conn.State = ConnectionState.Open Then
conn.Close()
end if
conn.Dispose()
cmd.Dispose()
End Try
End Sub
!alien!
|
|
|
|
|
I believe Mayur was asking about how to select data from Data Table not from Database Table.
I was about to ask the same question.
My case is like this.
myDataTable = PopulateDataTableFromAnyTable()<br />
<br />
for each row in myDataTable <br />
<br />
Update DatabaseTable where FieldA = row.item(0) and FieldB = row.item(1)<br />
<br />
end for
If I directly update "DatabaseTable" for each iteration, it will be really slow.
So I was thinking to populate "DatabaseTable" to a Data Table, do the update in Data Table and then send the changes back to Database.
The problem is how to search data in data table with one or more criteria.
Thank you
WiL
|
|
|
|
|
Hey guys,
I have found the solution, I guess. Please refer to the link below.
http://www.c-sharpcorner.com/Code/2004/March/DataSetsIn.NETP2.asp[^]
Ofcourse, i have the same query as shiroamachi. how do you insert or update data into a datatable and finally update the database with the datatable. if anyone has any idea regarding this, plz let us know.
With Best Regards,
Mayur
-- modified at 4:07 Wednesday 15th February, 2006
|
|
|
|
|
Hi,
I want to use fax service extended com api with VB.NET and did the following:
I am using faxcomex.dll for fax server connection and etc.
Public Class frmSendFax
Inherits System.Windows.Forms.Form
Public WithEvents objFaxServer As New FAXCOMEXLib.FaxServer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
'Connect to the fax server
objFaxServer.Connect("")
objFaxServer.ListenToServerEvents(FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetINCOMING_CALL
+ FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetIN_QUEUE)
End Sub
Private Sub objFaxServer_OnIncomingJobAdded(ByVal objFaxServer As FAXCOMEXLib.IFaxServer,
ByVal jobid As String) Handles objFaxServer_OnIncomingJobAdded
Dim objFaxIncomingQueue As FAXCOMEXLib.FaxIncomingQueue
Dim objFaxIncomingJob As FAXCOMEXLib.FaxIncomingJob
Dim strCallerID As String
objFaxIncomingJob = objFaxIncomingQueue.GetJob(jobid)
strCallerID = objFaxIncomingJob.CallerId()
MsgBox(strCallerID)
End Sub
But how can I get the event called as it not happening in VB.NET???
I hope anybody can help me.
Thanks
Prasananjit Dash
|
|
|
|
|
At a glance, I can see one mistake:
objFaxServer.ListenToServerEvents( _
FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetINCOMING_CALL + _
FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetIN_QUEUE)
Should be:
objFaxServer.ListenToServerEvents( _
FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetINCOMING_CALL Or _
FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetIN_QUEUE)
Adding values together will cause bits to be set/reset where they shouldn't because of mathmatical carry's.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 10:46 Wednesday 15th February, 2006
|
|
|
|
|
Hi,
Is there a way to draw a picture on the titlebar
Please, help me
Thank you,
chatura
|
|
|
|
|