|
I am trying to run this in VB.net(2001)
ii = " C:\Documents and Settings\HP_Owner\My Pictures\gearsho.jpg"
ShowMyImage(ii, 792, 698)
and I get this error message
************** Exception Text **************
System.NotSupportedException: The given path's format is not supported.
at System.Security.Util.StringExpressionSet.CanonicalizePath(String path, Boolean needFullPath)
at System.Security.Util.StringExpressionSet.AddExpressions(String[] str, Boolean checkForDuplicates, Boolean needFullPath)
at System.Security.Permissions.FileIOAccess.AddExpressions(String[] value, Boolean checkForDuplicates, Boolean needFullPath)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pathList, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.Path.GetFullPath(String path)
at System.Drawing.IntSecurity.DemandReadFileIO(String fileName)
at System.Drawing.Bitmap..ctor(String filename)
at CVICENI.Form1.ShowMyImage(String fileToDisplay, Int32 xSize, Int32 ySize) in C:\Documents and Settings\HP_Owner\My Documents\Visual Studio Projects\CVICENI\Form1.vb:line 175
at CVICENI.Form1.Timer1_Tick(Object sender, EventArgs e) in C:\Documents and Settings\HP_Owner\My Documents\Visual Studio Projects\CVICENI\Form1.vb:line 160
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr idEvent, IntPtr dwTime)
I have no idea what it means. Same program runs easily .wav and .rtf files from same directory with same mode of path. If anybody can help I would really be thankfull.
P.S. On the same computer VB4 has no problem with this.
Thank you Jirka
|
|
|
|
|
Jirikub wrote: ii = " C:\Documents and Settings\HP_Owner\My Pictures\gearsho.jpg"
you have a space at the beginning of the path - not sure if this was a typo or the cause of the exception!
|
|
|
|
|
Stupid and blind old geezer, that's me. I was playing with this for half a day and it was simple space.
Thank you for saving my sanity or what's left of it.
Jirka
|
|
|
|
|
No problem, but its weird because I tried to replicate the error by providing a File.Open command with a path beginning with a space and no error occured...maybe you're on .NET 2.0 and that is a new "feature".
Glad you got it sorted.
|
|
|
|
|
Hi all,
I have implemented Uploading and downloading data though serial communication. During the time of Uploading/Downloading there will be continuous exchange of data. Hence any other action on my GUI during Upload or Download operation will not be allowed (like Minimising/Maximising the form and Exitibng from the form).The GUI will hang untill the operation is complete. So to make the GUI flexible for the user i have used DoEvents in my program which will be called at some particular locations. This solved my problem. But i heard that using DoEvent may result in some problem. As the DoEvents performs all the events which are pending in the windows message queue, it may hang my application if there is an event which consumes lot of time.Please someone help me with solving this problem
Thanks in Advance,
Sushma
|
|
|
|
|
To keep the GUI responsive while executing a long-running task you should execute that task in its own thread.
This can be done manually, using the Thread class, using the ThreadPool (in .NET 1.x) or the BackgroundWorker (.NET 2.x)
|
|
|
|
|
Thank you very much for your response. I cannot go for .Net. I must implement it only in VB. Can you give me more details on how to make the GUI responsive while running a long task.
Thanx and Regards,
Sushma
|
|
|
|
|
can anyone tell me theupdate command that i can use at button_click event in VB.NET so that i can update data in datagrid and show the updated data in related EXCEL sheet.
|
|
|
|
|
|
Hi all,
I have created a small application that I need to put on a website for download. I want the application to run for free for 30 days after which time the user must contact us if they want to continue to use it. I don't want to have to deal with managing serial numbers for all machines that use the application. What is the best way to do this? Is it easy to code or is there a good third party tool that someone could recommend?
Thanks for any help.
Linda
|
|
|
|
|
Silicon Realms has an impressive product: http://siliconrealms.com/[^]
----------
There go my people. I must find out where they are going so I can lead them.
- Alexander Ledru-Rollin
|
|
|
|
|
hi i want to know how to read contents such as user name,email and other informations form active directory. using vb6
Tasleem Arif
|
|
|
|
|
|
hi i want to know that RTF controll is not working in mobile application using vb.net is there is any other controll like RTF that works with the mobile applications
Tasleem Arif
|
|
|
|
|
Are you using a windows control in a webpage? There is ASP.NET equivalents for password textboxes!
|
|
|
|
|
hi all,
i made a vb.net clas and wrote a fuction which select all fields of a columns in a db. I called it thrugh another project.
as u know function return only one value ... i want to know if there is a way to retrive all of rows (i mean fields) which i selected through the SQL query .... i cannt use data grid cause it is nt supported on a program which i call the method in
i need ur help ASAP please:->
Thanks alot
Hamody
|
|
|
|
|
I'm not sure how to do it with your approach but i did it by returning a table with a SQL UDF.
I don't think this approach is too friendly on the overhead, wont advise doing it with large amounts of data.
CREATE FUNCTION udfReturnMyData(<br />
@MyArg1 varchar(30),<br />
@MyArg2 int)<br />
<br />
RETURNS @v TABLE (Column1 int, Column2 int, Column3 Varchar(10))<br />
AS<br />
BEGIN<br />
<br />
insert into @v (column1, column2, column3)<br />
(SELECT Column1, Column2, Column3 From MyTable Where MyCondition = True)<br />
<br />
return<br />
END
I call this function from VB by doing a simple SELECT * FROM udfReturnMyData(MyArg1, MyArg2)
Hope it helps.
you can't forget something you never knew...
|
|
|
|
|
hi friends
plz tell me how to print a .TXT and excel file from VB.if we have a excel file on Hard Disk , how to print that excel file
plz give small code snippet
thanks in advance bye
take care
Rahul here
|
|
|
|
|
Use the Printer object to draw what you want on the printer.
For the excel file, the only way I can tell you is to add an Excel OLE to your form and open a file in that, then print the whole form using PrintForm . Ofcourse this only prints the visible parts of the sheet on the form....
|
|
|
|
|
Does anyone know if it is possible to search directories from the last folder created to the first in a given directory? I am using:
myFolder = Dir(MyPath, FileAttribute.Directory)
and this always starts the search in alphabetical order but I really need to search the last folder created so as not to go through every folder as the files being looked for are most likely in the most recent folders (there are many folders so it's a bit slow this way).
I am using vb.net, is there a better way for folder searches?
Hope this makes sense!
Cowtech
-- modified at 1:41 Thursday 20th April, 2006
|
|
|
|
|
This is one of another ways. you can get subfolders of your main folder
You need a list box here,
For Each foundDirectory As String In My.Computer.FileSystem.GetDirectories("E:\", FileIO.SearchOption.SearchTopLevelOnly, "*")<br />
ListBox1.Items.Add(foundDirectory)<br />
Next
You can get directory’s creation date and time to an array like this
Imports System.IO<br />
.<br />
.<br />
.<br />
<br />
Dim folderCreatedDates(ListBox1.Items.Count) As Date<br />
<br />
For i = 0 To (ListBox1.Items.Count - 1)<br />
folderCreatedDates(i) = Directory.GetCreationTime(ListBox1.Items(i))<br />
Next i
And use for loop statements and Array.Sort(FolderCreatedDates) to sort them according to created date
Regards,
Chatura Dilan
|
|
|
|
|
Thanks Chatura
I thought of doing exactely what you have explained here although I wouldn't
be using a listbox. Thought there might have been a simple way for the dir function to start the search in reverse order, not to be I think.
Thankyou for your input.
Cowtech
|
|
|
|
|
hello
i have declared a varible in public section of class like this:
" Partial Class addnewsite
Inherits System.Web.UI.Page
Public cat_id As Integer"
i have assign a value in add_click module.
and i want to use this variable value in another sub_click module.
when i access the variable then it take 0 instead of that variable value.
i'm firing the add event first and after it sub event.
what is the reason..plz give me some solution
|
|
|
|
|
Can't tell you much without seeing the relevant parts of the code. You description doesn't shed any light on what your code looks like, what it's doing, are what the problem might be.
Copy and Paste your code into a post, DO NOT retype it!
Dave Kreskowiak
Microsoft MVP - Visual Basic
-- modified at 9:56 Thursday 20th April, 2006
|
|
|
|
|
If what you are trying to modify is the integer cat_id, you must pass it by reference to any code that is expected to modify it. value types are passed by value by default, and so can't be modified, only read.
If this doesn't help, then do as the previous answer said, and post the relevant parts of your code. Declarations aren't enough.
We need to graduate from the ridiculous notion that greed is some kind of elixir for capitalism - it's the downfall of capitalism. Self-interest, maybe, but self-interest run amok does not serve anyone. The core value of conscious capitalism is enlightened self-interest.
Patricia Aburdene
Bulls make money, bears make money, pigs get slaughtered.
Jim Cramer
|
|
|
|