|
Yes - Redim saves the day
|
|
|
|
|
|
hey, i am having some trouble with my Hotel billing application form my visual basic 2005 book. I have completed the assignment halfway through, i just need help with some of the more harder coding i guess you could say. this doesn't include any databases or anything either.
It is case 5 from the programing assignments in chapter 8:
I have to design a hotel billing assignment for a cancun resort in Mexico.
The purpose:
the application will calculate the hotel cost and convert the bill into mexican pesos or american dollars based on the customer's nationality.
Other Info:
A combo box requesting the type of room:
King Suite ($280)
2 Queen Beds suite ($310)
King Standard Room ($235)
2 Queen Beds Standard Room ($255)
i have the entire interface completed, i need help with the code for converting american dollars to pesos. here is what i got that is completely wrong, i don't even think this is the right procedure, i do no it is way to short... i really need help with this
AmericanDollars = Pesos * 0.1
can someone help me with making this proceddure?
thanks alot ...seroiusly
/J-Man\
modified on Tuesday, December 11, 2007 3:18:46 AM
|
|
|
|
|
this is Lounge. Don't ask your programming questions here.
No one will help here in the lounge. Please ask your questions in the appropriate forum.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
It used to be AmericanDollars = Pesos * .00001
but I think currently it's AmericanDollars = Pesos * 52944
Seriously, apart from you asking this in the lounge, you just need to go to a banking site and get the current conversion rate, assuming you don't need to sync up with a webservice to keep the rate current.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
execute("http://www.google.com/search?hl=en&q=convert+%1+pesos+to+dollars")
Steve
|
|
|
|
|
His conversion rate is not that bad. As of today, it was 10.91 MXN per USD... His MXN = 0.1 * USD is assuming 10 pesos to 1 dollar, which is a good estimation.
|
|
|
|
|
I have used datagrid to display data on a web page. Does anyone know how to use the sleep function in vb.net to display data using time intervals.
for example first entry came in at 16:02:01 and the second at 16:02:21 instead of displaying both entries at once i want it to display the first entry then wait 20 secods to display the second entry.
I hope i have made the problem clear.
|
|
|
|
|
You should stick with the answers you're getting in the ASP.NET forum. Again, you cannot use the VB.NET sleep function, and the fact that you're continuing to ask about the VB.NET sleep method means you really need to take my advice and buy an ASP.NET book.
No matter what, you're going to use AJAX or you're just going to write javascript that takes all the values and shows them in a time interval. There's just no way to use VB.NET to create a client side delay as you're describing it.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Friendz! i m working on a type of intranet site! i hav given a task to add a disclaimer to outgoing smtp messages! so if any one has idea so plz plz help me out! soon! itz very urgent
Thanks & Regards
Adil
|
|
|
|
|
If you are using an exchange-server there are a lot of tools to add disclaimers to the outgoing mail ( normaly those use a message sink to fetch messages from the internal transport and attach these) - just search google for exchange and disclaimer ( you will find even some vb-scripts to handle the task ).
|
|
|
|
|
In the old Datagrid (ASP.Net 1.1) days to add a data column to a datagrid using VB.Net you used something like:
Datagridname.Columns.Add(New DataColumn("Name", Gettype(String)))
Now when I try to use this same functionality to name a column that I need to add programattically to a gridview I get this error:
Value of type 'System.Data.DataColumn' cannot be converted to 'System.Web.UI.WebControls.DataControlField'
I have tried to use DataControlField("Name")as shown here: gridview.Columns.Add(New DataControlField("Carrier FEIN")) but I get an error: 'New cannot be used on a class that is declared 'MustInherit'. So I removed the New and get the message 'datacontrolfield is a type in 'WebControls' and cannot be used as an expression.
I am at a complete loss and really need some help. I am using ASP.Net 2.0 and VB.Net 2005 - Anybody have any ideas? TIA,
Coleen
"Even the smallest foot leaves an impression"
|
|
|
|
|
It said it suppose to be a DataControlField. DataControlField is the abstract class of TemplateField, BoundField, hyperlinkfield and etc..
<br />
BoundField bf = new BoundField();<br />
bf.DataField = "DateOfBirth"; <br />
GridView1.Columns.Add (bf);<br />
|
|
|
|
|
Thank you, thank you, thank you!
Coleen
"Even the smallest foot leaves an impression"
|
|
|
|
|
Hi Friends,
I am trying to Convert DataGrid into Excel,
My Code -------------------------------
Private Sub btnExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExport.Click
'export to excel
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/octet-stream"
Response.AddHeader("content-disposition", "attachment;filename=FileName.xls")
'Response.ContentType = "application/vnd.ms-excel"
Response.Charset = ""
Me.EnableViewState = False
Dim oStringWriter As New System.IO.StringWriter
Dim oHtmlTextWriter As New System.Web.UI.HtmlTextWriter(oStringWriter)
grd1.AllowPaging = False
Me.ClearControls(grd1)
grd1.RenderControl(oHtmlTextWriter)Response.Write(oStringWriter.ToString())Response.End()
End Sub
Private Sub ClearControls(ByVal control As Control)
Dim i As Integer
For i = control.Controls.Count - 1 To 0 Step -1
ClearControls(control.Controls(i))
Next i
If Not TypeOf control Is TableCell Then
If Not (control.GetType().GetProperty("SelectedItem") Is Nothing) Then
Dim literal As New LiteralControl
control.Parent.Controls.Add(literal)
Try
literal.Text = CStr(control.GetType().GetProperty("SelectedItem").GetValue(control, Nothing))
Catch
End Try
control.Parent.Controls.Remove(control)
Else
If Not (control.GetType().GetProperty("Text") Is Nothing) Then
Dim literal As New LiteralControl
control.Parent.Controls.Add(literal)
literal.Text = CStr(control.GetType().GetProperty("Text").GetValue(control, Nothing))
control.Parent.Controls.Remove(control)
End If
End If
End If
Return
End Sub 'ClearControls
I am getting output of Excel. But not in correct format. The Excel sheet contains data of only the First page. It shows the Paging Number down after the first 10 records. And yes i have a column of data in Greek language which is not visible clearly. I am using MS Office 2007. Any help or suggestions would be highly appreciated.
Thanks
Cheers
Menon
|
|
|
|
|
Hello, I am designing a database application which has 2 parts
1-Contact Management : VB 2005 and SQL Server basesd
2-Email Management : VB6 and SQL Server based
I would prefere to write Office COM Addin in VB.net but my Client is still stuck with Outlook 2000. On many occassions I have to call VB.Net functions from VB6 application and vice versa.
Can anybody guide me how to call functions and return values between VB.net and VB6.
Many thanks
Nas
|
|
|
|
|
Surely you can use VB2005 and COM to talk to Outlook 2000 ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for your reply. I really dont know how to obtain 'Interop.Outlook.dll' for Outlook 2000. I will appreciate if you could help me out.
Regards
|
|
|
|
|
hi
i use to below code to make my Tooltip like balloon. but it dose not show any Tooltip:
<br />
Dim Tooltip As New ToolTip<br />
Tooltip.ToolTipTitle = "Title"<br />
Tooltip.IsBalloon = True<br />
Tooltip.ToolTipIcon = ToolTipIcon.Error<br />
Tooltip.Show("Text To View", Me.TextBox1, 5000)<br />
but if i remove "Tooltip.IsBalloon = True" from code, it work very well
plz help me to make balloon Tooltip
|
|
|
|
|
hi all
i am downloading multiple file . Each file is download on seperate thread. how can i determine that all downloading is complete or not.
any help will be greatly appreciated
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
How are you downloading them ? Can't you just check if any thread is still running ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hello sir.
i simply write a class which code is below
Imports system<br />
Imports System.Threading<br />
Imports System.IO<br />
<br />
Public Class DownloadClass<br />
Public DownloadFileWithSourcePath As String<br />
Public DownloadFileWithDestinationPath As String<br />
<br />
Public Event DownloadComplete()<br />
<br />
Sub StartDownload()<br />
If Not File.Exists(DownloadFileWithDestinationPath) Then<br />
Try<br />
My.Computer.Network.DownloadFile(DownloadFileWithSourcePath, DownloadFileWithDestinationPath)<br />
<br />
Catch ex As Exception<br />
<br />
End Try<br />
<br />
End If<br />
' RaiseEvent DownloadComplete()<br />
End Sub<br />
<br />
<br />
End Class
i use above code in following procedure
Protected Sub DownloadFileInfo(ByVal sourcePath As String, ByVal DestinationPath As String)<br />
If Not File.Exists(DestinationPath) Then<br />
Dim DownLoadObject As DownloadClass = New DownloadClass<br />
Dim DownloadThread As New System.Threading.Thread(AddressOf DownLoadObject.StartDownload)<br />
DownLoadObject.DownloadFileWithSourcePath = sourcePath<br />
DownLoadObject.DownloadFileWithDestinationPath = DestinationPath<br />
'DownloadThread.IsBackground = True<br />
DownloadThread.Start()<br />
<br />
'MsgBox(DownloadThread.ManagedThreadId)<br />
End If<br />
End Sub
above procedure is called multiple time during processing.
So now the base of above coding, can i get know that downloading of all thread is complete or not?
if not can you provide me some idea or code or some links which help me
thanks
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
i have a datatable representing items in an order as follows
Items:
itemNum
Origin
Destination
QtyOrdered
AmountPackaged
I have a datagrid that i only want to show only the items that haven't been fully packaged i.e. QtyOrdered isn't the same as AmountPackaged. So i set its datasource to the tables default view and set items.defaultview.rowfilter = "QtyOrdered <> AmountPackaged"
However this doesn't seem to do anything as when AmountPackaged matches QtyOrdered the row never gets filtered out. any idea on why my filter isn't working?
|
|
|
|
|
Hi all. I am trying to save an image which i am creating in code. Everytime i call the Bitmap.Save Function i get an error "A generic problem occurred in GDI+". I have googled this for the past hour and have been unsuccessful. Her is the source code you need to understand what i am doing.
Dim bmp As New Bitmap(80, 80)
Dim g As Graphics = Graphics.FromImage(bmp)
Dim LinesPen As New Pen(Color.Black, 2)
LinesPen.Alignment = Drawing2D.PenAlignment.Center
g.DrawRectangle(LinesPen, 1, 1, 78, 78)
g.DrawLine(LinesPen, 27, 1, 27, 79)
g.DrawLine(LinesPen, 53, 1, 53, 79)
g.DrawLine(LinesPen, 1, 27, 79, 27)
g.DrawLine(LinesPen, 1, 53, 79, 53)
Try
'----------------ERROR HERE------------------
bmp.Save(Me.DestinationLabel.Text, System.Drawing.Imaging.ImageFormat.Png)
'-------^^^^-----ERROR HERE-------^^^^-------
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Please help if you can or if you have also experienced this.
|
|
|
|
|
Hi,
Most, if not all, errors inside GDI+ are reported as "generic problem occurred in GDI+".
If the affected line is an Image.Save chances are your path is incorrect or inaccessible,
your disk is full, or your destination file exists and is locked.
if you load an image from a file, most of the time the file remains locked as long as
the Image is alive. This would prevent you from saving an image to the same path.
It applies to Image.FromFile, and probably also to PictureBox.ImageLocation
The one exception I am aware of is when you use Image.FromStream
An alternative work-around is to work with a copy of the image:
load the image with Image.FromFile,
create a new image from it with new Bitmap(Image),
dispose of the original image.
|
|
|
|