|
Can you please give me a small explaination how i can make a setup of a working project ?
Do i need to add something to my existing program ?
thx
DCA
|
|
|
|
|
If you have an Express edition of Visual Studio, you don't have this option.
|
|
|
|
|
I have a payed version (pro)
thanks for give me a few hints how to add the setup to my project.
DCA
|
|
|
|
|
how to get reset an application without reopen the application?..txx
|
|
|
|
|
What do you mean by reset?
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
|
how to To Reset Form To How It Was At Startup?
|
|
|
|
|
Well, employ a method to reinitialize it. Something like a ClearAll method.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
There is no spoon, and there is no reset-feature. How about closing "self" and using a Process.Start to run your application again? That will reset your application, freeing resources and stuff
I are troll
|
|
|
|
|
thanks for your help!!
Me.Close()
Application.Restart()
|
|
|
|
|
Hi everyone
need your assistance on this matter
I develop an application which requires user to enter width and length in text area
and later when they press 'load button', the dimensions entered will be used to generate a box on panel
I am using .NET framework 2.0
is it possible?
Nik Nur Ayunni
Malaysia
|
|
|
|
|
Set the provided width and length(i suppose it should be height) to the controls width and height property in the load button's click handler.
|
|
|
|
|
You can create a picturebox or a label with the specified dimensions and add them to the panel on button click.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
oo ok2,i get the idea, thanks for your reply
but then how about multiple boxes to be put?
let say we have A, B, C, D, E in button controls (A represents box in A size, B in B size etc)
when user press A and click on certain area in the panel, that will be the last location of the box A
and when user click B and another area in the panel, it will be the last location of box B
is it possible with only .NET framework 2.0?
thanks
|
|
|
|
|
niknurayunni wrote: when user press A and click on certain area in the panel, that will be the last location of the box A
You do not need to care about the button click then. Handle the panel's MouseDown event.
Infact get rid of the button and try out some help text for the user.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
I have a picturebox that loads an image, and I need to let the user replace the image. How can I replace the file of the image that was loaded into the picturebox? I tried settings the picturebox's image to "New Bitmap(1,1)" to clear it first, but it didn't help.
Help please?
|
|
|
|
|
Hi,
an image that get loaded from a file (by Image.FromFile or PictureBox.Location) remains locked until the image gets disposed of. So you would need (I'm using C# syntax here, adapt where necessary):
Image image=Image.FromFile(filename);
myPB.Image=image;
Thread.Sleep(10000);
myPB.Image=null;
image.Dispose();
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
If anybody have knowledge about smart cards...
how you convert the hexadecimal data in the APDU format to character form...
do we have to write a code for that..and how you connect smart card to visual basics so that it displays the data in character form....do we need a driver for connections....??
I am using the ACR38 SDK(software development kit)
smart card reader is ACR 38.
smart cards are SLE 5542,SLE 5528..
for more details contact www.acs.com.hk
|
|
|
|
|
I am developing appliation with ACR 38 and SLE 4428 card. I dont find API to be programmed in my .Net application on ACS website. Can you help so that i can directly use those API in my application.
my mail id : pratik81in@gmail.com
I know the ApI:
AC_Open
AC_StartSession
AC_ExchangeApdu
|
|
|
|
|
I use this
For i = 0 To CheckedListBox1.CheckedItems.Count - 1
DataGridView1.Rows.Add(1)
DataGridView1.Rows(i).Cells(0).Value = CheckedListBox1.CheckedItems.Item(i)
Next
But this add this "System.Data.DataRowView"
|
|
|
|
|
You have to convert the CheckedItems.Item(i) to a String or retrieve whatever text you used to label that item.
|
|
|
|
|
Hi,
I am reading all the directories but the loop gets broken when the directory doesn't have permission to read. Therefore I decided write the following function get the permit before I read a directory via code. However the function doesn't produce any result. Neither demand nor assert functions are wotking with or without "try" blocks.
How I can get at least a read permission to iterate trough the directories without having any security problem. I have incuded the following statement in assembly also.
Regards,
<Assembly: PermissionSetAttribute(SecurityAction.RequestMinimum, unrestricted:=True)>
'Here how I check the permission
If AskPermission(GetDir.FullName, FileIOPermissionAccess.Read) = False Then 'for testing
MsgBox("No permit")
End
End If
'This is the function called and if directory doesn't permit to read teh message supposedly should pop up but it doesn't
Public Function AskPermission(ByVal GetFile As String, ByVal GetPermissionType As FileIOPermissionAccess) As Boolean
Dim ps As New Security.PermissionSet(PermissionState.Unrestricted)
Dim fs As FileIOPermission
Dim ep As EnvironmentPermission
Dim Permitted As Boolean = True
fs = New FileIOPermission(GetPermissionType, Path.GetFullPath(GetFile))
ep = New EnvironmentPermission(EnvironmentPermissionAccess.Read, GetFile)
Try
ps.AddPermission(ep)
ps.AddPermission(fs)
fs.Demand()
Catch ex As Exception
MsgBox("no permit")
Permitted = False
Try
fs.Assert()
Catch dx As Exception
MsgBox("asseret failed")
Permitted = False
Finally
Permitted = True
End Try
End Try
Return Permitted
End Function
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Hi,
This problem is almost identical to the previous situation you had encountered and the answer is the same as well. You have to differentiate between what the CLR will allow your code to do and what the operating system will allow the current user to do.
If you cannot navigate into the directory using Windows Explorer then the account does not have that permission and an attempt to get it through code will fail.
Usually, for example, a directory iterator will have to skip over the recycle bin. The problem is that without trying you will not know which directories are inaccessible. All you can do is catch the System.UnauthorizedAccessException and carry on.
http://www.codeproject.com/script/Forums/View.aspx?fid=1646&select=2926191&fr=292#xx2926191xx[^]
Alan.
|
|
|
|
|
Here is a very quick and dirty recursive loop that doesn't break when it finds a folder it can't access;
The form has a textbox for the startpath
a listbox box for all the found items
a listbox for the problem paths
a go button;
Imports System.IO
Public Class Form1
Private Sub getDir(ByVal path As String)
Try
'Get List Of Directories in current directory
For Each dirname As String In Directory.GetDirectories(path)
listFound.Items.Add(dirname)
getDir(dirname)
Application.DoEvents() 'Quick dirty solution
Next
'Get list of files in current directory
For Each filename As String In Directory.GetFiles(path)
listFound.Items.Add(filename)
Application.DoEvents() 'quick dirty solution
Next
Catch ex As Exception
listErrors.Items.Add("ERROR: " & ex.Message & " : " & path)
End Try
End Sub
Private Sub buttonGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttonGo.Click
listErrors.Items.Clear()
listFound.Items.Clear()
Try
If Directory.Exists(textStartPath.Text) Then
getDir(textStartPath.Text)
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
End Class
I don't know if that's what your trying to do, but this works with both mapped drives and unc paths, i have tested against a machine with known folders with no access and it simply adds them to the errors list and continues.
cheers,
|
|
|
|
|
Dave, Thanks for responding. My solution is the same actually but guess what happens during iteration. There is directory called "SYSTEM VOLUME INFORMATION" under C:\. The OS can't allow you to read this directory even you try to give the permission. Therefore code is skeeping it while recursively looping.
After "System Volume Information", there is temp and then Users directory. I placed a file under temp directory to check if the procedure could read it. It didn't read the temp but the one "Users" after the temp. Now I am trying to figure out this problem how it is skeeping the temp and directly jumping into Users. If you can figure it, let me know please. Thanks again.
Private Function CheckDirectories(ByVal GetDir As DirectoryInfo, ByVal worker As BackgroundWorker, ByVal e As DoWorkEventArgs) As Boolean
Static Barmax As Int32 = 0
Try
If GetDir.GetFiles.Count > 0 Then Call ReadFiles(GetDir)
'__________________________________________________________________
'
'
For Each SubDir As DirectoryInfo In GetDir.GetDirectories
Application.DoEvents()
'
'______________________________________________________________
'
If SubDir.GetDirectories.Count > 0 Then
Barmax += SubDir.GetDirectories.Count
Me._ProgressBarDir.Maximum = Barmax
Me._ProgressBarDir.Value += 1
Me._LabelDirMes.Text = GetDir.Name
End If
'We set backgroundworker controlling right here
If worker.CancellationPending Then
e.Cancel = True
Return False
End If
Me._LabelDirMes.Text = SubDir.Name
CheckDirectories(SubDir, worker, e)
Next
Catch ex As System.UnauthorizedAccessException
DirError = True
Note += GetDir.Name & vbCrLf
'Note is displayed with a message box out of this procedure to tell users about the directories with no
'permit
End Try
End Function
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|