|
Yes, in most cases. Placing it there will have the same settings for the app for every person who runs it on that machine.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks Again Dave.
I feel pretty bad to ask one more thing and can appreciate you assisting many others like myself but if possible are you offer any advice or good material for creating invoice printing for VB.NET without any report utilities like crystal reports. I would like to do it in VB.NET only without any report addins.
I honestly can't thankyou enough.
Robbo
|
|
|
|
|
Well, it's a PITA. You basically have to create you own print document and paint the data into the appropriate places on the (blank) page so they just happen to fall into the boxes on the form. This will take CONSIDERABLE trial and error to get the placements correct. You can come up with a system that accepts an offset (X and Y) from the top left corner to place each field. You then save each of these offsets to a file so you can reload them later. It's not too difficult to do, just a royal PITA to lay it all out correctly. I've seen the same thing done with fingerprinting systems (law enforcement) that print fingerprint cards to send to the FBI.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am using VB 2005 Express Edition and i am trying to deploy\Publish my porgram and i can publish it with no problem but when i go to run the program outside the VB environment it crashes. Anyone can tell me or direct to a sort of step by step so i can make sure i did it right?
thanks
Is the .NET framework installed on the target machine ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
Crashes with what error message?
Dave Kreskowiak
Microsoft MVP - Visual Basic
I am trying to run the program from the server and i know that the computer has the framework, i cant say that the erver does with absolute certainty, but i will check into that. The error i get is the standard "windows has encoutered a problem with this program, and it must be shut down"
Microsoft Error Msg
Code: 0xe0434f4d
Flags:0x00000001
Record: 0x0000000000000000
Address: 0x000000007c59bc3f
thanks for responding
|
|
|
|
|
Code running from a non-local source is, by default, not trusted and runs inside a secured sandbox that limits its access to the local machines resources. Read up on Code Access Security[^] before you try and run your app from a server.
As a test, I would copy your app to the local machine and run it from there instead of the server to see what happens.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am trying to run the program from the server, because i need multiple users from different computers the be able to access the same program. It has a database and thus the data needs to be in one place.
|
|
|
|
|
Then you better read up on Code Access Security so you know what's involved in getting this to work and what the pitfalls are.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
thanks i will read up on that, one question does this still pretain if i am trying to run the program on the server. I just want to be able to access the program through the server, but all the files and everything will be saved and modified on the server, the actual local computer will just be used to view, edit data, the program.
|
|
|
|
|
If the code that is executing is loaded from a non-local source (a media that is not physically attached to the local machine) it is not trusted. It doesn't matter what your using the code for.
If the code is run ON the server (not from it) then it gets as much trust as the user who launched it. If it's run FROM the server (the code is loaded from a network share, or other remote source, and is running on a local workstation) it doesn't matter who launched the code, it's running in a restricted sandbox.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi - I am trying to get the filename of the last written file in a directory. Any ideas why this code doesn''t work?
Dim _direct As DirectoryInfo<br />
Dim _strLastfileName, _strDirectpath As String<br />
<br />
_strDirectpath = txtExportPath.Text ' path to directory<br />
_direct = New DirectoryInfo(_strDirectpath)<br />
_strLastfileName = New FileInfo(_direct.LastWriteTime).Name.ToString
|
|
|
|
|
The only way to know which file was written to last is to get the LastAccess time for every file in the folder, sort the list and get the filename off the top of the sorted list.
The LastWriteTime of the Directory is a change in the directory entries for that folder, not the last write to a file in that directory.
Also, The FileInfo class constructor takes a filename as a string as an argument. You're supplying a DateTime object (_direct.LastWriteTime) as the argument, which won't work.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am doing a VB application,used MSFlex grid control to display the data from the table. column header text and cell values of a column are truncating(not visible fully), user manually needs to be draged everytime when it was loaded. Any idea how to fix the column width of flex grid.
Thanks in Advance
Bye
Pradeep
PradeepG
|
|
|
|
|
pdeep wrote: I am doing a VB application,used MSFlex grid control to display the data from the table. column header text and cell values of a column are truncating(not visible fully),
I do believe that there is a property ColWidth that you can set for each of your columns.
pdeep wrote: user manually needs to be draged
|
|
|
|
|
|
In order to measure the distance between two points on a plane, you need, at a minimum, one of three things:
1) A calibration of a known distance between two points in the photo on the same plane as the subject being measured. An example would be a scaled ruler or some other measurement.
2) The focal length of the lens used to take the photo.
3) The distance between the film plane in the camera and the target objects in the photo.
From there, it's a matter of some trigonometry to get the distance between any two points on the same plane in the photo.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hey
Thanks for the fast answer.
1) - This 3 points are no problem.
But
1) How Do I get the two pupils? - So that I I can't take a foto of a bottle or something?
2) How can I take the outermost points of the frame automatic, so that the user only has to insert the value for this points?
Is there any sample, where I can take a look (Written in VB?)
THX
|
|
|
|
|
Now your getting into an area that I don't do. Image recognition is not part of my background at all. This is goign to take some SERIOUS research to find those pupils.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hey
OK & when "we" don't control, if there are pupils or not. Do you know, where I can find some tuts?
THX!!
|
|
|
|
|
Zero-G. wrote: OK & when "we" don't control, if there are pupils or not
Zero-G. wrote: Do you know, where I can find some tuts?
The same place I'd start. Google[^]
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi All, I need to refresh a combobox list (in VB .net) when a new item as been added to the SQL database. Protected Overrides Sub RefreshItems seems to be the way to do it but I cannot find any example of how this is used. I am still trying to get to grips with .net!
I have a sub which calls a form so the user can add details of an item, and when it returns from the form (which inserts the item in the database) I need to update the list in the combo box.
I would be most grateful for any assistance
David Loring
|
|
|
|
|
Dear Its Actually refreshing the whole combobox and this snippet sub works as complete redraw of combobox .Better go for regular properties rather than overriding the class properties. For such if you really want to get proptected properties trhen you are welcome for such query till then try regular properties to get work done like clearing combo
sdfu asgdfsgdfhagsdfhgajsdgfgasd hfasvcjbsvjvhgasjd jgsdfjas bdjfasdhfjavbs jvdfhasgdfhgbashdgfgajs fhgsdhgfjassdfu asgdfsgdfhagsdfhgajsdgfgasd hfasvcjbsvjvhgasjd jgsdfjas bdjfasdhfjavbs jvdfhasgdfhgbashdgfgajs fhgsdhgfjassdfhkjadfhjhjksdhfkjahskjdf hkjahsjkdfhkjashkfakshkhaskghkhagkhadkhgkhgkhaskhsdfu asgdfsgdfhagsdfhgajsdgfgasd hfasvcjbsvjvhgasjd jgsdfjas bdjfasdhfjavbs jvdfhasgdfhgbashdgfgajs fhgsdhgfjassdfu asgdfsgdfhagsdfhgajsdgfgasd hfasvcjbsvjvhgasjd jgsdfjas bdjfasdhfjavbs jvdfhasgdfhgba
|
|
|
|
|
I have an app to generate excel file using excel.dll.
Although after i finished the creating a excel file, i released excel COM.
But in the 10th excel file, it throws System.Runtime.InteropServices.COMException HRESULT exception.
Someone can help me? this is the urgent message....
i love IT
|
|
|
|
|
What's the complete exception that's thrown? We're looking for the HRESULT number?
Did you call Quit on the Excel object before you released it?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hi Dave Kreskowiak,
Thanks for replied me. I called Quit() before i released it. And i also used
System.Runtime.InteropServices.Marshal.ReleaseComObject(appExcel)<br />
<br />
Dim proc As System.Diagnostics.Process<br />
For Each proc In System.Diagnostics.Process.GetProcessesByName("EXCEL")<br />
proc.Kill()<br />
Next
to relase it. but it still throws exception: HRESULT:0x800A03EC
i love IT
|
|
|
|
|
You should NOT be releasing the COM object yourself.
If you're creating multiple sheets in your code in one pass, are you creating multiple Excel application objects? Don't! Create one Excel application object and reuse it to create every sheet and workbook your need.
Another possibility is that your using the Excel Interop Assemblies for one version of Excel, say 2003, and your machine doesn't have Office 2003 installed, maybe you have Office 2000 or XP instead. If you're going to use the Interop Assemblies, you have to match the version of Office that's installed on the machine.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|