|
Can you point me to one of the articles? No luck finding one.
|
|
|
|
|
I'm developing a multi-lingual application and ultimately want to use satellite assemblies. The application differentiates between the different *.resx files (using a hub/spoke model) swimmingly but upon converting them to a *.dll I'm overcome with errors. The errors appear are the result of excluding the *.resx files and including the *.dlls in the application. Can anyone help me see the error in my ways? Thanks!
Code forth and prosper...
kIT
|
|
|
|
|
You may want to read this[^] section on Globalization and Localization and how the .NET Framework handles it. It sounds like you're trying to implement your own version of it.
|
|
|
|
|
hi
how can i now in the code wich tab is active
what is the function that tell me
i try focus but it do not give me good result
If TabPage1.Focus() Then
i hope you can help
|
|
|
|
|
Hello,
You can use the 'SelectedTab' or 'SelectedIndex' property for the Tab control to determine the
currently selected tab. You can use either of them. Only difference is that the SelectedIndex
will return the index of the tab page (0 being the starting tab). SelectedTab returns the page.
So you can use me.TabControl1.SelectedTab.Name.
So you can try something like this:
<br />
If Me.TabControl1.SelectedIndex = 0 Then<br />
MsgBox("Page1")<br />
Else<br />
MsgBox("Page2")<br />
End If<br />
I hope this will help.
Regards,
Allen
Allen Smith
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
thanks it work
|
|
|
|
|
Can someone tell me what I am doing wrong? I am new to VB and am totally lost.
I have created a listbox with a add and multiply button. I have been able to get the add button to add more then 2 numbers but not the multiply button. How do I get the multiply button to multiply 2 or more numbers?
Public Class ArithmeticCalculatorForm
' handles Enter Button Click events
Private Sub enterButton_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles enterButton.Click
'clears previous results
If resultLabel.Text <> "" Then
resultLabel.Text = ""
operandsListBox.Items.Clear()
End If
'display results in ListBox
operandsListBox.Items.Add(Val(inputTextBox.Text))
inputTextBox.Clear() 'clears results from TextBox
inputTextBox.Focus() 'transfers focus to TextBox
'clears previous results and listbox to enable new entries
If operandsListBox.Items.Count < 2 Then
addButton.Enabled = False
multiplyButton.Enabled = False
End If
If operandsListBox.Items.Count >= 2 Then
addButton.Enabled = True
multiplyButton.Enabled = True
End If
End Sub
Private Sub addButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles addButton.Click
Dim total As Integer = 0
Dim operand As Integer = 0
Dim operandCounter As Integer = 0
Dim results As Double = 0
'sums operands in operandsBox
Do
results = operandsListBox.Items.Item(operandCounter)
total += results
operandCounter += 1
Loop While operandCounter < operandsListBox.Items.Count
results = total
resultLabel.Text = String.Format("{0:G}", results)
addButton.Enabled = True
inputTextBox.Focus()
End Sub
Private Sub multiplyButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles multiplyButton.Click
Dim total As Integer = 0
Dim operand As Integer = 0
Dim operandCounter As Integer = 1
Dim results As Double = 1
'multiplies operands in operandsBox
Do
results = operandsListBox.Items.Item(operandCounter)
total =* results
operandCounter += 1
Loop While operandCounter < operandsListBox.Items.Count
results = total
resultLabel.Text = String.Format("{0:G}", results)
multiplyButton.Enabled = True
inputTextBox.Focus()
End Sub
End Class ' ArithmeticCalculatorForm
|
|
|
|
|
Is this not a simple mathmatical problem?
You initialise TOTAL to be zero.
Any number * zero will be zero.
Perhaps you should initialise total to be 1 in the multiply routine:
dim total as Integer=1
This should then give a better answer
|
|
|
|
|
Using a Microsoft Access Database, I have an employee table where the social security number is declared as a text field of 9 characters. I have connected the dataset to my VB applicaiton using the dataset wizard.
I have created a form where I am using the MaskedTextBox to display the social security number with the dashes. The problem is that when I try to save the record an error is thrown saying, "Cannot set column 'SS_NO'. The value violates the MaxLength limit of this column."
Do I need to change the size of the social security number in the database to include the dashes ? Will the dashes be stored ?
Have I not bound the control to the dataset correctly ? I dragged the MaskedTextBox onto the form and set the databindings/text field to my employee table.
I'm still new at this. Thanks.
|
|
|
|
|
The problem with using the MaskedTextBox is that it's going to return a String WITH the dashes in it. If your database column is a number or a string with only 9 characters, it's not going to fit. You have to reformat or convert the value to an appropriate length before it goes to your DataTable.
|
|
|
|
|
I made my column wider in the MS-Access database and it seems to be working now.
|
|
|
|
|
I understand your idea that I would need to reformat (or convert) the data to an appropriate length before it goes to my DataTable, but I don't understand where I would perform such a task. Is it an event in the MaskedTextBox ? I'm having a similar problem while using a Combox where the data returned is violating the Emp.Dept field.
Thanks in advance.
|
|
|
|
|
I've written a data entry program for a PDA that is used in my company. The program uses the .NET CF 2.0. The program runs fine, the problem occurs if someone lets the battery die on the PDA. This causes the .NET CF 2.0 to be deleted out of the RAM and then the program can't run unless the .NET CF is reinstalled. What I'm trying to figure out is how to have the program, or another program, reinstall the CF. I've read that the program would have to be written in native code because the CF is not installed. Any idea on how to do this with VS2008 or any ideas on how to fix this problem would be greatly appreciated! Even better would be if someone could help me figure out how to install the .NET CF 2.0 into the ROM, though I couldn't find anything on this. Thanks in advanced.
|
|
|
|
|
Do a clean build of your PDA and perform a full backup onto SD card. If they let their PDA battery die, get them to charge it up and restore from backup. This is the strategy we are using.
-------------------------------------------
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Just bugger off and leave me alone!!
|
|
|
|
|
Thanks. I definitely give that a try.
|
|
|
|
|
I need load my FORM1 and open my FORM2
While my FORM1 is Working...FORM2 is always On TOP
When My FORM2 finish.....FORM2 is closed.
(Form1 fill a ListBox (100 lines is an example))
Somebody help me?
thanks.
my english is bad.
«« Mexico »»
|
|
|
|
|
Help you with what? You haven't explain what part of this you'r having a problem with. And, I don't see anywhere where threading would come into play.
|
|
|
|
|
With Thread-1 I want fill the ListBox and with Thread-2 open
other WinForm and check when Thread-1 finish the work......
I want that 2 Threads is executing in the same time....
Or give me example for use Threads, multithreading, in same time
|
|
|
|
|
opening a second form on a second thread is not a good idea. Since you know nothing of threading at all, I'd avoid the topic entirely because there are some hard-to-debug pitfalls with doing this.
All UI forms and controls should be created and accessed from the UI thread (startup thread). Accessing controls and forms from non-UI threads involving using delegates and invoking methods so those objects are accessed only from the UI thread.
You can find numerous examples with a little Googling. Results for "vb.net threading[^]".
|
|
|
|
|
Dim subtotal As Integer<br />
<br />
With Me<br />
<br />
' Me.Definition_dbDataSet.CUSTOMER_ORDER.fillbyreceipt(Me.txtReceiptNo.Text)<br />
' Me.CUSTOMER_ORDERTableAdapter.Update(Me.Definition_dbDataSet)<br />
Try<br />
Try<br />
subtotal = Decimal.Parse(Sell_unitpriceTextBox.Text) * Me.NumericUpDown1.Value<br />
Me.txtOrderNo.Text = Maxorder.ToString<br />
Me.txtReceiptNo.Text = MaxReceipt.ToString<br />
Me.txtTime.Text = .getdate()<br />
Me.txtTotal.Text = subtotal.ToString<br />
ControlSetting(True)<br />
Catch ex As Exception<br />
MessageBox.Show("Please enter Quantity" & ex.Message, "ERROR")<br />
End Try<br />
<br />
Me.CUSTOMER_ORDERDataGridView.CurrentRow.Cells("Order_No").Value = Me.txtOrderNo.Text<br />
' Me.CUSTOMER_ORDERBindingSource.AddNew()<br />
<br />
Me.CUSTOMER_ORDERDataGridView.CurrentRow.Cells("TimeDate").Value = Me.txtTime.Text<br />
' Me.CUSTOMER_ORDERBindingSource.AddNew()<br />
<br />
Me.CUSTOMER_ORDERDataGridView.CurrentRow.Cells("Stock_Order").Value = Me.Item_NameComboBox.Text<br />
' Me.CUSTOMER_ORDERBindingSource.AddNew()<br />
<br />
Me.CUSTOMER_ORDERDataGridView.CurrentRow.Cells("Stock_Qty").Value = Me.NumericUpDown1.Text<br />
'Me.CUSTOMER_ORDERBindingSource.AddNew()<br />
<br />
Me.CUSTOMER_ORDERDataGridView.CurrentRow.Cells("Amount_Paid").Value = Me.CUSTOMER_ORDERDataGridView.CurrentRow.Cells(3).Value * Sell_unitpriceTextBox.Text<br />
strID = txtReceiptNo.Text<br />
strOrder = txtOrderNo.Text<br />
'txtTime.Text = Format(Date.Today, "dd/MM/yyyy")<br />
Me.CUSTOMER_ORDERTableAdapter.InsertSales(strID, strOrder)<br />
' Me.CUSTOMER_ORDERTableAdapter.UpdateSale(strID, strOrder)<br />
Me.CUSTOMER_ORDERDataGridView.CurrentRow.Cells("Amount_Paid").Value = Me.txtTotal.Text<br />
Me.CUSTOMER_ORDERBindingSource.AddNew()<br />
Me.CUSTOMER_ORDERTableAdapter.Update(Me.Definition_dbDataSet)<br />
Catch ex As Exception<br />
MessageBox.Show("" & ex.Message, "Error", MessageBoxButtons.RetryCancel)<br />
End Try<br />
End With
i having problem that when i choose new detail from combox to datagridview.it's gv me eror.
And i have another question that how i enter new sales in same receipt_no until i end it.without duplicated data. here my query
INSERT INTO [CUSTOMER ORDER]<br />
(Receipt_No, Order_no)<br />
VALUES (?, ?)
UPDATE [CUSTOMER ORDER]<br />
SET Stock_Order = ?, Stock_Qty = ?, TimeDate_Order = ?, Amount_Paid = ?, Item_ID = ?<br />
WHERE ([Receipt_No] = ?) AND ([Order_no] = ?)
i set my receipt and order_no as primary key...can some 1 help me correct it....thanks thanks thanks in advanced
modified on Tuesday, April 15, 2008 8:34 PM
|
|
|
|
|
First, you don't need to preface everything with Me . Get red of the "With Me" at the beginning of your code also, you don't need it.
Member 4442916 wrote: i having problem that when i choose new detail from combox to datagridview.it's gv me eror.
And that error would be ...??? What lines does it show up on??
|
|
|
|
|
hai friends
i am doing a setup for my project...
while installing ... after 2 or 3 minutes ...
i want the user to enter the key which i will give along with the cd...
the installing should be continued when the key is enterd and correct one
and it should not be stopped by the "TaskManager"
plz help me...
oke bye
thanks in advacne
vijay
|
|
|
|
|
vijaylumar wrote: i am doing a setup for my project...
while installing ... after 2 or 3 minutes ...
i want the user to enter the key which i will give along with the cd...
the installing should be continued when the key is enterd and correct one
The installation should ask for the key straight away, instead of half way through the install. You'll need to use a third party installation tool to do this, like InstallShield or InnoSetup.
IMHO, doing this is a waste of time.
vijaylumar wrote: and it should not be stopped by the "TaskManager"
It's not possible to prevent this...
|
|
|
|
|
Hi
I got an error when trying to delete and move files within the file manager. I can delete or move one file, but when I try to delete or move a second file, I get the error(Error moving file:Portal Root\\CS.CARVEL.mg.08.pdf to Portal Root\\ManWD\\.The process cannot access the file Portal Root\\CS.CARVEL.mg.08.pdf because it is being used by another process). I have to log out and log back in for each file I want to move or delete.
Please help me
Thanks
Cincy
|
|
|
|
|
And this has what to do with VB.NET??
Shouldn't this question be directed at a forum that supports DotNetNuke??
|
|
|
|