|
Thanks Chritian.
You are right, even for the .net job openings, people ask for C# and not VB.Net.
|
|
|
|
|
I found the answer, i am using Math.Round to round off the numbers n the BMI project.
bravo659
|
|
|
|
|
Hi,
I have wrote a small VB application that opens up an Excel spread sheet. However when I close my VB application the Excel process is still showing as running in Task Manager. Would you have any idea? Here's the simple code sample:
Private Sub Command1_Click()
Dim XL As Excel.Application
Dim WB As Excel.Workbook
Set XL = CreateObject("Excel.Application")
Set WB = XL.Workbooks.Open("C:\temp\Anyold.xls")
WB.Close False
Set WB = Nothing
XL.Quit
Set XL = Nothing
End
End Sub
|
|
|
|
|
If you are using createObject you dont need to declare the type as Excel.Application or Excel.workbook. You dont even need to reference the excel object library. Try the following:
Private Sub Command1_Click()
Dim XL As Object
Dim WB As Object
Set XL = CreateObject("Excel.Application")
Set WB = XL.Workbooks.Open("P:\Tolroy Manor\Data Store\Map Production\map_status.xls")
WB.Close False
Set WB = Nothing
XL.Quit
Set XL = Nothing
End
End Sub
Jon
|
|
|
|
|
Thanks. I have tried your code but Excel.exe still shows as running in Taskmanager. Would you have any other ideas? Thanks in advance.
|
|
|
|
|
XL.Quit() would do close Excel. Everything seems OK in this code. The problem lies somewhere else. Maybe some feature the workbook introduces (running macro or something). You should also consider upgrading to Excel2003 if you haven't done so.
|
|
|
|
|
You need to use "Marshal.ReleaseComObject()".
|
|
|
|
|
OK I've tried it in VB.NET and it worked fine without Marshal.ReleaseComObject()
I mean, Excel2003 has quit without it.
But the optimal solution would include your line.
|
|
|
|
|
I think you'll want to use the "Marshalling" especially if your users can create multiple Excel objects from within your application. You'll see them hanging around in the "Task Manager" if you don't handle them. At least that was my experience.
|
|
|
|
|
is there a way to use ms access as the backend for an application developed
in ppc 03? If so, are there some resources for sample code for connecting to
the database, opening the database, retrieving records, modifying records
etc.?
Thanks in advance for any help
|
|
|
|
|
What's "PPC 03"?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Sorry, that was a poorly worded question. The app was developed in vb.Net for a Pocket PC 2003 (ppc 03) device.
|
|
|
|
|
In that case, your question would be better handled in the Embedded/Mobile Forum[^]. It really has nothing to do with VB.NET. It's a matter of whether the Pocket PC and the .NET Compact Framework has support for OLE Databases, a question I am hardly qualified to answer.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi All,
I have a VB Form which has a Browser Control within. Now I would like that when a VB button is pressed (on the window form) a cookie is set and when i load a particular asp page within the browser control it reads the cookie.
The problem i'm having is setting the cookie from the VB.Net part. Is there a way to do it or at least is there another way to transfer data from VB.NET application to the ASP page.
Can anyone help pls!?
Thanks in advance
Nick
|
|
|
|
|
That's a really poor method of transferring information to a website, and will more than likely fail. Parameters are usually passed in the URL string. The format of which depends entirely on the site. What are you trying to do?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave
thanks for your reply..
well i said in my previous post i am creating a VB.Net application which has a WebBrowser within. The story behind it is quite simple as my client wants this particular system and i've suggested to write an application which would be accessed via the Browser (ASP.NET) but he refused! Since i know this guy quite well, i'm pretty sure that after a couple of months he would want it acessed via the Browser...so to facilitate this i've written the main system using ASP.NET and created a client using VB.NET and will eventually load all the ASP pages within. Now the VB client app on loading will ask for the user name and password and in some way i need to transfer the user information to the browser.... i thought i could have done it through a cookie...though through your reply it seems that it is not a suitable method!
Any suggestions would be greatly appreciated!
Thanks once again
Nick
|
|
|
|
|
Uhhhh... You're adding a HUGE level of complexity to the client portion that you don't need to. If your just going to wrap the browser in a Windows app, don't. Your wasting your time and your clients.
In a situation like this, the core of your application should be written as a WebService. This WebService can be accessed by your ASP.NET application or from a Windows application. The data processing portion of this system will be entirely inside the WebService.
Now, the visual side of this app can be done by 2 independent applications. One, by an ASP.NET app that generates the HTML interface for your app in a browser, and the other, by using a normal Windows application. You must keep in mind the the ASP.NET and Windows applications are just the user interface! Visual's only! They will rely entirely on the WebService to handle all of the data processing your app does.
With all the data processing in a WebService, you can stick to writing the Windows app without worrying about how your going to get data into and out of a WebBrowser control.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Wow... thanks once again
I was planning my app as follows:
GUI: VB.NET and ASP.NET
Business TIER: Class based
Data Tier: Class Based
Haven't considered much about webservices! Though i think that WebServices are not much different from Class (viewed from my own unknowledged perspective).Am I correct or? So i could work with webservices!
What i know is that when WebServices are consumed they are received as XML, right? Since my app will contain some sensitive data..will it still make sense or? and if so will webservices return DataSets (i assume so)?
any help would be greaTLY APPRECIATED...and sorry for the stupid questions..though i quite new to this technology...
Kind Regards
Nck
|
|
|
|
|
Well, I barely have time to look at my own code, let alone someone elses. But, I can point you at a starting point for Web Services, here[^]. On the far right of the page, you'll find Web Services Basics[^]. Start there.
Everything in Web Services is passed back and forth using SOAP, which is a lightweight, XML-based messaging framework.
Does it support encryption and security? Yes! Make sure you download and install the Web Services Enhancements (WSE) 2.0 SP2 for Microsoft .NET[^] to get the latest encryption and security support.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi to all,
i have one problem with a scanner:
I have found here the sample Twain Scanner that work with Epson scanner.(1640Su)
When I ask to Aquire from Twain
nothing seems to happen
My scanner is visible and work with other programs.
please answer soon
Thanks
MAssimo
|
|
|
|
|
This may seem like a stupid question, but do you have a TWAIN driver installer for your scanner?
Next, without seeing any code and error messages, there's nothing we can do to help you. You haven't given us any information at all, other than "It won't work." What code do you have that won't work?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
No code error return!!!!!
I click on button "scan" but nothing happen.
I think that the problem is in function
PreFilterMessage because always loop
PS
in my notebook with 2000 server the program work very well
but on customer's computer with 2000 or XP doesn't work
|
|
|
|
|
Again - stupid question - does the machine have a TWAIN driver installed for the scanner?
And, you still haven't provided any code or link to the code your using...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
OK. I have to ask - ARE YOU NUTS? You're using this in production code your selling?
The library your using has some big problems if your going to use it in a production application that your selling:
1 - It's a third party work, hardly tested, and not guaranteed to work at all!
2 - It's not supported, so you're using "at-your-own-risk".
3 - It's not a comprehensive library. It has minimal functionality.
4 - It's a roll-your-own wrapper for a subset of the TWAIN API found in the file TWAIN_32.DLL. If you have a different version of the .DLL file from what the wrapper was written against, it's not guaranteed to work!
It may work for you, but if that .DLL is different on your clients machine, then your on your own. You'd be MUCH better off using WIA (Windows Image Acquisition). At least that's supported by Microsoft and has better support for more hardware.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|