|
Try this:
Dim Pic As Bitmap<br />
Dim SS As Graphics<br />
<br />
Pic = New Bitmap(me.width, me.height, Imaging.PixelFormat.Format32bppArgb)<br />
SS = Graphics.FromImage(Pic)<br />
SS.CopyFromScreen(me.location.x, me.location.Y, 0, 0, me.size, CopyPixelOperation.SourceCopy)<br />
<br />
pic.save("C:\test.jpg", ImageFormat.Jpeg)
|
|
|
|
|
its giving a few probs:
a) If the form is in the background then the screen shot contains an image on the contents of the screen rather then the form. I want to take a shot of the form while having it in the background.
b) Sometimes it just gives a plain white image. Any idea why that would be?
Thanks.
|
|
|
|
|
i am creting exe (package) in vb.net that has crystal reports. do i need to install Crystal Reports in client machine to execute it.??
|
|
|
|
|
You will need to distribute the Crystal Report Merge Modules with your app. You can get them from the BusinessObjects.com website
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
thax
i did it adding prerequisites..... and works...
|
|
|
|
|
hi
is it necessary to install crystal report in the client machine to execute the crystal report
through vb.net exe/package....???
Thanx
Jayesh Talsaniya
|
|
|
|
|
Hi,
runtimes files on the target machine are required, you could distribute the required files by building a setup project (File > Add Project > Setup ...)
Right mouse on the Setup Project in the Solution explorer window > Add > Merge Module... > select Microsoft_VC80_DebugCRT_x86.msm
for more details plz go to http://msdn2.microsoft.com/en-us/library/ms225293(VS.80).aspx[^]
Good Luck ,
NajiCo
It's nice 2b important, but it's more important 2b nice...
|
|
|
|
|
thank you for taking interest in my problem.
if i add Microsoft_VC80_DebugCRT_x86.msm in the package then do i need to install runtime in the client machine..
thanx agian.
|
|
|
|
|
Nope, this Merge Module contains all that is required
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
Thank You.
|
|
|
|
|
|
can i know how to save the time a card is scanned using vb.net.
example: a employee scan their id card and the system need to save time the card was scanned and save it in the database.
can it be done?
|
|
|
|
|
Depends, obviously the card reader can detect when a card is scanned. In this case you should be able to have a feild in your database that is set as a datetime and then simply update it with datetime.now when the card is scanned. You can find out how to do that in google.
|
|
|
|
|
|
Hi Friend..
I have one datagrid and in that i have taken one Template Column containing label control. I want to blink the text clot of that label. Can u help me out to do this task?
Gurudatta B. Shelke
|
|
|
|
|
Add a timer to your form and on Tick event add this code
LableName.Visible = Not LableName.Visible
Hope this helps.
Regards.
|
|
|
|
|
I'm currently working on a VB.NET project that requires several different types of items to be dragged on to a listview control (to put it very simply).
E.g. currently I have it running so I can drag a file from windows explorer on to the listview and a new listviewitem is created with the file name as the item text.
The problem I'm now encountering, is that I need to be able to drag treeview nodes from an existing old Visual Basic application (which has several treeviews), on to the listview in the new application. I have the source of the Visual Basic app so that can be modified if need be.
At the moment it's set up (not by me) so that items can be dragged between the various treeviews within the Visual Basic app, but I can't get it to recognise dragging *out* of that application on to the new one.
Any help would be greatly appreciated, let me know if you need more info...
|
|
|
|
|
The treeview may need to have the drag and drop enabled. From there you have to capture the events that fire when drag and drop occurs.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Why does the Child form always appear behind the other controls on the form?
|
|
|
|
|
Because the MDI CHild formis being rendered inside another control on the Parent form, called the MdiClient. Putting controls on the surface of an MDI Parent will always have them show up on top of this MdiClient control.
|
|
|
|
|
Hi,
I've been trying to work out how to iterate through a collection object using reflection.
I have a class with a few simple objects, strings, single[] arrays, and one collection.
However, when I'm using the GetFields() method to retrieve the objects in my class, when it gets to the collection I am unable to view all the items in the collection.
dim coll as collection = FieldInfoObj.getvalue(obj)
console.writeline("Collection has " & coll.count & " items in the collection")
for each item as object in coll
do_stuff(item)
next
Although it correctly states that I have 4 items in the collection, item 1 is Ok. item 2 is 'nothing' and item 3 causes an error. But I do actually have 4 'singles' in the collection.
How do i access the collection objects using reflection?
I *think* I need to reflect into each object seperately, and not just iterate through them after setting the main collection object using the getvalue(obj) method as I would with the other system.xxx type objects (which work fine)
Could anyone provide a simple example of how to iterate through a collection using reflection?
Thanks in advance,
Phil.
|
|
|
|
|
Hi,
I am calling a web services in VB.NET. The code is almost done but I am getting an error at shipping section that I don't know how to fix. I think it is very simple but I don't know how to figure it out.
Error is “Too many arguments to ‘Public Sub New()’ at value 1” at this line “Shipment.ShipmentItems = New ShipmentItem(1)”. I am not still sure that this is the right way of calling shipment class because shipment is a sub-class of salesorder.
----------------------------------------------------------------
Dim aToken As UsernameToken = New UsernameToken("test@abc.com", "test123", PasswordOption.SendPlainText)
mSalesOrderWse = New SalesOrderService
mSalesOrderWse.RequestSoapContext.Security.Timestamp.TtlInSeconds = 30
mSalesOrderWse.RequestSoapContext.Security.Tokens.Add(aToken)
Dim OrderRequest As New CheckComplianceOfSalesOrderRequest
OrderRequest.AddressOption = New SalesOrder.AddressOption
OrderRequest.AddressOption.IgnoreStreetLevelErrors = "True"
OrderRequest.AddressOption.RejectIfAddressSuggested = "True"
OrderRequest.PersistOption = PersistOption.Null
OrderRequest.SalesOrder = New SalesOrder.SalesOrder
OrderRequest.SalesOrder.BillTo = New SalesOrder.Address
OrderRequest.SalesOrder.BillTo.City = ocity
OrderRequest.SalesOrder.BillTo.Company = ocompany
OrderRequest.SalesOrder.BillTo.Country = ocountry
OrderRequest.SalesOrder.BillTo.County = ""
OrderRequest.SalesOrder.BillTo.Email = oemail
OrderRequest.SalesOrder.BillTo.Fax = ""
OrderRequest.SalesOrder.BillTo.FirstName = ofirstname
OrderRequest.SalesOrder.BillTo.LastName = olastname
OrderRequest.SalesOrder.BillTo.Phone = ophone
OrderRequest.SalesOrder.BillTo.State = ostate
OrderRequest.SalesOrder.BillTo.Street1 = oaddress
OrderRequest.SalesOrder.BillTo.Street2 = oaddress2
OrderRequest.SalesOrder.BillTo.Zip1 = opostcode
OrderRequest.SalesOrder.BillTo.Zip2 = ""
OrderRequest.SalesOrder.CustomerKey = custnmbr
OrderRequest.SalesOrder.FulfillmentType = FulfillmentType.Null
OrderRequest.SalesOrder.OrderType = OrderType.Internet
OrderRequest.SalesOrder.PurchaseDate = odate
OrderRequest.SalesOrder.SalesOrderKey = sopnumbe
Dim ShipmentItem2 As New ShipmentItem
ShipmentItem2.BrandKey = "SS_WINE"
ShipmentItem2.ProductKey = "04SSBOTELLA750"
ShipmentItem2.ProductQuantity = 1
ShipmentItem2.ProductUnitPrice = 20
Dim Shipment As New Shipment
Shipment.Freight = oshipcost
Shipment.LicenseRelationship = LicenseRelationship.SupplierToConsumer
Shipment.ShipDate = deliverydate
Shipment.ShipmentKey = "1"
Shipment.ShipmentStatus = ShipmentStatus.PaymentAccepted
Shipment.ShippingService = ShippingService.FXG
Shipment.InsuredAmount = 0
Shipment.GiftNote = ""
Shipment.SpecialInstructions = ocomment
Shipment.ShipTo = New Address
Shipment.ShipTo.Company = oshipcompany
Shipment.ShipTo.FirstName = oshipFName
Shipment.ShipTo.LastName = oshipLName
Shipment.ShipTo.City = oshiptown
Shipment.ShipTo.State = oshipstate
Shipment.ShipTo.Street1 = oshipaddress
Shipment.ShipTo.Street2 = oshipaddress2
Shipment.ShipTo.Country = oshipcountry
Shipment.ShipTo.Zip1 = oshipzip
Shipment.ShipTo.Zip2 = ""
Shipment.ShipTo.Fax = ""
Shipment.ShipTo.Phone = ship_phone
Shipment.ShipTo.Email = oemail
Shipment.ShipTo.County = ""
Shipment.ShipmentItems = New ShipmentItem(1)
Shipment.ShipmentItems(0) = ShipmentItem2
OrderRequest.SalesOrder.Shipments = New Shipment(1)
OrderRequest.SalesOrder.Shipments(0) = Shipment
OrderResponse = mSalesOrderWse.CheckComplianceOfSalesOrder(OrderRequest)
-----------------------------------------------
This secure class code was autometically generated.
_
Public Class SalesOrder
Public BillTo As Address
Public CustomerKey As String
Public FulfillmentType As FulfillmentType
Public OrderType As OrderType
Public PurchaseDate As Date
Public SalesOrderKey As String
Public Shipments() As Shipment
End Class
_
Public Class Address
Public City As String
Public Company As String
Public Country As String
Public County As String
Public DateOfBirth As Date
Public Email As String
Public Fax As String
Public FirstName As String
Public LastName As String
Public Phone As String
Public State As String
Public Street1 As String
Public Street2 As String
Public Zip1 As String
Public Zip2 As String
End Class
_
Public Class Shipment
Public Freight As Double
Public GiftNote As String
Public InsuredAmount As Double
Public LicenseRelationship As LicenseRelationship
Public Packages() As Package
Public ShipDate As Date
Public ShipmentItems() As ShipmentItem
Public ShipmentKey As String
Public ShipmentStatus As ShipmentStatus
Public ShippingService As ShippingService
Public ShipTo As Address
Public SpecialInstructions As String
End Class
_
Public Class ShipmentItem
Public BrandKey As String
Public ProductKey As String
Public ProductQuantity As Integer
Public ProductUnitPrice As Double
End Class
----------------------------------------------
Thanks,
Subrat Parida
Programmer
|
|
|
|
|
Subrat Parida wrote: Error is “Too many arguments to ‘Public Sub New()’ at value 1” at this line “Shipment.ShipmentItems = New ShipmentItem(1)”.
The error is telling you that your call to "New ShipmentItem" shouldn't have (1) on the end of it.
Whether or not you are using it correctly is for you to decide.
D.
-------------------------------------------
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 for looking at this issue.
If I remove (1) from 'New ShipmentItem(1)' and make the line like this
Shipment.ShipmentItems = New ShipmentItem
then this error is coming.
'SendOrdersToSC.SalesOrder.ShipmentItem' cannot be converted to '1-dimensional array of SendOrdersToSC.SalesOrder.ShipmentItem'
What I should do?
|
|
|
|
|
How about creating an array of ShipmentItems?
Dim shipItems() As ShipmentItems
Shipment.ShipmentItems = shipItems
|
|
|
|