|
..you sound surprised? Given Darwin, everything is, by definition.
But to go into MunchiesMode, that doesn't change the facts, now does it?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
From new web-design trends I would name display: grid which is yet more powerful than display: flex as it allows to build 2D fluid layouts. Regarding more uprising js frameworks I would rather advise to ignore them. Keeping up with all of these is futile.
I wonder tho what does this thread in .NET section.
|
|
|
|
|
Hi,
Im using SharePoint 2007 and VB.Net. I need to convert a web page in the Moss 2007 server to word document. I got to know Interop.COM and Interop.CDO DLL's can be used for this purpose. Can someone pls guide me on how to do it or for a sample implementation ?
And if you've got better approaches in doing this pls let me know.
Thanks in advance.
|
|
|
|
|
Print page as PDF.
Open PDF in Word 2016 (or thereabouts).
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
|
And... what is your question?
The quick brown ProgramFOX jumps right over the Lazy<Dog> .
|
|
|
|
|
|
I have written a fully-working app in VB6 and am almost done updating it to vb.net but I am finding it very hard to achieve a couple of tasks. The main one is to simply recolour an image. Currently the image is black stars on a white background (it's a star chart!) but I need to recolour it for users so that it does not ruin their night vision. Thus I need the image to be re-coloured to red stars on a black background. In VB6 this takes literally a couple of lines of code but I don't know how to do it in vb.net - at which I am very much a beginner!
|
|
|
|
|
Perhaps if you show the code you use in VB6 someone could make a suggestion. Also, this question would probably get a quicker response in the VB forum below.
|
|
|
|
|
Hi, and thanks for the advice. This is the VB6 code:
With frmEntryscreen.Picture3
.DrawMode = vbInvert 'or vbXorPen will work
frmEntryscreen.Picture3.Line (0, 0)-(.ScaleWidth, .ScaleHeight), vbWhite, BF
frmEntryscreen.Picture3.DrawMode = vbMaskPen
frmEntryscreen.Picture3.Line (0, 0)-(.ScaleWidth, .ScaleHeight), vbRed, BF
End With
(picture3 is, of course, the chart which is 'black stars on a white BG'). I didn't post this question under 'earlier' VB since that's not what the problem is - didn't want to complicate matters! I also tried the MS site as suggested by someone else but everything there only seemed to apply to recolouring the entire image as a whole, which isn't what I need to do. I envisage the task as being in 2 stages (but as I'm not a buzzing vb.net person don't know if this is what's required) - stage 1: Make a negative image, so white stars on black BG. Stage 2:change all white pixels to red ones.
|
|
|
|
|
There are various suggestions on the Microsoft site:
Recoloring Images | Microsoft Docs[^]
The code samples tend to be in C#, but it should be fairly simple to convert them to VB.NET.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
This have a question I've wondered about for several years.
Why does the .Net Framework compile to IL code, then later JIT to natative?
Why not just compile it directly to native code? Clearly there are advantages to having IL code.
I do understand there is now ".Net Native" which, if I understand it correctly, trans-compile to C++, then compiles to native.
I am just trying the understand the .Net framework better, not judging the design decisions.
|
|
|
|
|
There is no transpile to C++ code. The JITter converts IL code to native directly.
As to why .NET compiles to IL; the core of .NET is a machine agnostic framework so, while historically, the most common implementation was for PCs, there was no absolute requirement that it be constrained to PC. By using IL, you can port that onto a number of different platforms and have it JIT to IL for that platform. This is a common paradigm, favoured by languages such as Java.
This space for rent
|
|
|
|
|
You have both options available. Something you would have to "buy" in the past with some software (e.g. distributing EXE's versus "byte codes")
Compiling Apps with .NET Native | Microsoft Docs
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
I am looking for a version of TraceTool that has been built with a runtime version of 4.7.1. Does this exist?
|
|
|
|
|
Are you talking about this tool[^]? If so, you should ask on the forum at the end of the article.
This space for rent
|
|
|
|
|
Yes - in Visual Studio it says it has a runtime version of 4.0.30319.
|
|
|
|
|
Let's work this through logically. You're looking for a version of a tool that's available on this site so you could have asked on the forum for that article, instead you left it for others to search to find out what tool it was. Having found the right tool, I had a quick look at the revision history; given that the last update was May 2017 and 4.7.1 was the release for the W10 Fall Creators Update, and the SDK has a date in October 2017, I would have to say that it isn't a 4.7.1 update.
This space for rent
|
|
|
|
|
Hi Masters,
I have a payment form, in this form, I have a datagridview which listed all the invoices of a certain customer. when I press okay to pay, all of the listed invoices should be updated with close. Here is the code i used and its not working.
Private Sub updateinvoicepaymentstat()
conn.ConnectionString = "Server = '" & Servername & "'; " _
& "Database = '" & DBName & "'; " _
& "user id = '" & sqlUName & "'; " _
& "password = '" & sqlPwd & "'"
conn.Open()
For x As Integer = 0 To dgvinvoicedetails.Rows.Count - 1
Dim sqlcommand As String = "UPDATE purchaseinvoice SET partialpay=@bal where docentry ='" & dgvinvoicedetails.Rows(x).Cells(0).Value & "'"
Dim command As New SqlCommand(sqlcommand, conn)
command.Parameters.AddWithValue("@bal", txtoutbal.Text)
command.ExecuteNonQuery()
command.Parameters.Clear()
Next x
conn.Close()
clear()
End Sub
Your help is much appreciated..
Thanks
Fbanz12
|
|
|
|
|
You are not checking the return value from ExecuteNonQuery to see whether the call succeeded, so you have no idea what is happening in your code. Add proper error checking, and log, or display information if the call fails. You can also use the debugger to check the actual values of any variables used by the UPDATE statement.
|
|
|
|
|
Hi Richard,
Thank you for the quick response. Do you have a sample where the result returns what I require to have. I am confused
Thanks a lot
Fbanz12
|
|
|
|
|
Sample code will not help you debug the problem, which is what you need to do first. Either follow my suggestion about logging, or use your debugger to step through and examine all variables.
|
|
|
|
|
On top of what Richard said, you're using a SqlParameter object for one parameter but not the other? Why? ALWAYS use parameter objects for every parameter! NEVER use string concatenation to build an SQL query.
System.ItDidntWorkException: Something didn't work as expected.
-- said no compiler, ever.
C# - How to debug code[ ^].
Seriously, go read this article.
Dave Kreskowiak
|
|
|
|
|
(I am sorry if this is an old question - the search mechanism doesn't work today: If I click a hit list entry, it doesn't show that message, but goes to the top of the forum; I don't get to read the question/answer.)
I started out in Win7 using constants for identifying extended file system attributes (such as "Link target"). Then came Win8, and I learned the truth of "Constants ain't; variables won't": I had to check the OS version and select the attribute number from one of several tables. Win10 came with yet another set of "constants" to select the attributes - yet another table.
Then came a Win10 update that changed the constants again - but still the OS identifies itself as Win10. Rather than adding another table for (potentially) each OS update (they were compiled into the code, so a new revision meant I had to distribute a new version of my code), I changed the strategy to dynamically build a table of attribute names, their index in the array being the attribute number. (You get the attribute name by calling GetDetailsOf with 0 as the first argument.) This has worked for some time.
Then comes this guy from our development group in Poland, complaining that my code doesn't work. After an extensive search, it turns out that it fails when he is running the code on a machine with a Polish Windows version: GetDetailsOf(0, AttrNo) returns the Polish attribute name. When my code looks for, say, "Link target" in the table, it won't find it.
I could make those guys provide a list of the Polish names, so that I search for either "Link target" or whatever Link target is in Poland. I will have to compile a new version, then the Polish guys will be happy. Maybe our Finish office will come three months later and tell that they have switched to Finish Windows versions (currently they use an English/US version), and I have to make a new version looking for either the English, the Polish or the Finish attribute name.
Is there no way to identify a given extended attribute in a general way, independent of language version, independent of OS version? A way that works in Polish Windows even of I don't know the Polish attribute names, in Finish Windows even if I don't know the Finish names, or in any other languge where I don't know the terms?
I am NOT going to translate the entire UI to umpteen languages - I am making programmer's tools, and a programmer can use an English language UI. What I need is to get the information from the file system in a language independent way!
|
|
|
|
|
If you ask for the name of an item then you will get it in the local language. You could try setting the default culture to English in order to get the name you expect. But a better idea is not to try and get names and compare them to strings, but to check the type of the item as described at FolderItem object (Windows)[^].
However, I may have misunderstood your question as it is not exactly clear what you are trying to achieve.
|
|
|
|