|
you're welcome.
|
|
|
|
|
ikantspelwurdz wrote: While progress < 1
System.Threading.Thread.Sleep(20)
drawlazor(progress)
End While
It seems you don't get how threads work. Your thread will post an event when it's finished. This is where your program should hide the UI and continue. Until then, any progress bar should be updated in the progress changed event, and this sort of code just plain should not exist in your project.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi all...
I want to create a program using VS2005 (VB) that read an image file(.jpg,.bmp extension) and edit it into a text editor.
Text written in image can be edited using text editor and modified document can be again save to a image file.
Give me suggestions that how can I do it.
Thanks.
Gagan
|
|
|
|
|
This might be able to help: http://www.codeproject.com/KB/recipes/Image-Steganography.aspx[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
How do you want to edit it in a text editor ? Do you mean read the text off the image ? You need an OCR library for that.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I have the name of a range stored in a string, I wish to change the contents of a specific cell. I have the row number saved in a variable, usually I would do this by typing
[ColumnName].Cells(index) = value
If I have ColumnName stored in a variable, how could I change a cell based off an index?
(Note: I tried [ & ColumnName & ].Cells(index)...)
|
|
|
|
|
I'm not Excel VBA expert, but I think you're looking for the Range object. Maybe something like:
Range("B2").Cells(1).Value = something
|
|
|
|
|
Yeah that solved it alright, just had to do Range(ColumnNameVariableNoQuotes).Cells(Index).Value = Something
thanks Dave
|
|
|
|
|
I have 6 checkbox in my form. I have to export the name of checkbox into database in a single field. It depands on the user how many checkbox he selects.
|
|
|
|
|
You can store the values as a comma separated list, but it's not a good solution to store the information in a single field, if you want to be able to select records depending on what the users selected.
A good solution would be to store the values in a separate table so that you can store each checkbox value in a separate record.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Store seperate value in separte column is very easy. but I have to store multiple value in single colume.
|
|
|
|
|
Hey u can use this method. The Check box return the 1 or 0 means (True /False). U can store the value. ex (101101). And u can use the sting format function u can separate the data. I think it will useful u...
|
|
|
|
|
Hi All,
i wrote a function that rounds any image but the problem is that corners are not AntiAliasing...i know we can use SmoothingMode with Graphics object but the code i use contains GraphicsPath object..
the function is
Public Function RoundImage(ByVal img As Image, ByVal UpperLeftAngle As Integer, _
ByVal UpperRightAngle As Integer, ByVal LowerRightAngle As Integer, _
ByVal LowerLeftAngle As Integer) As Bitmap
Dim bmp As New Bitmap(img.Width, img.Height)
Dim g As Graphics = Graphics.FromImage(bmp)
Dim z As New GraphicsPath
' Upper left arc
z.AddArc(0, 0, UpperLeftAngle, UpperLeftAngle, 180, 90)
' Upper right arc
z.AddArc(bmp.Width - UpperRightAngle, 0, UpperRightAngle, UpperRightAngle, -90, 90)
' Lower right arc
z.AddArc(bmp.Width - LowerRightAngle, bmp.Height - LowerRightAngle, LowerRightAngle, LowerRightAngle, 0, 90)
' Lower left arc
z.AddArc(0, bmp.Height - LowerLeftAngle, LowerLeftAngle, LowerLeftAngle, 90, 90)
z.CloseFigure()
g.SetClip(z)
g.DrawImage(img, 0, 0, img.Width, img.Height)
' Returns the newly constructed bitmap
Return bmp
End Function
|
|
|
|
|
Hi,
onlyehtisham wrote: i wrote a function that rounds any image
I don't think so. The code shown creates a rounded rectangle, then fills it with those parts of an existing image that fit inside, without modifying the image, or projecting it in any way.
If you want to keep all the information from the image and somehow compress it near the corners, it will take more work. But then I am not convinced anyone would like the results; I have the impression what you really want it is something different. Do you have an example image (before and after) of the effect you want?
|
|
|
|
|
thank you Luc Pattyn...
let me try to explain again...
actually there are five parameters passed to the function... an image and 4 angles.. angles measure the degree of corners to round...actually im unable to find a way to attach images using this forum... if u've VB.NET 2005 or VB.NET 2008 u can check it by urself with a very little effort...
open an image in a picture box then add a button and write the following code in button's click event...
picturebox1.image=roundimage(picturebox1.image,20,20,20,20)
and u'll get the result... the image is round at our desired angle but the corners are very rough... i want to smooth these corners...
thank you for your help..
|
|
|
|
|
Hi,
there are two problems:
1. there is a rounding problem, the quarter elipses away from x=0 and y=0 end up one pixel off the intended position
2. the quarter elipses need digitalization; for small radii the quality heavily depends on the exact value of the radius.
Here is some C# code I experimented with, the results are not perfect but much better than with your original code.
BTW: your "angles" were not angles at all, I replaced all of them by a single radius.
private Image roundimage(Image img, int radius) {
Bitmap bmp=new Bitmap(img.Width, img.Height);
Graphics g=Graphics.FromImage(bmp);
GraphicsPath z=new GraphicsPath();
int r=radius;
int d=r+r;
int w=bmp.Width;
int h=bmp.Height;
z.StartFigure();
z.AddArc(0, 0, d, d, 180, 90);
z.AddLine(r, 0, w-r, 0);
z.AddArc(w-d-1, 0, d, d, 270, 90);
z.AddLine(w, r, w, h-r);
z.AddArc(w-d-1, h-d-1, d, d, 0, 90);
z.AddLine(w-r, h, r, h);
z.AddArc(0, h-d-1, d, d, 90, 90);
z.AddLine(0, h-r, 0, r);
z.CloseFigure();
g.SetClip(z);
g.DrawImage(img, 0, 0);
return bmp;
}
|
|
|
|
|
I think you want to paint the image FIRST, then paint your rounded rectange corners over the top of it. But, it's not really clear what you're trying to do.
|
|
|
|
|
I have a VB.NET application and I am using following code to work on an existing Excel file.
Private xlApp As Excel.ApplicationClass
Private xlWbk As Excel.Workbook
xlApp.Visible = False
xlApp.DisplayAlerts = False
xlWbk = xlApp.Workbooks.Open("c:\xlWbk.xls")
While the application is running I don't want the Excel workbook to be visible to the users. As long as I am not opening an external Excel file (outside the application), everything works fine. However, when i am opening an external Excel file say, "a.xls", I can see my xlWbk.xls very much visible in front of me! This is 'dangerous' for the application as if the user closes this file, the application will cease to work!
Is there a way I can hide the Excel file the application is using.. and still work on another external Excel file?
Seems like the external Excel workbook is using the same instance of xlApp that was generated thru the code. So when i close any of the Excel files, the above application throws exceptions.
Is there a workaround for the above?
Thanks.
|
|
|
|
|
scot_in wrote: Is there a way I can hide the Excel file the application is using.. and still work on another external Excel file?
Not as far as I know.
scot_in wrote: Seems like the external Excel workbook is using the same instance of xlApp that was generated thru the code.
Yep. Excel is a single-instance app.
scot_in wrote: Is there a workaround for the above?
Not that I know of.
|
|
|
|
|
Thanks Dave, that still doesn't solve my problem though!
|
|
|
|
|
If you are the person opening the excel file through code, then you could possibly open the excel file. Wait until you can get a WinAPI handle to the application window, and then set visibility/enable settings to how you want (through WinAPI).
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
The problem is that I am not displaying the excel window when the application is running. It's in hidden mode. But when someone else opens an external file, the Excel document my application is using pops up and when it is closed, my application throws an exception.
-Thanks
|
|
|
|
|
hi guys i have two custome list of the same type like (Employee)
i want to compare these two lists and send the added records and updated records to data base to sync.
is there any way to do that ?
thanks in advance .........
hello
|
|
|
|
|
Enumerate the collections (For Each ...), checking each object in one list and finding/comparing it to the object in the other list?? You'll have to do it twice, once for each list, to account for deleted objects.
|
|
|
|
|
HI
I am developing one application in that i have to do the accessing the other computer's web cam from my computer. i am accessing my computer's web cam using vb.net code, but i don't have code for accesing the network computer's web cam. How it is possible ? plz reply me.
|
|
|
|
|