|
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
|
|
|
|
|
Hi Dave,
Thanks for helped me and replied to me.
The reusing is a good idea. In fact, my app ran better, but after about 10 excel files that exception was showed.
Note: i have 1000 htm files and i wan convert them into excel.
i love IT
|
|
|
|
|
Hi , Can anyone help me in this problem ...
I am popuating three textboxes in a GridView from my DB ... Now, I want to change values in these textboxes and save all rows when User presses 'Update' Button. What happens is , when 'Update' is pressed, there is PostBack on the page and all values in TextBoxes are shown as Null ..How can I save my previously displayed values in TextBoxes ?
|
|
|
|
|
Watch the forum where you are posting...
Mubashir
Every job is a self portrait of the person who did it.
|
|
|
|
|
VS 2005 (VB.Net)
Is it possible to open a form by a string name without having to declare the form first ,
ie
normally you would
Dim SomeForm as New FormName
SomeForm.Show
What i wasnt yo do is create a dynamic form, and when the user clicks a button it open a corraspoinding form. As each user will have different 'buttons' on there forms i want to have a routine that i can parm a formname in as a string and it open the form.
ie
Dim FormName as String = 'SomeFormName'
FormName.Show
Any idea's
I really do need help..... all this computer stuff is way over my head !!
|
|
|
|
|
No i don't think so. Why do you need to do it this way?
Posted by The ANZAC
|
|
|
|
|
I do know thre is a way of doing this, as i have seen the code, just carnt remember it. The reason i want to do it this way is that there are a number of users that will be using this application, each one on them will have a 'main selection screen' which will have upwards of 20+ options. each option will open a new form. NOT all the operators will have the same options so rather than have a while load of code declaring every form, i just want a small simple routine.
I really do need help..... all this computer stuff is way over my head !!
|
|
|
|
|
yes its Absolutely possible to do so and can be done very neatly in VB2.0,Just give me a day I will post the Code snippet . but before that I want to know you require that and how you got this nagging idea
Navneet.Hegde
navneethegde@yahoo.co.in
Live Life Kingsize
|
|
|
|