|
Thanks for your reply.
So can you tell me that where can I download your articles on image filters so that I can use it in my project.
And also suggest me how can I create a cartoon from an image or where can I get these things.
Thanks
Gagan
|
|
|
|
|
OK. Well, the articles are here on code project, so search the site for them. The cartoon, to be honest, I don't know off the top of my head, except that I'd expect you'd use smoothing to get a photo to look more like a drawing. Beyond that, I'd look for SIGRAPH papers or other sources with google and expect to find algorithms that I needed to turn in to code.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Ok.
Thanks man for your suggestion and for your help
carry on.
Gagan
|
|
|
|
|
hello !
can u tell me what is Using keyword in VB.net ? what it do ? and if i want to write a keyword like this in C#, which keyword should i use ?
|
|
|
|
|
The Using keyword simply sticks a Dispose call at the end of the code. For example:
Using(sw As New StreamWriter("C:/TestFile.txt"))
sw.WriteLine("Aloha!")
End Using
becomes
Try
Dim sw As New StreamWriter("C:/TestFile.txt")
sw.WriteLine("Aloha!")
Finally
sw.Dispose()
End Try
The keyword in C# is using ; it's case sensitive, unlike VB.Net
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
It does more for you than just call Dispose in the manner in which you describe.
It also wraps it in a Try /Finally block too so that Dispose is always called even in the event that an exception is raised. This is where its real usefulness lies. It is much easier to write the Using block that it would two write all the corresponsing Try /Finally stuff to do the same thing.
|
|
|
|
|
Ah, I didn't know that. Thanks for the update; I've updated my example code to take that into account
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
|
eg_Anubhava wrote: I THINK IT'S HALPFUL FOR U.
I NOT DEAF! PLEASE STOP SHOUTING! It is very rude to use all caps.
|
|
|
|
|
Hi,
since Vista it is quite easy to get an thumbnail of a window but under xp it is horrible.
If you want to get one, you have to make a screenshot, cut the image and ...and... but if one window overlap another window you have one and a half window thumbnail (more or less).(of course, you could make a thumbnail of the foreground window, too, but i don't want to "switch" through all the windows)
Is there a better method?
(For example: Visualtooltip, viglance(not released yet) or windowfx are able to make thumbnails
But i don't know how...)
Thank you!
|
|
|
|
|
Of course. There's some code in this thread which may help. It returns a Bitmap given a window handle. To get a window handle (hWnd) you simply have to use the result from FindWindow, FindWindowEx or another API like that. It's C# code, but shouldn't be too hard to translate - I think that there are tools on the internet which might do some of the job for you
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Thank you for your answer
|
|
|
|
|
Hi,
I Need code in vb.net for get HDD, CPU, Mother Board, Serial No For My Programe.
How Can I Do
Thanks & Regards
Form :-
Vikash Yadav
|
|
|
|
|
Do a Google (or Bing, or whatever) search for windows management information hdd serial or wmi hdd serial. It is quite complex, but there are loads of articles around describing how to use it, such as Retrieving hardware information with WMI[^].
Good Luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
There is no Code
How i can get serial no of HDD, CPU, Motherboard
Thanks & Regards
Form :-
Vikash Yadav
|
|
|
|
|
The person who replied to you, assumed you were a programmer and not just another guy who is looking to charge for a ton of code he copied and pasted, and does not remotely understand. Stupid of him, really....
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
You put it so much better than I could have!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
*grin*
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Can we create a 3D project in VB.Net?
If we can, please express me any project or some codes...
thank you
|
|
|
|
|
phowarso wrote: Can we create a 3D project in VB.Net?
If you mean what I think you mean, then yes.
phowarso wrote: If we can, please express me any project or some codes...
Please express me $10,000
Is Bing broken where you are?
thank you
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Direct X
If everything was not true, would it be not true that everything is not true?
<font color="red">"Assembly.<br /> Ah, yes that dreaded thing that pulled itself out of the abyss. <br />-- Wait, assembly is not that bad. It just takes time to adjust to."</font>
|
|
|
|
|
hi all,
i want to list out all the instance of SQL server. i use following code for this purpose
Dim instance As System.Data.Sql.SqlDataSourceEnumerator = System.Data.Sql.SqlDataSourceEnumerator.Instance()<br />
Dim table1 As System.Data.DataTable = instance.GetDataSources()<br />
For Each row As DataRow In table1.Rows<br />
<br />
If cboServer.Items.Contains(row.Item(0).ToString) Then<br />
Else<br />
cboServer.Items.Add(row.Item(0).ToString)<br />
End If<br />
Next
but some time above code does not enumerate all the instance of sql server on local network.
so i want to ask whether there are any method which enumerate all the instance of sql server which is located on my local network
|
|
|
|
|
I use SmoApplication.EnumAvailableSqlServers()[^], which seems to work reliably for me.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hello,
I have to read an Excel file, update some data and save the file. I wrote small code to open, read, save and close an excel file. I am using Microsoft.Office.Interop to achieve the goal. I have set the Excel application visibility as false. I tried the same in C# and VB.NET, but am facing same problem. Code is below:-
Private Sub OpenFile()
Try
excelApp = New Excel.ApplicationClass()
excelApp.Visible = False
excelworkbook = excelApp.Workbooks.Open(workbookPath, 0, False, 5, "", "", False, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "", True, False, 0, False, False, False)
excelSheets = excelworkbook.Worksheets
excelWorkSheet = excelworkbook.Worksheets("Sheet1")
MessageBox.Show("Connected and Opened")
range = excelWorkSheet.UsedRange
MsgBox("Rows = " + range.Rows.Count.ToString + " Cols = " + range.Columns.Count.ToString)
Catch e As Exception
excelSheets = Nothing
excelworkbook = Nothing
excelWorkSheet = Nothing
excelApp = Nothing
MessageBox.Show("Exception MSG " + e.Message + "\n ST :" + e.StackTrace)
End Try
End Sub
Private Function ReadRow(ByVal rowNo As Integer, ByVal startRange As String, ByVal endRange As String) As Array
Dim rge As Excel.Range = Nothing
Dim valuesList As Array = Nothing
Try
rge = excelWorkSheet.Range(startRange, endRange)
valuesList = rge.Cells.Value
Catch e As Exception
MsgBox("Uable To Read from " + startRange + " To " + endRange + " Due to " + vbCrLf + e.StackTrace)
Save_Close()
End Try
Return valuesList
End Function
Private Sub Save_Close()
Try
excelworkbook.Save()
excelworkbook.Close()
Catch ee As Exception
MessageBox.Show("Unable To Save : " + ee.Message)
excelworkbook.Close()
End Try
releaseObject(excelApp)
releaseObject(excelworkbook)
releaseObject(excelWorkSheet)
releaseObject(excelSheets)
MessageBox.Show("File Closed")
End Sub
Private Sub releaseObject(ByVal obj As Object)
Try
System.Runtime.InteropServices.Marshal.ReleaseComObject(obj)
obj = Nothing
Catch ex As Exception
obj = Nothing
Finally
GC.Collect()
End Try
End Sub
Methods I have called is :
OpenFile()
ReadRow(1, A1, AL)
Save_Close
The problem I am facing is:
For REad Row: I get Exception
Unable to Read from A1 to AL Due to
Exception from HRESULT : 0X800A03EC
st: AT ....WorkSheet.getRange(Object Cell1, Object Cell2) at ....Line no
I tried the same code with ReadRow parameters as 1, A1, I6) and I got an array successfully. I want to read contents of a row of the provided range.
On calling excelworkbook.Save() in Save_Close(), I get exception as follows and the system halts/hangs on close line. I have to Stop Debugging.
Unable to save: Old format or invalid type library. (Exception from HRESULT: 0x80028018 (TYPE_E_INVDATAREAD))
After once executing, the next time I run the application, I get on start, "File is being used by , want to open as read-only?" with Yes/No options.
Can anybody help me know where am I going wrong. The file is .xls file with fixed 1st 3 cols and has several cols till CL or even more. My OS is Vista. I have added reference of Microsoft.Office.Interop.Excel version 12. I tried with 11 also, but faced same error. I want to edit the file also, so it should be opened with ability to update and not just Read-Only.
Any help is appreciated. Please try to help at the earliest. I am in big trouble.
Thanks
Terry
|
|
|
|
|
I have a DateTimePicker where the user picks a date and this date is then written to a sql database. I store this date in variable before using it in the update sql string. The problem is that it interprets a date like 3 Jul 2009, as 7 Mar 2009. My regional settings is set as English (South Africa), short date is dd/mm/yyyy.
Can I change the DateTimePicker to use the date format that I want?
I even tried changing the DateTimePicker format to 03 Jul 2009 but when I step through the code I see the value as #7/3/2009 3:02:39 PM#.
I am using VB.net express on a XP machine.
Any help is much appreciated.
|
|
|
|