|
Hi,
This is a completely blocking issue during development. I have previosuly posted a few messages about it but I haven't received a satisfiying answer from one yet. I am working with IMAPI2. When I load a media on tray, I am getting UnAuthorizedAccess Exception error message.
There should be a way to give essential permission to specific drive or a folder. I know there is however, neither the demanding permission from OS nor Asserting a persmission do not make any sense to Vista 64.
What is putting me in thoughts that how some other software developers find solution to over come authorization problems. I don't have broad knowledge about authorization and permission issues.
If you know any well developed class or a sample code for authorization please let me know. I primitively tried to give permission exclusively to executable file under bin/debug but I realized that the application has already gotten full permission. But the permission is not working at all.
Any help at professional level will be highly appreciated.
Thank you.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
hi,
how i can add macromedia flash as a component into vb project?
|
|
|
|
|
|
Hello everybody,
I'm using a class which creates an arraylist of filtered fileinfo objects. Calling the class like
public source as new clsFileOp
public target as new clsFileOp
....
source.collectFiles(dir) '--> fills the arraylist within the class "source"
target.collectFiles(dir) '--> fills the arraylist within the class "target" which should result in a "files" property within the "source" and the "target" class.
Unfortunately I can't find out how to get the name of the active class from within the class (there's no "name" property). I'm heading to write a logfile which contains entries like "File ... added to arraylist ..." (source or target) while adding the fileinfo objects to the classes "files" property.
Can someone help, please?
Thank you
Michael
|
|
|
|
|
If you want information about the class (this includes the name), try GetType(Me) or Me.GetType. This returns a Type object, which has information about the fields, methods, properties, etc. However, it also has the Name property. Use that
Me.GetType().Name
GetType(Me).Name
You can also get this information from some external files - if you have a spare afternoon, look into the System.Reflection namespace
|
|
|
|
|
Thank you very much - I'll try it asap, the Type object as well as your additional hint.
|
|
|
|
|
Trying the above suggestion I get no usable results.
In my example, I want to print the Name "Source", which I gave the class instance ("Dim Source as new clsFileOperations"), into a log from within the running instance. The Me.Gettype().Name results in "clsFileOperations" printed into my log instead.
Or do I misunderstand something else?
|
|
|
|
|
If TreeView1.SelectedNode.Parent IsNot Nothing Then
SoruTableAdapter.sinif_Gore(YahapDataSet.soru, TreeView1.SelectedNode.Name)
Soru1TableAdapter.sinif_sorgula(YahapDataSet.soru1, TreeView1.SelectedNode.Name)
ElseIf TreeView1.SelectedNode.Parent.Parent.Name IsNot Nothing Then
SoruTableAdapter.ders_gore(YahapDataSet.soru, TreeView1.SelectedNode.Name)
Soru1TableAdapter.ders_gore(YahapDataSet.soru1, TreeView1.SelectedNode.Name)
ElseIf TreeView1.SelectedNode.Parent.Parent.Parent.Name IsNot Nothing Then
SoruTableAdapter.unite_gore(YahapDataSet.soru, TreeView1.SelectedNode.Name)
Soru1TableAdapter.unite_gore(YahapDataSet.soru1, TreeView1.SelectedNode.Name)
ElseIf TreeView1.SelectedNode.Parent.Parent.Parent.Parent.Name IsNot Nothing Then
SoruTableAdapter.Konu_gore(YahapDataSet.soru, TreeView1.SelectedNode.Name)
Soru1TableAdapter.Konuya_gore(YahapDataSet.soru1, TreeView1.SelectedNode.Name)
End If
error: Object reference not set to an instance of an object.
help me..
(bu arada ben türküm başka türkler varsa burada yardımcı olabilir mi? )
|
|
|
|
|
Perhaps nothing is selected in the treeview. This would cause a NullReferenceException, because TreeView1.SelectedNode would be Nothing
|
|
|
|
|
But it give choose condition mistake
|
|
|
|
|
I'm sorry? Are you talking about the if-block? Either way, we need the line on which the error occurred
|
|
|
|
|
Hi,
exceptions contain line number information (unless you only look at Exception.Message), and you can teach an IDE to always show line numbers in editor windows (Visual Studio: menu Tools/Options/...)
And there is single-stepping available in an IDE too, so you can figure it out manually.
You have been given two valid answers and down-voted them both. What more do you expect?
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
|
|
|
|
|
what is the code in vb.net to browes for images of types jpg gif bmp in the same button ?
|
|
|
|
|
try following code
Private Sub cmdLogoGraphic_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLogoGraphic.Click<br />
Dim a As New OpenFileDialog<br />
a.Filter = "BMP Files(*.bmp)|*.bmp|Jpg Files (*.jpg)|*.jpg|GIF Files (*.gif)|*.gif"<br />
Try<br />
If a.ShowDialog = Windows.Forms.DialogResult.OK Then<br />
PictureBox1.Image = Image.FromFile(a.FileName)<br />
<br />
End If<br />
Catch ex As Exception<br />
mdChecking.Prompt("Incorrect file type, please choose correct file.")<br />
End Try<br />
<br />
End Sub
hope this helps
|
|
|
|
|
Could any one hep me in showing me the way to attache the form Class which includes its subs and events to the form instance created by assembly
Thanks in advance
Aiman Farouk
|
|
|
|
|
You're question doesn't make any sense. There is no "attach"ing a Form class. I have no idea what you're trying to do or describe.
|
|
|
|
|
First post here so please be patient, I wrote some software for the company that I work for in VB6 for Scheduling and quoting construction based projects and am upgrading to VB 2008, not a problem except for the printing, The user had several check boxes and option groups which related to which pages were printed, the first was a cover page, second page a preamble, third page list of doors etc all taken from different sources, in VB6 it was pretty simple to create a printer object (called myPrint) call the various page sub routines and to put it together example as below:
Select Case True
Case frmPrint.optAll(0).Value = True 'materials listing
MyPrint.NewPage
PProductListingA
Case frmPrint.optAll(1).Value = True 'bill of quantities
MyPrint.NewPage
PBOQsA
Obviously we've lost the NewPage which has been replaced with HasMorePages from within the PrintPage method, I've spent about a week now trying to call the various sub routines from within this and quite simply have hit a brick wall. Lots of examples on the web to point me in the right direction but they all seem to be based around a single block of text printed over various pages, help. I just need a pointer in the right direction.
|
|
|
|
|
I would think that you just pass the Graphics object in the print event args to the Sub that's going to render that particular page. You just have to check for which page your printing to know which Sub to call.
|
|
|
|
|
Thanks Dave, I've tried this in just about everyway that I can think, the problem is that each section could be a number of pages long and it seems that when I pass it as Printing.PrintPageEventArgs so that each sub routine can check to see if there are any more pages using HasMorePages, the event is fired from both within the subroutine and the main PrintPage routine! if I pass it as a Graphics object than there's no way of checking to see if it will fit on one page or how to add one if it needs more (the old VB6 way was easy)
|
|
|
|
|
|
Thanks Duncan - Its taken a while to sort out the logic, but like most things in VB once you have, you wonder why you didn't think of it before. Anyway its all sorted now so thnks for your help.
|
|
|
|
|
does anyone know where i can find a vertical progress bar control or better yet a thermostat control
|
|
|
|
|
See if this helps MSDN[^]
|
|
|
|
|
Graphics Server .NET (GSNetWin Widget)
http://www.graphicsserver.com/[^]
I don't speak Idiot - please talk slowly and clearly
I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury
|
|
|
|
|
ok so im a beginner just started taking classes. but i dont know how to install vb files for controls that ive downloaded.
|
|
|
|