|
I am using VB6 and mysql for database, just wanna ask what ADODB property im going to use to know if my program is connected to the database? Please help me
|
|
|
|
|
I am using VB 2003.net
I have a field that I want to have the ability fill in a great about of data, but not take up the whole screen.
On the form I have a small text box "Quote_Note" that Shows 5-6 lines of my typed test. For ease of typing and to see a whole screen when typing. I am opening a new form "Text_Box" that is one large text box called Quote_Note.
Private Sub QUOTE_NOTE_ENTER(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles QUOTE_NOTE.Enter
Dim TEXT_BOX As New TEXT_BOX
TEXT_BOX.QUOTE_NOTE.Text = QUOTE_NOTE.Text
TEXT_BOX.Show()
End Sub
Issue 1)How do I get the data back to my calling form Quote.Quote_note.text from TEXT_BOX.Quote_note.text
2) When I tab into Quote.Quote_note.text and it opens TEXT_BOX.Quote_note.text I get a cursor
but if I mouse click on Quote.Quote_note.text I do not? Any Ideas.
|
|
|
|
|
Hi,
I am developing my first applicaiton in .NET.
I have a datagrid in my application,which has editing capability. Using this datagrid, one can insert new row or update existing row.
My question is, only managers should be able to edit this datagrid.i.e, only managers can insert/update data from the table. Rest of the people should be able to see the data in the grid.
can anybody please tell me how canI implement this? I really appreciate your help!!!
|
|
|
|
|
The simple method is that when user clicks the update button it should display UserName and Password Input box, if it matches to Manager's UserName and Password,which u set in you code, it should use the Datatable.acceptchanges method..
otherwise use Datatable.rejectchanges method
Does it works?
|
|
|
|
|
hi guys..
this is Bobby..Can any one help me out how to capture an live image through a webcam in VB6.0.I need your help guys..
Expecting an immediate reply.
Bobby
|
|
|
|
|
In VB.NET i placed PrintControl in Form,then i am trying to show
report in this print control.
I am selecting nearly 30000 students,when executing
objRpt.CreateDocument()
line system is not responding and i am
getting "System.OutOfMemoryException"
But it works well when selecting 1000 records.
Private Sub ShowStudenReport()
Dim objRpt As New XtraRptStudent
Dim dsTest As DataSet
objRpt.DataSource = dsTest
objRpt.DataMember = dsTest.Tables(0).TableName
PrintControl1.PrintingSystem = objRpt.PrintingSystem
objRpt.CreateDocument()
End Sub
when executing line "objRpt.CreateDocument()" ,the system is not
responding...
please provide solution
Thankx.
|
|
|
|
|
Hi
this is the code for searching the value 'Computer' in 'Subject' column in datagrid ....
Dim gridTable As DataTable = CType(DataGrid1.DataSource, DataTable)
gridTable.DefaultView.RowFilter = "Subject = 'computer'"
gridTable.DefaultView.Sort = "Edition"
but now I want that user should put value in Textbox and then it should be filtered and display in datagrid but having problem in Query...
Plz Help me
Thanks
|
|
|
|
|
Does it work to just use this:
gridTable.DefaultView.RowFilter = "Subject = '" & txtMyTextBox.Text.Trim & "'" ??
|
|
|
|
|
Thanks Kschuler
Its really working... I was trying to solve problem but having difficulty in query and You have solved it
Thank You Once Again
Syed Ali Raza Rizvi
|
|
|
|
|
i'm reading the files names from a directory and subdirectory, and i want to bound a progress bar with the time of getting the files from the directory, how?
Faris Madi
Nothing Comes Easy (N.C.E.)
|
|
|
|
|
How can i handle something when the the system is idle
for example the screen saver run with the system is idle
Faris Madi
Nothing Comes Easy (N.C.E.)
|
|
|
|
|
i want to read a text from word document, how can i read the content without reading the scripts and styles of the word.
Faris Madi
Nothing Comes Easy (N.C.E.)
|
|
|
|
|
First get the Office XP PIAs. Then you can use code like this:
Imports System.Text.RegularExpressions
Imports Microsoft.Office.Interop.Word
Public Shared Function ReadFile(ByVal filename As String) As String
Dim app As ApplicationClass = Nothing
Dim objFilename As Object = CType(filename, Object)
Dim readOnly As Object = True
Dim isVisible As Object = False
Dim missing As Object = System.Reflection.Missing.Value
Try
app = New ApplicationClass()
Dim doc as Document = app.Documents.Open(objFilename, missing, readOnly, missing,
missing, missing, missing, missing
missing, missing, missing, isVisible,
missing, missing, missing)
doc.Activate()
Dim text As String = doc.Content.Text
Return StripText(text)
Catch
Throw
Finally
If Not(app Is Nothing)
app.Quit(missing, missing, missing)
End If
End Try
End Function
Public Shared Function StripText(ByVal str As String) As String
Dim re as Regex = New Regex("[^a-zA-Z_0-9.?\-\(\)\\\/\:\;\""\'\,\s]")
str = re.Replace(str, "")
re = new Regex("\s+")
str = re.Replace(str, " ")
Return str
End Function
I'm a C# programmer so I'm a little rusty on VB. Anyways, you use doc.Content.Text to get the raw text from the document. There will be a lot of weird characters mixed in there, hence the regular expressions. There's probably a better regular expression, I just haven't had the time. What I've found is that this gives me just the text of the document and nothing else.
|
|
|
|
|
Hi everybody
am working on mshflexgrid, i need to know how can i set an icon in the row header to indicate that the row is the current one, and how to remove it when moving to another row.
thanks alot
Byeeeeeeeee
|
|
|
|
|
hi, please someone help me ,
I have a checkedlistbox loading data from a column in a table and when I chec a specific item it's price appear in textbox5.text as shown from the following code, my problem that the sum of the whole checked item didn't work ..
please someone run it to me , I need it today the life of my project depend on it.
Here is my code it works ,except the sum process.
visual basic code:--------------------------------------------------------------------------------<br />
Private Sub checkedListBox1_ItemCheck(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemCheckEventArgs) HandlesCheckedListBox1.ItemCheck <br />
Dim sum As Double <br />
Dim c As Integer <br />
If e.NewValue.ToString() = "Checked" Then <br />
If TextBox4.Text.Trim() = "" And TextBox5.Text = ""Then TextBox4.Text = dt.Rows(e.Index)("PartName").ToString() ' TextBox5.Text = dt.Rows(e.Index)("Price").ToString() <br />
sum += (dt.Rows(e.Index)("Price").ToString()) <br />
Else TextBox4.Text += "," + dt.Rows(e.Index)("PartName").ToString End If <br />
TextBox5.Text = FormatCurrency(sum) 'the totla sum will represented in this txtbox <br />
End If <br />
End Sub
Thaaaaaaaankx for who will give me a hand of help..
|
|
|
|
|
sum += (dt.Rows(e.Index)("Price").ToString())
if i correctly read your code, here you're putting in a DOUBLE something that's a STRING... you should parse it to a Double before adding the values!
~~~ From Milano to The Hague, easy as it goes ~~~
|
|
|
|
|
hi
when we press alt+shift inside textboxes, we convert to the second
keyboard language . what i want is to do this programmatically
i.e directly start writing in the second language
Tamimi - Code
|
|
|
|
|
Hello Everyone, sorry to bother you, this can be a stupid request but I am really stuck up. I have a windows form (let's call it Form1) which needs to be able to catch an event from another form (let's call it Form2). Form2 is launched from within a method in Form1. Form2 has just two buttons that can be clicked by the user, and I need to catch those events from Form1.
Is it possible? and how can I do it without much trouble?
Thanks in advance and sorry for my bad english.
~~~ From Milano to The Hague, easy as it goes ~~~
|
|
|
|
|
The 'dirty' method would be to make the two buttons (the fields) public. Then Form1 could bind the event directly:
Form2 f = new Form2();
f.button1.Click += ...;
f.button2.Click += ...;
Better would be to make public event in Form2 and letting Form1 catch those instead:
public event EventHandler Button1Clicked;
public event EventHandler Button2Clicked;
private void button1_Click(object sender, EventArgs e) {
if (Button1Clicked != null)
Button1Clicked(this, EventArgs.Empty);
}
Form2 f = new Form2();
f.Button1Clicked += ...;
f.Button2Clicked += ...;
|
|
|
|
|
sorry to bother you again, but even if it works in C# i can't get it working in VB.NET. Any ideas if there's some other way to do this (and in VB)?
Thanks again
~~~ From Milano to The Hague, easy as it goes ~~~
|
|
|
|
|
This code works in Visual Studio 2003. Form1 has a ListBox on it. Form2 has two command buttons named btn1frm2 and btn2frm2. Programatically create two command buttons on form1 and set them equal to the command buttons on form2. Now you can capture the events from the buttons on form2 in the event handlers for the buttons you programatically created on form1 as follows:
Private WithEvents b1f2 As Button<br />
Private WithEvents b2f2 As Button<br />
<br />
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load<br />
<br />
Dim form2 As New Form2<br />
<br />
b1f2 = form2.btn1frm2<br />
b2f2 = form2.btn2frm2<br />
AddHandler b1f2.Click, AddressOf b1f2_click<br />
AddHandler b2f2.Click, AddressOf b2f2_click<br />
<br />
form2.Show()<br />
<br />
End Sub<br />
<br />
Private Sub b1f2_click(ByVal sender As System.Object, ByVal e As System.EventArgs)<br />
ListBox1.Items.Add("1")<br />
End Sub<br />
<br />
Private Sub b2f2_click(ByVal sender As System.Object, ByVal e As System.EventArgs)<br />
ListBox1.Items.Add("2")<br />
End Sub<br />
|
|
|
|
|
Am using VB.NET 2005 with WebBrowser Control, when i run it then i typed the url and then it display correctly, when the javascript is alert the title is Microsoft Internet Explorer, how can i chnage it?
................
|
|
|
|
|
VB.net / sql. Consider I have a table in sql with fields A to F each storing an integer value. I need to find the maximum value from the fields. Can anyone help me with this. Can this be done through a sql query? if yes, then how and if not then how to find the maximum value through program. plz help fast...
With Best Regards,
Mayur
|
|
|
|
|
hi
if you want to select the max value in the column A :
SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand("select max(A)from TableName", SqlConnection1)
SqlConnection1.Open()
Dim max As Integer = CType(SqlSelectCommand1.ExecuteScalar(), Integer)
SqlConnection1.Close()
Tamimi - Code
|
|
|
|
|
thnx for your reply. However, I do not want to find the max value from a particular field. I need to find the maximum of the value from the fields A to F. say A has a value 1, B-2, C-3, D-4, E-5, F-3, then I need to find the value 5 using a query or a piece of code. Remember A, B, C, D, E & F are field names and not records.
With Best Regards,
Mayur
|
|
|
|