|
pls i need the procedure on how to read a 3D stl file in vb 2010 ,i have already loaded the Glcontrol on my window application form .am new to vb.net pls i need help .thank you all
|
|
|
|
|
You're asking about the functionality of a 3rd party library. The best for support on it and how to use is the vendor for the library, here[^].
|
|
|
|
|
In an existing vb.net 2010 desktop application, I would need to have 2 users share the same computer. Both users will run the same desktop application but have access to different files and folders on the network share. Each person will have their own unqiue config file to show what files they have access to.
Based upon what I have said, I have the following questions to ask:
1. Will I need separate installs of the application on the same computer? Part of the install process includes placing the app.config file in the correct location. If so, can you tell me what I need to do for the separate installs?
2. If I do not need separate installs, what should I do about the separate app.config files? Each person's config file will point to files they directly have access to. I do not want each person to access the other person's config file.
modified 13-Oct-15 13:11pm.
|
|
|
|
|
dcof wrote: Will I need separate installs of the application on the same computer? No, you can get the windows user name and then use that to allow/disallow certain access.
dcof wrote: Each person's config file will point to files they directly have access to. I do not want each person to access the other person's config file. If they are admins on the machine then they can get access to it. Otherwise, if they are not, then you can use the user's app_data folder or something like that. But, it sounds like you may want to encrypt the config file or use a sql database to store what they can access.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
The files are on a network share. Thus can you tell me how I can restrict access by user on a network share?
|
|
|
|
|
dcof wrote: how I can restrict access by user on a network share Not sure what you mean exactly, but you can just right-click folders and set permissions.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Thanks this solves my issue!
|
|
|
|
|
Good to hear.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
Good Morning to all,
My customer Need to touch Screen Applications,screen fully show to icon and touch to show sub group image icon.how to possible this procedure,i have used few buttons but i don't know load sql values to buttons,so please help me to all......
thanks
dha NAA
|
|
|
|
|
dha NAA wrote: load sql values to buttons What exactly does that mean? SQL values may be strings, numbers, BLOBs, etc. Buttons are GUI copntrols, so there is no direct correlation between the two.
|
|
|
|
|
We'll need a lot more info from you as to where you are stuck if we are to be able to help.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
What is it exactly you are trying to do? More information may be helpful. What have you accomplished so far?
"I've seen more information on a frickin' sticky note!" - Dave Kreskowiak
|
|
|
|
|
In a current vb.net 2010 application, there is a dropdown list where the user selects who they are. From this list, the application knows what files are unique to the user.
In the past there was only one user. Now there is going to be 4 to 8 different users. The dropdown list is used to point to where the files are located for each user. This occurs since the user selects their individual names from the dropdown list and all the files uniquely start with the name of the person. In other words if the name Joe is selected then all the file names are Joe_file1,Joe_file2, etc.
The users are concerend that they will accidently update each others files. The users do not want to this to occur. This solution was determined by the previous programmer so each person could backup each other.
Thus I am trying to determine what a good solution would be.
Here is what I am thinking a good solution should be:
1. Change the application to determine what windows logon the person is using. Possibly the windows identity property could be used. This way the application will determine what files the user has access to.
2. Have another windows user created that basically has admin rights. This admin user logon would have access to all the users files. Basically when a person signs on with the windows admin user account, they would have to know what files they are trying to access.
|
|
|
|
|
1. I absolutely agree with point 1 - user should not be selecting their name from a list - open to abuse/security breaches etc.
2. I also agree that you should have an "admin" logon with access to everything.
In addition - How about also having a "delegates" list (I mean this in the English sense not the .NET sense) ... on the database have a table that maps each user to the other users whose files they are allowed to see and/or update ... similar to the way Outlook / Lotus Notes allows. Individual users should be able to configure who they will allow to see their files but a user may not "demand" the access by just picking a name of a list.
If UserA logs on they see their own files by default, but can pick another user from a list, that list only shows the list of users who have given that permission
|
|
|
|
|
You have a good suggestion. However each person has their own access 2013 database. Thus would I setup each person to point to their correct files using the Access 2013 database?
|
|
|
|
|
If they all have individual databases then that does complicate matters a little (I originally thought of a shared database) ... not sure how you are going to be able to grant access to other files that way
|
|
|
|
|
If Focus is on DataGridview if Escape key is pressed then set focus to textbox1
If Focus is not on DataGridview if Escape key pressed then i want to close the form
how do? please help me.
|
|
|
|
|
|
I have used this code to access the webcam of my laptop and it perfectly works, but once i try to open it in my tablet it just shows me a black screen, the same thing happen when i test the code with a PC that does not have a webcam!
ANY IDEAS?
Dim hCap As Long
Private Sub cmd4_Click()
Dim sFileName As String
Call SendMessage(hCap, wm_cap_set_preview, CLng(False), 0&)
With CDialog
.CancelError = True
.Flags = cdlOFNPathMustExist Or cdlOFNOverwritePrompt
.Filter = "Bitmap Picture(*.bmp)|*.bmp|JPEG Picture(*.jpg)|*.jpg|All Files|*.*"
.ShowSave
sFileName = .FileName
End With
Call SendMessage(hCap, WM_CAP_FILE_SAVEDIB, 0&, ByVal CStr(sFileName))
DoFinally:
Call SendMessage(hCap, wm_cap_set_preview, CLng(True), 0&)
End Sub
Private Sub Cmd3_Click()
Dim temp As Long
temp = SendMessage(hCap, WM_CAP_DRIVER_DISCONNECT, 0&, 0&)
End Sub
Dim hwdc As Long
Dim startcap As Boolean
Private Sub cmdCapture_Click()
Dim temp As Long
hCap = capCreateCaptureWindow("Take a Camera Shot", ws_child Or ws_visible, 0, 0, PicWebCam.Width, PicWebCam.Height, PicWebCam.hWnd, 0)
If (hwdc <> 0) Then
temp = SendMessage(hwdc, wm_cap_driver_connect, 0, 0)
temp = SendMessage(hwdc, wm_cap_set_preview, 1, 0)
temp = SendMessage(hwdc, WM_CAP_SET_PREVIEWRATE, 30, 0)
startcap = True
Else
MsgBox ("No Webcam found")
End If
End Sub
Private Sub Cmd2_Click()
Dim temp As Long
temp = SendMessage(hCap, WM_CAP_DLG_VIDEOFORMAT, 0&, 0&)
End Sub
Private Sub Form_Load()
cmd1.Caption = "Start &Cam"
cmd2.Caption = "&Format Cam"
cmd3.Caption = "&Close Cam"
cmd4.Caption = "&Save Image"
End Sub
|
|
|
|
|
I created a simple application that uses an interface to implement MEF (and yes its a stupid and simple example, or so I thought):
Imports System.ComponentModel.Composition
<InheritedExport(GetType(IMathFunctions))>
Public Interface IMathFunctions
Function DoMath(ByVal Num1 As Double, ByVal Num2 As Double) As Double
End Interface
So In the same project I have one class that uses the interface:
Imports WpfImportedFiles
Imports System.ComponentModel.Composition
<Export(GetType(WpfImportedFiles.IMathFunctions))>
Public Class Substract
Implements WpfImportedFiles.IMathFunctions
Public Function DoMath(Num1 As Double, Num2 As Double) As Double Implements IMathFunctions.DoMath
Return (Num1 - Num2)
End Function
End Class
And I load this into the program using this code:
Imports System.Collections.Generic
Imports System.Linq
Imports System.ComponentModel.Composition
Imports System.ComponentModel.Composition.Hosting
Imports System.Reflection
Imports System.IO
Public Class Importer
<ImportMany(GetType(IMathFunctions))>
Private operations As IEnumerable(Of IMathFunctions)
Public Sub DoImport()
Dim catalog = New AggregateCatalog()
Dim asm = Assembly.LoadFrom("C:\Users\ ... \LibImportedClasses.dll")
Dim catalog2 As New AssemblyCatalog(asm)
Dim catalog3 As New AssemblyCatalog(System.Reflection.Assembly.GetExecutingAssembly())
catalog.Catalogs.Add(catalog3)
catalog.Catalogs.Add(catalog2)
Dim container As New CompositionContainer(catalog)
container.ComposeParts(Me)
End Sub
Public ReadOnly Property AvailableNumberOfOperations() As Integer
Get
Return (If(operations IsNot Nothing, operations.Count(), 0))
End Get
End Property
Public Function CallAllComponents(a As Double, b As Double) As List(Of Double)
Dim result = New List(Of Double)()
For Each op As IMathFunctions In operations
result.Add(op.DoMath(a, b))
Next
Return result
End Function
End Class
This works well for the class that is inside the original project, except for one thing; It gets loaded twice, and I don't understand why.
The other question is, how do I load a lib file that is in a separate project (i.a. the interesting case). I could not get it to work, but managed to load the assembly, that did contain the class I wanted to load, but I couldn't use it.
I hope that you could assist me in answering the two (hopefully) simple questions.
|
|
|
|
|
Because the InheritedExport AND the Export attributes export it. Remove the InheritedExport on the interface to fix it.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
I couldn't make that work, but I could keep it in the interface and remove it from the classes, that way only one instance was created. So thank you for your help
But I still can't add the method created in the separate project.
|
|
|
|
|
There is just one problem left, I can't seem to load the Assembly from the imported dll. But I am able to get the type that Im interested in by using this method:
Dim Path As String = ("C:\Users\ ... WpfPlayingAroundWithMEF\LibImportedClasses\bin\Debug")
Dim pluginFiles() As String = Directory.GetFiles(Path, "*.dll")
Dim ipi = (From file In pluginFiles
Let asm2 = Assembly.LoadFile(file)
From type In asm2.GetExportedTypes()
).ToArray()
So why doesn't the lines:
Dim asm = Assembly.LoadFrom("C:\Users\ ... LibImportedClasses\bin\Debug\LibImportedClasses.dll")
Dim catalog2 As New AssemblyCatalog(asm)
Load the assembly so I can use them?
Edit:
My other project lib looks like this:
Imports System.ComponentModel.Composition
Imports WpfImportedFiles
Public Class Add
Implements WpfImportedFiles.IMathFunctions
Public Function DoMath(Num1 As Double, Num2 As Double) As Double Implements IMathFunctions.DoMath
Return Num1 + Num2
End Function
End Class
I have tried to add the Export attribute, but that seems to be provided by the inheritedexport in the interface.
modified 8-Oct-15 2:31am.
|
|
|
|
|
I don't know what the issue was, but a rebuild of the library fixed it.
|
|
|
|