|
Stored procedure doesnt work on the ms access database then how can i do this work !
suis
|
|
|
|
|
Does Access offer XML support at all ? If not, I recommend you use MSDE in future, it's more of a 'real' database.
In that case, you need to select all your data, and iterate through the rows and columns, using an XmlWriter to build the XML document as you go.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
The quick and easy way: Read your data from access into a dataset. Then you should be able to save your dataset as xml.
The not so easy way: Use XmlWriter or XmlDocument. I prefer using XmlDocument, because I can have full control of every element in case you need to make modifications to the data you read.
|
|
|
|
|
If anybody know how to do this .
I have set of images in the folder and i just need show those images
to a perticular form like thumbnail images wise using vb.net.
how can i do this ?
if anybody know help me to solve this problem.
suis
|
|
|
|
|
You can put the images in a picture box, which you can dynamically generate, and get it to show the image stretched ( then it will size it to the thumbnail ). I don't think VB.NET is anywhere near powerful enough for you to read only part of an image to create a thumbnail, nor is that really viable anyhow for jpgs, or other compressed formats. If you get into memory issues ( and you well may ), then you should create smaller images out of the big ones, and use those.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Can u give me some sample code for this ?
suis
|
|
|
|
|
Bitmap bm = Bitmap.FromFile(mypath)
Bitmap thumb = new Bitmap(20, 20, PixelFormat.24bit)
Graphics gr = Graphics.FromBitmap(thumb)
gr.DrawImage(bm, 0, 0, 20, 20)
gr.Dispose()
bm.Dispose()
This is pseudocode, don't copy and paste. I load a bitmap, create a smaller one to hold my thumbnail, create a graphics object that draws to that bitmap, and draw the image scaled onto the graphics object. Then I dispose of the graphics object and the bitmap ( if you were using C#, I'd recommend the 'using' statement, but VB.NET does not offer it ).
This does not take into account issues of aspect ratio, nor does it set a stretch drawing mode to increase quality ( a thumbnail will never be high quality, however ).
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello coders,
I am trying to seperate one line of vb code into lines by vbcrlf (carriage return - linefeed) or the colon : characther
As you know
Dim i: i=3
statements are exactly the same as
Dim i
i=3
I have the following code to be seperated.
Dim input As String = "Function X(i As String):Dim q As integer=" & vbCrLf & "Dim P as byte"
Normally , If I use the
Dim pattern As String = "[\n|.*:*.]"
pattern
it will be seperated into three lines (as I wanted)
But If I use the following line , it will be into 4 lines (I do not want it to be happened)
Dim input As String = "Function X(i As String):Dim q As integer=""q:p""" & vbCrLf & "Dim P as byte"
I need to modify the pattern, which will not accept colons inside quotes.
How can I do that?
Thank you for you time
Emre YAZICI
Best Regards
Emre YAZICI
|
|
|
|
|
Use a group like this: ("".*:.*"") to match a colon within quotes. Then fit that in so it will find those anywhere, and ignore them.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am writing a console application that compares file versions. I can retrieve the file version but i need to compare if file version is less that what i specify that it should be.
It's a simple security patch checker. Here is my file version: "6.00.2800.1622".
Here is the code:
Dim filever as string = "6.00.2800.1622" 'this is example, i get the file version from FileInfo
Dim myfilever as Integer = Ctype(filever, Integer) <-- this line throws an exception
I also tried Integer.Parse method, still same error. I am able to do this in Windows Forms application. Why is console application different, and how can i accomplish this? Any help on this would be appreciated.
Enes M
|
|
|
|
|
|
The problem is that those points in the string make it an invalid number. If the output of the string as a number should just be something like 60028001622 (without the points) you should first remove the points:
filever = filever.Replace(".", "")
Another problem could be the size of the resulting number. Try to use long (or even decimals) to be able to work with larger numbers.
But the better (although a bit more complicated) way would be (like Colin already stated) to split your version into several numbers and test every number separately.
|
|
|
|
|
Thanks Colin and Robert.
After doing some testing, the best way to compare the version is what Colin suggested (split the version into several numbers and compare each one, and set the flag if file version is less).
Although at first I thought that Decimal data type would be appropriate for file version format(6.00.00.2825), but Decimal only accepts one point(.) and 28 places to the right of the decimal.
So my only or best option is splitting the number and comparing each one.
Thanks guys for the help!!
Enes M
|
|
|
|
|
Hi i using this Sample for VB.Net
http://www.freevbcode.com/AuthorInfo.asp?AuthorID=6163
I need update for Close Connections.
API is : SetTcpEntry
Declare Function SetTcpEntry Lib "IPhlpAPI" (ByRef pTcpRow As MIB_TCPROW) As Integer
Inside Command1_Click and area With TcpTableRow, inserting this code for test :
If CStr(GetTcpPortNumber(.dwRemotePort)) = "1452" Then
MsgBox("Found")
.dwState = 12
SetTcpEntry(TcpTableRow) --> BreakPoint
End If
1452 is remote port the my Laptop connected to Game Server in my PC.
I looking using Netstat -n
This Stop in BreakPoint but not Close Connection.
ny idea or Sample Code working ?
|
|
|
|
|
i m using an ASP.NET Web Appication n want to open Text files, PDFs and images on the VB.NET interface... so wat are the components which i need to open these files...
so far.. the images are being opened in Internet Explorer only.. which i dont want.. i want a specific component for both images and text/PDFs
need help how to do this ...
|
|
|
|
|
The System.IO namespace contains all you need to read/write text files. The Bitmap class in System.Drawing will open a bitmap from disc, and allow you to access it's information if you need it. There is no PDF support in .NET, that's why people advertise on this site selling PDF components to plug into .NET. However, a PDF is just text, so if you don't want to display it, you can read it the same as a text file. If it's not compressed ( which is rare ), you can even make changes, so long as the text you add is the same length as the text you remove.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hai ,
VB.NET
--------
Does anybody know how to do this,
i need to knw how to get a RGB values from a perticular image and put it to an three dimentional array using vb.Net
R G B R G B
62 12 85 125 190 104
25 2 135 205 120 95
42 25 145 180 166 75
95 32 193 175 145 115
this is the example of after cutting the image RGB values the array shoud like,
thank u,
suis
|
|
|
|
|
Here is one way to do it.
' Create a bitmap object from an image
Dim myBitmap As Bitmap = New Bitmap("Sunflowr.jpg")
' Get the Height and Width in pixels
Dim BitmapSize As Size = myBitmap.Size
' Holds the color of the pixel retieved from image
Dim PixelColor As Color
' 3-d Array to hold RGB values of color
Dim Rgb(BitmapSize.Width - 1, BitmapSize.Height - 1, 2) As Byte
For x As Integer = 0 To BitmapSize.Width - 1
For y As Integer = 0 To BitmapSize.Height - 1
PixelColor = myBitmap.GetPixel(x, y)
Rgb(x, y, 0) = PixelColor.R
Rgb(x, y, 1) = PixelColor.G
Rgb(x, y, 2) = PixelColor.B
Next
Next
|
|
|
|
|
Ok this is greate thnak u very much for u r time and help
thanks again.
i really appriate this.
suis
|
|
|
|
|
Please help me
i need to Take a set of images from a specified directory, and create a file containing colour histograms
computed from each of these images. The input images may be in any standard data format (such as
TIFF, GIF or JPEG).
how should i do this using vb.net
suis
|
|
|
|
|
Hi,
1. Open image: Dim b As Bitmap = new Bitmap("MyFile.bmp")
2. Get the color of one pixel: Dim c as Color = b.GetPixel(x, y)
3. Get the red/green/blue value from the color: Dim val As Integer = c.R/G/B
4. Count the needed values in some kind of loop
5. Write your results to a file (this can be done in various ways and depends on how your result output should look like)
|
|
|
|
|
Ok this is working nicely thnak u for u r help
suis
|
|
|
|
|
Read my C# image processing articles - if you can access the bitmap data in any way ( I'm not sure that you can, C# offers stuff VB.NET doesn't here ), then you should use those methods if you care at all about speed. Otherwise, do what he said
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I am dealing with my own application (VB6 build) which uses specific visio files. from my application, i need to call a macro, which is runn from visio by double clicking a specific shape (with known ID & Name).
The problem is how to run this macro from my application, which is (the macro) is disabled in the visio.
|
|
|
|
|
Dear Friends,
I have Standard Package in VB6. When I am installing it on any computer I am getting error as below
1)msvcrt.dll can not used or can not registered
2)msado20.dll can not used or can not registered
please help me to solve these errors. Really I felt Nervous when i am installing my package at customer site.
Your help will be highly appriciated.
Thanks
Patel Murtuza
|
|
|
|