|
How can i use VS.net Setup to pack MSDE with my application and install MSDE if it's not installed.
|
|
|
|
|
You really can't do that, unless you found a good merge module for MSDE.
Search CodeProject and other sites, like GotDotNet.com, for "bootstrap setup". You'll find many projects and articles that deal with exactly this problem.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can I add GUID in my application. I m going to develop a messenger, I want that when the user is sign in his/her account, then window display message for his/her signing in and open his/her login of messenger.
|
|
|
|
|
iamalik wrote:
How can I add GUID in my application.
You can generate a new GUID using the shared NewGuid method in the GUID structure:
Dim MyAppId as GUID = GUID.NewGuid
Hope this helps
Tom
|
|
|
|
|
Need help. Drivers often want to know the miles per gallon their cars get so they can estimate gasoline costs. I need to develop an application that allows the user to input the number of miles driven and the number of gallons used for a tank of gas. First thing is to calculate the miles per gallon. Write a function procedure MilesPerGallon that takes the number of miles driven and gallons used (entered by user), calculates the amount of miles per gallon and returns the miles per gallon for a thankful of gas.
Displaying the results. I have to create a click event handler for the Calculate MPG button that invokes the Function procedure MilesPerGallon and displays the result returned from the procedures
Need Help!!!!!!!
|
|
|
|
|
Put 2 textboxes, 3 labels and a button on a form:
Label1:
Text = "Miles driven:"
Location = 32, 24
Label2:
Text = "Gallons used:"
Location = 32, 48
Label3:
Text = ""
Location = 144, 80
TextBox1:
Text = ""
Location = 144, 24
TextBox2:
Text = ""
Location = 144, 48
Button1:
Text = "Calculate"
Location = 232, 112
Add the following code
<br />
Private Function MilesPerGallon(ByVal miles As Integer, ByVal gallons As Integer) As Double<br />
<br />
Return miles / gallons<br />
<br />
End Function<br />
<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click<br />
<br />
If IsNumeric(TextBox1.Text) And IsNumeric(TextBox2.Text) Then<br />
Label3.Text = GetMPG(CInt(TextBox1.Text), CInt(TextBox2.Text)).ToString & " mpg"<br />
End If<br />
<br />
End Sub<br />
Then you may also want to ensure the user can only enter numbers into the textboxes:
<br />
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress, TextBox2.KeyPress<br />
<br />
If Not IsNumeric(e.KeyChar) Then e.Handled = True<br />
<br />
End Sub<br />
Hope this helps
Tom
|
|
|
|
|
Great! Another homework problem completely written for the student. I'll tell you right now, that he'll get a failing grade. Not because the code is wrong or the result is incorrect, but because (1) it's not his code, and (2) you haven't taught him anything.
Everyone has a certain coding style that is like a figerprint. If a student deviates from the style, compared to previous code he's submitted, he'll get nailed and failed. Stealing someone elses code is a capital offense in these classes.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
mmm.... i did not see the other post until after i replied... figured it was a fleet manager or something wanting a quick app for his drivers... Anyway, if he's got any sense he'll look at the code provided and understand it before presenting it in his own way.
|
|
|
|
|
Tom John wrote:
figured it was a fleet manager or something wanting a quick app for his drivers
Tutors and Lecturers have a distinct style for detailing coursework that no one else on the planet uses. See below, the first sentence is in the imperative. In the second paragraph why does he "have to" create a click event handler, surely that's common knowledge (Chapter 1 material in many books on creating Windows Forms applications) and one doesn't need to be told they "have to" create it.
Write a function procedure MilesPerGallon that takes the number of miles driven and gallons used (entered by user), calculates the amount of miles per gallon and returns the miles per gallon for a thankful of gas.
Displaying the results. I have to create a click event handler for the Calculate MPG button that invokes the Function procedure MilesPerGallon and displays the result returned from the procedures
Anyway, at least you now know what to look for in a homework question.
Do you want to know more?
WDevs.com - Member's Software Directories, Blogs, FTP, Mail and Forums
|
|
|
|
|
Hi All,
Everytime I try to run below code [Dim newTN As TreeNode = CType(tn.Clone(), TreeNode)], I receive run-time error:
No parameterless constructor defined for this object.
[CODE]
Private Sub RecurseNodesForFiltering(ByVal Node As TreeNodeCollection)
Try
Dim reproj As Regex
reproj = New Regex(UCase(txtFiltering.Text))
For Each tn As TreeNode In Node
'remove unsearched nodes
If reproj.IsMatch(UCase(tn.FullPath)) Then
Dim newTN As TreeNode = CType(tn.Clone(), TreeNode)
newTN.Parent.Remove()
gobjDispTV.SelectedNode.Nodes.Add(newTN)
End If
RecurseNodesForFiltering(tn.Nodes)
Next tn
Catch ex As Exception
MsgBox(ex.ToString, MsgBoxStyle.Critical)
End Try
End Sub
[/CODE]
Any idea how to solve this problem ?
Thank you very much for any helps and suggestions.
Regards.
|
|
|
|
|
Din Krop wrote:
newTN.Parent.Remove()
Are you sure you want to be removing the parent here?
It looks like you are attempting to add the cloned node to another tree and then remove its parent node... not sure this would have the desired effect, correct me if I am wrong.
to move a node from one treeview to another all you have to do is the following:
<br />
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click<br />
<br />
If TreeView1.SelectedNode Is Nothing Then Exit Sub<br />
<br />
Dim node As TreeNode = TreeView1.SelectedNode<br />
node.Remove()<br />
<br />
If TreeView2.SelectedNode Is Nothing Then<br />
TreeView2.Nodes.Add(node)<br />
Else<br />
TreeView2.SelectedNode.Nodes.Add(node)<br />
End If<br />
<br />
node.EnsureVisible()<br />
<br />
End Sub<br />
Hope this helps
Tom
|
|
|
|
|
Thank you very much for your reply.
What I would like to do is to allow user to search for Nodes and display only nodes searched by user.
There are two Treeviews: gobjDispTV and gobjHideTV
gobjDispTV : use by user for browsing nodes including searching. Only selected node will be searched by system.
gobjHideTV : use by system for storing original treview nodes and as a data provider to gobjDispTV
System will use gobjHideTV to search for nodes and display the result in gobjDispTV.
Please let me know if you want to see the source code (just small program) via email.
Thank you very much for any helps.
Regards,
din
|
|
|
|
|
Can someone help me do the following since I have no clue on how to program this form. I need help with creating an application that computes the amount of income tax that a person must pay, depending upon that person's salary. The application should perform the following as shown below.......
Under $20,000 = 2% income tax
$20,000 - $50,000 = 5% income tax
$50,001 - $75,000 = 10% income tax
$75,001 - $100,000 = 15% income tax
Over $100,000 = 20% income tax
Define an event handler for the calculate button click event. Have this event handler use a Select Case statement to determine the user’s income-tax percentage. For simplicity, this value should then be multiplied by the user’s salary and displayed in the output Label.
Need Help!!!!!!!
|
|
|
|
|
Dim Salary As Double
Dim Salary1 As Double
Salary = Text1.Text
Select Case Salary
Case Is <= 20000
Salary1 = Salary * 0.02
Case Is <= 50000
' 5% tax bracket
Salary1 = 400 + ((Salary - 20000) * 0.05)
Case Is <= 75000
' 10% tax bracket
Salary1 = 400 + ((Salary - 50000) * 0.1)
Case Is <= 297350
' 15% tax bracket
Salary1 = 400 + ((Salary - 75000) * 0.15)
Case Else
' 20% tax bracket
Salary1 = 400 + ((Salary - 100000) * 0.2)
End Select
Label1.Caption = Salary1
|
|
|
|
|
|
Wouldn't really worry... the calculation was wrong anyway.
|
|
|
|
|
Great! You taugh him absolutely nothing!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Urgent, anyone know how to write the source code for reading RFID??
^VeL^
|
|
|
|
|
|
Like Colin said, you have to be MUCH more specific about what your having a problem with. Most RFID readers are serial, so it will involve either writing your own Serial Port class, or finding a 3rd party class to do it for you. There's a bunch of these laying around the web, so they're not hard to find at all.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
yeah its the last program of the class i have to turn in, and Ive got through so far, but I feel screwed now. My book is an introduction to visual basic fifth edition, and the problems for chapter 7 Im just clueless on. The stuff is on arrays, and if anyone can help me with this problem I'll give you my eternal love, or I'll paypal you something, what ever works for you
Josh
|
|
|
|
|
Since the 1.5 million (or so) of us, will probably not have this book, there is nothing we can do to help you. If you have a specific question on code your writing, GREAT!, we can help with that. But that's all. We won't write your code for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have to agree with Dave, but do feel free to post any question or doubts u are facing... We'll be glad to help
"Rejoice always, pray without ceasing, in everything give thanks; for this is the will of God in Christ Jesus for you."1Thess. 5:16-18
|
|
|
|
|
I am using Progress Database. The connection to the database is done by DSN connection. I am trying to find out how I can import selected tables and fields from my database to Access. I am using VB 6. Can I also use some sort of validation that will enable the table to be only updated once a day. Can anyone help me on this. Many Thanks.
|
|
|
|
|
Suresh Prasad wrote:
I am trying to find out how I can import selected tables and fields from my database to Access
Can you tell clearly about the your database? What is the name of the database that you want to import your data into Microsoft access?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|