|
That would require you to write your code specifically to handle the case where the database file is sitting X number of folders above where your app is. It's a bad idea to write your application like that. All you do is click on the database file in the Solution Explorer, then look in the Properties window below it (by default!) There is a Copy to Output Directory property there. Change that option to "Copy if newer" and the file will no longer be copied to the bin folder unless you update the database file in the Project folder.
|
|
|
|
|
Hi Dave. This is AWESOME!
A big thanks to you mate. At last, I solve this problem, i did not notice that I should change that output directory to "Copy if newer". Thank you so much.
Whew!!! I can sleep now.C# コードMicrosoft End User
2000-2008
「「「「「「「「「「「「「「「「「「「「「「「「「「「「
The best things in life are free
」」」」」」」」」」」」」」」」」」」」」」」」」」」」
|
|
|
|
|
I learnt something today too. I was waiting to see what the answer to this was!
|
|
|
|
|
And maybe it will be more interesting on Vista or Win7 if you create a setup ...
|
|
|
|
|
Hello To all,
Actually i want to print the Richtextbox Content. There are a Diffrent Texts(Bold,Italic,Different Size ,Different Fonts ),Image Hyperlink,Icon.
So Please Help me for doing that.
ThanksIf you can think then I Can.
|
|
|
|
|
I think the best way to do that would be to save the contents into a Rich Text Format(.rtf) file and then print that file contents.
|
|
|
|
|
How can it possible. Print Format Should be needed. If you can think then I Can.
|
|
|
|
|
Have a look at this[^] MSDN article.
|
|
|
|
|
Have a look here[^].
Worked for me."I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
hi there,
can anyone help me, i want to can be able to read ym message archieve in offline mode, i try to develop a program using vb6 code because only that code i can use, but i stuck in reading the dat file in yahoo, when i can open it, that shows symbol2, can anyone help me to solve my problem. thanks a lot
|
|
|
|
|
You're going to have to get the documentation on the archive file format in order to read it directly. I have no idea if Yahoo Messager (I'm assuming this is what you are using!) exposes a COM object model you can use to read the file. Again, that's going to be information provided by Yahoo.
|
|
|
|
|
Hi,
I'm developing an application (lets call it desktop) which acts like a desktop with a taskbar at the bottom. Desktop runs mulitple instances of a non .net applications which can open text files or pdf files. I've developed a dll that the non .net programs uses to open the pdf's or text files and make the resulting application window into a child window of desktop. I currently have a timer which ticks once a second and checks to see if any new pdf/text files have been opened by the non.net applications and if it finds them it adds them to desktop's taskbar and menus:
Private Sub windowtimer_Tick(ByVal sender As Ob...
Dim window As IntPtr = apiFindWindowEx(Me.Handle, 0, "AdobeAcrobat", IntPtr.Zero)
If CInt(window) > 0 Then
.
.
.
Dim window2 As IntPtr = apiFindWindowEx(Me.Handle, 0, "notepad", IntPtr.Zero)
If CInt(window2) > 0 Then
.
.
.
End Sub
This works fine, however it's a bit resource intensive and with 30 or more people running desktop on a server with all the other non.net applicatins at once it's bound to slow things down.
The question I'm getting round to asking is - Can I use the dll that is opening the pdf/text files to call a routine in desktop so that it can add them dynamically without checking every second? Also, I use the timer for a clock aswell so would it make much difference?
Sorry for the essay!
Chrismodified on Monday, March 1, 2010 9:26 AM
|
|
|
|
|
Your dll could use mutex to communicate to the desktop once it launches a program. 'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
I can think of a few ways of doing what you want.
1) If the DLL that your non .net app is using is a com visible .Net assembly then you could look to implementing the use of MessageQueues (see System.Messaging namespace)
2) Less eligent method would be to update a text file somewhere one the user's system, containing the details of the open documents. The use the DirectoryWatcher component to monitior for when the file changes.Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
Thanks for that. Yes it's a .net assembly so I'll look at MessageQues I think as I don't want to have lots of text files for each user.
|
|
|
|
|
For anyone interested, here's how I've done it...
In 'desktop' I create a messageque called the handle off the application:
MessageQueue.EnableConnectionCache = True
MessageQueue.Create(My.Computer.Name & "\private$\" & CStr(Me.Handle), False)
I've then written a sub called txtpdfchech to start checking the message que:
Dim que As New MessageQueue(My.Computer.Name & "\private$\" & CStr(Me.Handle))
que.Formatter = New BinaryMessageFormatter
AddHandler que.ReceiveCompleted, AddressOf txtpdfrecieved
que.BeginReceive(New TimeSpan(0, 0, 1))
the starts recieving, on a new thread, for 1 second and whether it recieves a message or not starts another sub txtpdfrecieved. At the end of this, it starts the .beginrecieve again:
Private Sub txtpdfrecieved(ByVal message As Object, ByVal args As ReceiveCompletedEventArgs)
.
. Does stuff
.
CType(message, MessageQueue).Purge()
CType(message, MessageQueue).BeginReceive()
end sub
So the DLL sends the message like this:
Dim que As New MessageQueue(My.Computer.Name & "\private$\" & CStr(handle))
que.Formatter = New BinaryMessageFormatter
stringy = stringy & CStr(processtostart.MainWindowHandle)
que.Send(stringy)
where handle is the handle of desktop recieved from the non.net application and processtostart is the notepad or adobe reader just opened by the dll.
Chris
|
|
|
|
|
Good day,
Not sure if should rather be under ASP or embedded, but I am doing the development in vb.net.
I can't quite figure out how to proceed with this problem. just need someone to point me in the right direction.
I have a VB (VB 2008 Express) windows form app that connects up to a SQL express DB . Everything works fine there. I created a datalayer class and a business layer class. The datalayer handels all database connection functions and the business layer handles search functions that returns datarows and several other lookup and update functions.
Now I want a Windows CE symbol bar code scanner (vb.net 2003 compact framework 1. Framework 2 to big for device memory) to connect up to the vb app.
Eg.:
I have a function in the business layer class that checks for duplicate numbers scanned. I want the CD device to scan the number and then feed it to the function in the business layer. But I think it might not work if I create the business object on the device. I need business class to reside on the server. ASP? Web service?
As I say not sure where to go from here. It also seems that VB .net Express cannot create web services and ASP websites. you need Visual Web developer 2008 express edition for that. Not sure how to link the two.
I would appreciate any advice.
Thanks
|
|
|
|
|
Yes, you need to create a Webservice and deploy it to an IIS webserver. The webserver needs to be able to see your SQL database. The webservice can use the same business and datalayer classes if you wish.
|
|
|
|
|
Hi guys
I was just wondering if anyone could tell me what someone means when they say they run an MS access application?
Although I'm no stranger to VBA in Excel, and VB6, I am a stranger to MS Access programming.
Can MS Access be used as a deployable front end (like a windows form app) for mass use of sorts using VBA?
Cheers,oooo, the Jedi's will feel this one....
|
|
|
|
|
Yes, Access can be used to create a front-end, with either the Access/Jet database itself as the back end, or another database. I supported one application that was becoming too big for the Jet database engine, so I upgraded the back-end to SQL Server without too much trouble. It's usually easier to deploy the app if the user already has Access installed, though I believe you can purchase and distribute an Access run-time. The apps I've created or maintained were always for internal users that already had Access installed.
Access has its own forms and reports designers and sets of controls, and also supports other COM/OCX controls on the forms, if I recall correctly. With some effort, it's also possible to lock it down so that the source code and form definitions can't be viewed or modified.
Scott
|
|
|
|
|
Cool, thanks for this. I'll swat up on it tonight.
The reason I'm asking is I have been invited for a second interview at a place that currently has and needs to support this set up until a replacement can be sorted (which will be one of my main tasks if I get the job).
They currently have about 150 users on this. They have already upgraded the data storage to SQL, but are not quite ready with an updated front end.
Wish me luck...oooo, the Jedi's will feel this one....
|
|
|
|
|
I have not actually used Access for a number of years but certainly, we would create a front end containing forms and reports and a separate mdb containing all of the tables or links to SQL server (ahem; it was along time ago).
You could then place the front end on a client machine with the back end on a server and connect the users. Not ideal but it worked reasonably well.
It was a simple and quick way of getting an application out to a small set of users but I wouldn't do that now. Either a web or winforms front end looking at a sql server database (or whatever your preferred technologies are).Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
|
|
|
|
|
Thanks for that. It's for a company that has this in place already, but will be building a new, improved system. Unfortunatly, this system will need maintaining until the new is ready.
It's for a second interview I have, so the new system and the maintainence of the old system would be my responsibility if I get it.
oooo, the Jedi's will feel this one....
|
|
|
|
|
Good luck.Tychotics: take us back to the moon
"Life, for ever dying to be born afresh, for ever young and eager, will presently stand upon this earth as upon a footstool, and stretch out its realm amidst the stars."
H. G. Wells
|
|
|
|
|
I have this block of code in the code behind of a VB.NET web site:
If (row.HasVersion(version)) Then retVal += String.Format( _
"Version: {0} Value: {1} <br />", _
version, row(columnName, version))
Else
retVal += String.Format( _
"Version: {0} does not exist.<br />", version)
End If
Visual studio keeps reporting that 'Else' must be preceded by a matching 'If' or 'Else If' and
'End If' must be preceded by a matching 'If', but THEY DO all match!
|
|
|
|