|
I have started to programming in Visual Studio.NET 2003 and specifically in Visual Basic of this Studio.
I have a problem with the data I want to export from a picture box.
I set a background image in a picture box and after writing some code I manage to overlay another image in the background image(in the same picture box).
Finally, I manage to show in the picture box the two different images (one above the other) and I want to save (export) the final image as a new “.bitmap” image.
Can anyone help me?
Thanks in advance
|
|
|
|
|
The background is a Image - object, and in this class you've got the Save method (just use <code[yourimage].image.save("c:\test.bmp")> to save it as a Bitmap)
|
|
|
|
|
Thank you very much. I will try it!
|
|
|
|
|
First of all, please don't spam the whole site.
The Bitmap class has a Save method. However, if the PictureBox has a background image and you're just setting another image above it, the image above it is all you will save.
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 a lot! So, I'll try the Save method.
|
|
|
|
|
Is there anybody out there who could help me please.
I am trying to make use of the Transactionscope to implicitly create a transaction. This transaction should roll back when a condition is not met. It doesn't seem to work for me even though i have started the msdtc service. My function inserts a row in an oracle database using the DI.CreateTemplate. Now i want it to roll back the insert when the Attach_ID_To_Invoice_Batch process is not sucessful.
Dim DI As New DataLayer.Invoice
Dim intRetVal As Integer = -1
Dim options As New Transactions.TransactionOptions
options.IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted
Try
Using scope As Transactions.TransactionScope = New Transactions.TransactionScope(Transactions.TransactionScopeOption.Required, options)
'If Not IsDoumentAllocated(EntryID) Then
intRetVal = DI.CreateTemplate(oTemplate, strTemplateName, enumTemplateType, UserID, -1, -1, "")
If intRetVal <>0 Then
If Attach_ID_To_Invoice_Batch(intRetVal, EntryID) Then
scope.Complete()
Else
intRetVal = -2
End If
Else
intRetVal = -1
End If
'End If
End Using
Catch ex As Exception
Return intRetVal
End Try
Could somebody please go through this code and let me know what i am missing.
|
|
|
|
|
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
after that is converted, i need to add up the rooms like,
if people stay in the King Suite for 7 nights it will cost... $300 or something. and i don't no what source i need to write.
can someone help me with making these proceddures?
thanks alot ...seroiusly
/J-Man\
|
|
|
|
|
You need to store the prices for each item, probably in the value property of the combo box item. Then you need to multiply that by the number of nights.
AmericanDollars = Pesos * 0.1
Assuming that Pesos contains the price in Pesos and AmericanDollars is a variable to hold the US$ price, then the only possible problem here is that the conversion may not be 100% accurate. The code is fine.
I'd do the conversion at the end, after you work out the total price.
TotalPrice = RoomCost * NumberOfNights
That's really it, you just need to fill the blanks.
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 )
|
|
|
|
|
ok well i have this in the cod,e i can't seem to fine what is missing?:
Dim Numberofnights As Decimal
Dim introomtype As Integer
Dim roomcost As Decimal
Dim totalprice As Decimal
Dim americandollars As Decimal
americandollars = Pesos * 0.1
TotalPrice = RoomCost * NumberOfNights
' it needs to print the total(s) here:
Me.lblFinalTotal.Visible = True
Me.lblTaxesForStay.Visible = True
Me.lblSubtotalBillingAmount.Visible = True
Me.lblPOPtotal.Visible = True
Me.lbltaxesPOP.Visible = True
Me.lblBillingPOP.Visible = True
/J-Man\
|
|
|
|
|
hi
pls
can u tell me?
i want to enter data to two dimensional array(string)
but it appear err.
this err is " Object reference not set to an instance of an object"
code is
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Private Structure CUSTOM_EXPORT
Dim Name_Renamed As String
Dim ViewName As String
Dim List() As String
Dim filter_Renamed() As String
Dim ColHeadName() As String
Dim ColWidth() As Object
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dim udtCustom() As CUSTOM_EXPORT
Dim strCol As Object
Dim i As Short
Dim j As Short
i = 0
Do While r.AtEndOfStream <> True
ReadStr = r.ReadLine
If VB.Left(ReadStr, 8)<>"[Export]"And Len(ReadStr)>0 Then
i = i + 1
End If
Loop
For j = 0 To UBound(strCol)
udtCustom(i).List(j) = strCol(j)
udtCustom(i).ColHeadName(j) = varColHeadName(j)
udtCustom(i).ColWidth(j) = varColWidth(j)
Next
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Err is appeared this line " udtCustom(i).List(j) = strCol(j)"
strcol(j) is "Area Code"
it cannot assign this value
appear err.
thz for all
|
|
|
|
|
This is VB6 ? I'd say that List() needs to be allocated to be an array, it's probably null.
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 )
|
|
|
|
|
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"
|
|
|
|