|
First try moving fs.dispose up a few lines. If the stream hasn't been disposed the file will still be locked I believe. You did give write permission, but even so this will ensure you have full access to the file. Once you've created the bitmap you can dispose of the stream so just do it after the bitmap gets made. Try that first. You may still get an error from the sounds of it. I got that same error for completly unknown reasons. As far as I could tell it was a glitch. I closed VS 2005 and re-opened it. I then used the exact same code and it worked. Also just to re-create the code that I used perfectly don't use FileAccess.write. If you move the dispose code up and remove FileAccess.write the code should work. If it doesn't you may be experiencing the same glitch I came across. In that case I'm not sure what to tell you. To double check try creating a new project and use just the code to create the bitmap from the stream. Try the code and if it works move that code to your current project. If it then fails we know there is a problem.
|
|
|
|
|
Hi all
I use a DropDownList control in my web application but my problem is that the selectedindexchanging event dose not work well and first value of that control is selected
Please help me
Thanks a lot
|
|
|
|
|
Do you have autoPostback set to true on the dropdown? If you don't you need to set it to true.
Ben
|
|
|
|
|
Hi
Yes I do this job.
Thanks in advance
|
|
|
|
|
I have a date string which is YYMMDD and I want to check if it is valid. I used the ISDATE(MyDateString) syntax with a valid date, but it returns false. Is there another function available I can use?
Any help is appreciated
Lost in the vast sea of .NET
|
|
|
|
|
Can you check this function by use the "/" character?
|
|
|
|
|
Here is what I did. tbxCourseDate3 is YYMMDD. Example 070329.
Dim strDate As String = Mid(tbxCourseDate3.Text, 3, 4) + Mid(tbxCourseDate3.Text, 1, 2)
strDate = strDate.Insert(2, "/")
strDate = strDate.Insert(5, "/")
If IsDate(strDate) = False Then
....
Thanks for the help.
Lost in the vast sea of .NET
|
|
|
|
|
You can use the DateTime.TryParseExact method with the format string "yyMMdd" to attempt to parse the string.
---
single minded; short sighted; long gone;
|
|
|
|
|
If Mid(txtDate.Text, 3, 1) = "/" And Mid(txtDate.Text, 6, 1) = "/" Then
If Val(Mid(txtDate.Text, 7, 4)) < 1900 Or Val(Mid(txtDate.Text, 7, 4)) > 2078 Then
lblmessage.Text = "Invalid Date..."
Exit Sub
End If
If Not IsDate(Mid(txtDate.Text, 4, 3) & Mid(txtDate.Text, 1, 3) & Mid(txtDispatchDate.Text, 7, 4)) Then
lblmessage.Text = "Invalid Date..."
Exit Sub
End If
strdate = Mid(txtDate.Text, 4, 3) & Mid(txtDate.Text, 1, 3) & Mid(txtDate.Text, 7, 4)
lblmessage.Text = ""
Else
lblmessage.Text = "Invalid Date..."
Exit Sub
End If
All sorrows will be forget...,When u think ur most lovable one...,
Mag,
|
|
|
|
|
I noticed from the msdn help that posting a large message to the event
log is a bad practice. Logging a path to a file is better in this
instance. Is it possible to send a hyperlink in an event log message
that references an XML file that has a processing instruction to be
transformed by an XSLT file? I'd like the user to be able to click the
hyperlink in the event log and have a formatted html page open in a
browser.
Is this possible or is it a bad practice?
Thanks in advance,
|
|
|
|
|
|
hi
hi i want to create a setup for the application developed by me in vb.net 2005 which should ask for the license key when u try to install it
if u dono the license key the installation should be forced to abort
how to do that
pls reply asap
thank u
with regards
Balagurunathan.B
|
|
|
|
|
|
Why are you asking the same question, over and over again ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i dint get a correct reply more over that if its 24hrs late no one looks at that question so i did that
with regards
Balagurunathan.B
|
|
|
|
|
hi
hi i want to create a setup which should ask for the license key when u try to install it
if u dono the license key the installation should be forced to abort
how to do that
pls reply asap
thank u
with regards
Balagurunathan.B
|
|
|
|
|
|
Sir/Madam,
Can i programically open the outlook to send the mails in vb.net 2005 Window Applications.
Thanks And Regards
Pankaj
|
|
|
|
|
|
Hi this code in c#...,How to write in vb.net...,
string strinput;
char[] chararrinput=strinput.ToCharArray();
Byte[] arrbyteinput=new byte[chararrinput.Length-1];
specially,this line "Byte[] arrbyteinput=new byte[chararrinput.Length-1];"
becoz here they are converting that character in to byte....
how to write in vb.net
if any one knows plz help me....,
-- modified at 6:53 Thursday 29th March, 2007
-- modified at 7:33 Thursday 29th March, 2007
Magi
|
|
|
|
|
Dim strinput As String<br />
Dim chararrinput() As Char = strinput.ToCharArray<br />
Dim arrbyteinput() As Byte = New Byte(((chararrinput.Length - 1)) - 1) {}
Tirtha
"A man can ride on your back only when it is bent....."
|
|
|
|
|
ya its accepting....,
but whats the use of that open and close braces?,
with out that braces its not accepting that line......
-- modified at 7:42 Thursday 29th March, 2007
-- modified at 7:46 Thursday 29th March, 2007
Magi
|
|
|
|
|
I have developed software in Vb.Net I want to run my application when system starts. I put my Exe file in Startup and its working fine. But I want that my application run through .Ini File.
|
|
|
|
|
fahedakhter@hotmail.com wrote: But I want that my application run through .Ini File.
what do you mean ?? ini files are just a text files
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
I would guess you put the acutal exe file in the startup. I think what you want to do, is leave your exe and ini files in a folder on the c drive. Then put a shortcut to your exe in startup. That way your exe will be running in that folder with your ini file.
Hope that helps.
Ben
|
|
|
|