|
The only way you can do this, is to put the VB.NET class in a dll, and then import that dll into your project ( so you'll have to distribute the dll with the project, too )
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I am working on a project that requires me to retrieve information from the database.. I really can't figure anything out. we have to program using C#. Any ideas? Do I have to use oleDb or ODBC?
|
|
|
|
|
Hi all
Help me.
- Use Visual Studio 2005
- As programming language, use C#
Merge SQLite data with HTML template. This action should be done using one 'Merge' button click.
Show merged document in webbrowser.
Save merged document to PDF.
- Merger
Replaces '##[fieldname]##' in the HTML template document with data from the corresponding
column of the SQLite table.
Create one new page in the document for each record in the SQLite table.
Thank you.
Regards,
Och-Erdene
|
|
|
|
|
so, have you been try to code and what happen then?
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|
|
So what is your question anyway?? What do you expect to get as answers???
If what you describe is a thing you have to do and you don't even know where to begin, you have to do your homework or rent a programmer who can do it for you.
Regards
Thomas
www.thomas-weller.de
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. Programmer - an organism that turns coffee into software.
|
|
|
|
|
you're going to fail your class. You should consider if this is the right course for you. If it is, you'll do your own work.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
No
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.Passion != Programming & you.Occupation == jobTitles.Programmer)
1000100 1101111 1100101 1110011 100000 1110100 1101000 1101001 1110011 100000 1101101 1100101 1100001 1101110 100000 1101001 1101101 100000 1100001 100000 1100111 1100101 1100101 1101011 111111
|
|
|
|
|
No way.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I've been using the axWebBrowser control to display webpages, but I need to have access to the HTML of a couple of these pages, there are numerous ways of doing this in the other frameworks but I have to work with 1.1. is there any way of casting or converting the axWebBrowser.Document to a readable string without using the Microsoft.mshtml.dll( as it's almost 8 Mbs)
Thanks
|
|
|
|
|
I don't believe so, no.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
well that's disappointing, but thanks for the fast responce.
Shawn
|
|
|
|
|
I have a GUI and a seperate thread which monitors for input through a network in a loop.My question is sometimes, int his loop a command may trigger a new form, which never loads because it is in a thread which is in an infinite loop. Since I shouldn't start a new thread for a new form (from previous posts), how would I launch my new form?
|
|
|
|
|
Create and launch your new form on the GUI thread. Take a look at .Invoke(...) on your main form.
|
|
|
|
|
Sorry to be abother but are there any related articles that can help me out on this? Googles turned me up high and dry, one guy said I should create a new thread and it will work "if it's done properlly", whereas 90% of others told me NEVER to do this.
So any direction would be highly appreciated.
Again to sum up my dilemma, my GUI thread calls a worker thread which has an infinite loop monitoring for changes / commands which may trigger another GUI Form. Obviously I want to keep all my GUI stuff on the same thread, so how would be the proper / best way to get that form activated on the original GUI thread?
|
|
|
|
|
Ok, your worker thread* is reading data from the network. Socket buffers are a limited size, so its job is to get the data out the socket and get back to pumping out those buffers quickly. This means you can do fairly minimal processing - usually just decode and identify the message, then give it to someone else to handle.
When you create a new form, or update GUI controls you are going to have to do that on the UI thread.
When you need to perform some "other" processing tasks, you don't want to do it on either thread. So you probably either need a processing thread, or just use the thread pool.
This means when your worker thread gets a packet it needs to get it processed. Depending on whether the order is important, you then either need to jam it in a queue so your processing thread can deal with it, or use ThreadPool.QueueUserWorkItem if the order doesnt matter too much.
In either case (and even if you decide to be lazy and do without a processing thread and do general processing on the network thread) when you need to update the GUI, then you should call yourMainForm.BeginInvoke(...) which pushes your delegate thru the windows message loop, and runs it on the UI thread a bit later. You can also use SynchronisationContext to pass things around - this uses BeginInvoke when its owned by a form anyway.
* Actually you should probably consider using the async callback style. I hope you haven't used a while loop with a sleep(0) at the end of it
|
|
|
|
|
Hi All,
I'm just looking into a solution to XP/Vista compatibility. Currently my app creates a Database subdirectory in the application install directory which is fine on XP (if not the best solution). Doing this when installed on Vista basically breaks my app, unless you "Run as Administrator" which is also not good ...
Is there a recognised and 'best practise' approach for creating and using a separate data location from the install location that works across both operating systems? I'm guessing its going to be Application Data as Vista appears to have one of these for backwards compatibility.
Or does it make more sense for my app to create a root level directory and write to that instead?
I'm also using log4net to perform application logging currently via Xml configuration problem here is that I'm not sure how to configure this when the writable data location isn't fixed.
Any pointers would be great.
Thanks,
|
|
|
|
|
Use a system-defined directory for the current user. You can retrieve these using Environment.GetFolderPath, passing in one of the SpecialFolder enum constants.
MSDN has several articles about proper directories to store settings and data files under. Here's one: Best Practice Guidelines for Creating Applications that Migrate Easily[^]
|
|
|
|
|
Interesting read. thanks.
However, I think its a bit old as it recommends doing:
Store settings or configuration files either under <application data="" of="" the="" current="" user=""><manufacturer><product> or <local settings="" of="" the="" current="" user=""><application data=""><manufacturer><product> or under <application path="">\Settings.
The last bit <application path="">\Settings is one thing Vista prefers we don't do. As far as I can tell no data should be written to the application path in order to be Vista compliant, the only way to do that is to "Run as Administrator" which is best avoided unless absolutely required.
|
|
|
|
|
See Environment.SpecialFolder Enumeration[^]
The recommended place for common (to all users) app data would be under CommonApplicationData.
For per-user data, the ApplicationData and LocalApplicationData can be used for roaming/non roaming per-user
data respectively.
The recommended path for your application under those special folders is
<companyname>/<productname>/<productversion>/...any other subfolders here...
Note: If you use a folder under CommonApplicationData, your installer (or an admin)
will need to give your folder proper access rights for all the users you want
to be able to use your app running un-elevated.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Ahh ok, thanks for this Mark.
I was going to create a location under CommonApplicationData from inside my app on first launch, would you recommend this task be performed during install rather than when the app starts for the first time?
I was also thinking of omitting the app version info in the path as i'm still in beta at the moment so the versions will be changing more often and the database schema isn't going to be changing for the foreseeable.
|
|
|
|
|
Jammer wrote: I was going to create a location under CommonApplicationData from inside my app on first launch
That's what I do as well. I suppose it depends on the install scenario.
I require the first run to be elevated, so programatically creating the folders and
giving them specific access rights is no problem.
Jammer wrote: I was also thinking of omitting the app version info in the path
That's cool. That was just the recommendations from MS docs.
I suppose company name (or equivalent) is the most important just to
differentiate your folder from all the other installed software's folders...
under that, I suppose anything goes
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Great stuff! Thanks for this info Mark, much appreciated.
|
|
|
|
|
Hi
I have developed a toolbar which needs to invoke a javascript function based on some criteria on specific web page.
To be simple, I want to know how to invoke javascript from BHO(using C#).
I have done everything already but just this one needs help.
Thanks in anticipation
Mujtaba Panjwani
|
|
|
|
|
We have an ASP.NET forum.
MAP Tiger wrote: I want to know how to invoke javascript from BHO(using C#).
You need to do some reading, you obviously don't know what ASP.NET is, or what it does. Specifically, C# runs on the server, js on the client. To run js code, you need to inject it into the page.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi
Thanks for the reply.
If you could read clearly what I said in my question which clearly states that I am running it from BHO (Browser Helper Object) which of course means that the javascript function is already injected in the code but when that specific page is loaded in the browser then the BHO has to invoke that specific javascript function.
Regards,
MAP Tiger
Tiger Softwares
Software Designer and Developer
VB.NET, ASP.NET, VFP
|
|
|
|