|
It is indeed the 1st week of March.
Looking at weeks on a calendar, or the number of weeks in the year, is different.
March 5th is in the 2nd workweek of March, or the 10th week of the year. Different context.
He was a snowflake, like other "unique" snowflakes, falling down, getting stepped on, and pushed aside to disappear.
|
|
|
|
|
ChandraRam wrote: Would you consider that the 5th of March 2007 is the first week of March then?
Yes (5-1)/7+1 = 1
|
|
|
|
|
That depends on if you consider a week to belong to a certain month, or if you consider a week to be able to belong to two months.
If the first of a month is a sunday, do you consider that single day to be the first week of the month, or does the week belong to the previous month?
---
single minded; short sighted; long gone;
|
|
|
|
|
Anyone have any idea where I can find information on updating MS Outlook records from a VB .NET application? I've been asked if my application can post scheduling information to Outlook's Calendar. I'm trying to find out if that is even feasible.
|
|
|
|
|
|
I had written about this earlier, but the application does not work..
I have the server return in its response, an url to an xml file, say
urlPath = "http://abc.xyz.com/tmp/ordera5fgscfs122dfbvgefsdsd.xml"
I want that when the client receives the url to an xml string in the response it saves the xml file to a particular location specified earlier; say
folderPath = "C:\"
I am using the following code:
Dim xmlDocToSave As MSXML2.DOMDocument40
xmlDocToSave.loadXML (urlPath)
xmlDocToSave.save (folderPath)
But this is not saving the xml file into the folder location.
Can anyone please help, I want to know how should I save the xml file sent by the server. It is urgent
|
|
|
|
|
It's a bit difficult to follow your explanation. Is this server-side code and you're trying to save a file on the client machine? If so, then you can't do what you want. You have no control over where a client browser saves a file. You have to send the file in the Response stream with the proper encoding, then the browser will ask the user where he/she wants to save the file, just like if you were to download a .ZIP file.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanx for your reply. I got it working.
This is a client side implementation. The client receives an url to an xml file in the response and wants to save the xml file.
The changes I had to go were as follows
Say for instance, the server return in its response, an url to an xml file, urlPath = "http://abc.xyz.com/tmp/ordera5fgscfs122dfbvgefsdsd.xml"
I want that when the client receives the url to an xml string in the response it saves the xml file as follows,
filePath = "C:\saved.xml"
Now I am using the following code:
Dim xmlDocToSave As New DOMDocument40
xmlDocToSave.Load (urlPath)
xmlDocToSave.save (filePath)
This will save the contents of the xml in 'saved.xml' in C:\
|
|
|
|
|
Hello,
I have made a custom control with a few textboxes, checkboxes and so on.
There is a event (public Event TextChanged (Controlnr as Int16, Text as string)
It works fine if I put the control(s) on the form, then I can choose that control and write code for the event
But I don't know how many controls I need (depends on the user), so after loading the form I add the first control by writing code Me.controls.add (control)
The question is how can I capture the event(s) ?
With a dropdownitem you can write menu.DropDownItems.Add("Name", Nothing, Eventhandler) is this also possible with an custom control and how ?
Thanks
|
|
|
|
|
You can add event handlers at runtime by using AddHandler. For example lets say I create a button at runtime, this would be the code to link the buttons click event with a given method.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim btn As New Button
Me.Controls.Add(btn)
AddHandler btn.Click, AddressOf RuntimeButton_Click
End Sub
Private Sub RuntimeButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
MsgBox("You clicked a button added at runtime")
End Sub
End Class Your custom control is no different. It's a control just like a button. Just create a method that excepts the same parameters as your event. Then use AddHandler to link each control you make with that method.
Also, all .net events have a sender object and 'e' which is or inherits from system.eventargs. I would recomend for consistency staying with that pattern. You can read more about creating your own events here[^].
|
|
|
|
|
Thanks, it realy helped me
|
|
|
|
|
Hello,
After installing my VB.NET application on client computer I click on search button on my first form and I am getting "Object Reference is Not Set to an Instance of an Object" error.
Does anyone know why?
thanks
programmer
|
|
|
|
|
Usually this will occur if you haven't created an instance of an object. By using the 'New' keyword to an object to create an instance.
Hope this help.
|
|
|
|
|
Like Jack said, you got this error because you tried to set a property or call a method on an object that didn't exist. Perhaps your code tried to retrieve an object from another method and just assumed that it got a valid object when it actually got back Nothing instead?
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Does anyone know if there is a way to configure the MSHFlexGrid control so it doesn't highlight the first non-fixed row when the user clicks in a fixed row?
|
|
|
|
|
Hi.
I have console application installed on the servers, which I'm trying to run by calling it from a batch file.
In the batch file, I specify UNC path to the application 1 paramter: path to the folder.
Example:
\\server\directory\app \\server\dir\datafile\
The application doesn't see the path to the folder and returns back with "Directory doesn't exist" error (it does run the application though). When I change UNC paths, within the batch file, to noraml (proper path to the application and path to the folder using C:\... etc.) URLs the application works without any problems. If I only change folder path to C:\... it can't see the path as well.
I know that it got something to do with the security issue within .NET. Is there anyway around it. It looks like the app. just can't understand UNC paths.
Please help.
Thank you, Alex.
|
|
|
|
|
It's patially a security issue, since managed code is not trusted from ANY network source, and it also appears to be a problem with your app not being able to handle UNC paths. Or, there is a permissions issue with the path that you're giving your app.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
The server it installed on has access to the path so I don't think it's a permission issue. We've tried to give permission to everyone for this folder and still had problems. By the way the initial test of the application was trying to access share on the same server and failed. Do you know any way around it? We will be calling batch from another computer and we need to use UNC paths.
|
|
|
|
|
how to change an exsisting items image.?
exsample i have 5 items in listview:
Man
Wooman
Animal
Thing
Star
And all those items have same icon like ( ) buth when you click the
button i wish that item animal changes the icon into ( )...
Esample....
Thanks!!!!!!!!!!!!!!!!!!!
|
|
|
|
|
please i need answer...
|
|
|
|
|
If you have put all the images in a imagelist then...
if (listview1.items(0).selected = true ) then
listview1.items(0).imageindex = 1
' do other stuff
end if
'check for the image index of your imagelist to display the proper picture.
|
|
|
|
|
This has to be a problem that's been solved a million times.
I need my website to create pages on the fly from a database.
Because I want Google to like my site, I don't want to use arguments: www.sitename.com\thePage?Arg1&arg2
So if you will imagine that I have a link to a page that looks like: www.sitename.com\page_arg1_arg2.aspx...
The two options that I've tried are
1. Use 404 error trapping - but I get the error message in the browser which is ugly and probably disdained by Google.
2. Use virtualPathProvider, and virtualfile. I like this solution, but I can't get it to work. Specifically, the virtualfile.getfile call is never accessed for the aspx. It is only acccessed after an aspx file is interpreted (say for a jpg).
To complicate this further, I'd like to use an existing page, but pass it arguements. I'm supposing that I would have a line of code like this:
new LikeThisPage(arg1,arg2)<br />
, then somehow used an htmltextwriter to render it to a stream.
Any ideas?
Thanks,
rant
Everyone else's job looks easy
|
|
|
|
|
You might want to ask this queston in the ASP.NET Forum[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I m starting to develop my new applications with VB.NET..
I have a lot of experience in vb6 and i created applications using vb class to manage ADODB connection and ADODB recordset..
I would like to create basic classes to interoperate with records (ex. movefist, movelast, findfirst) and use them in my specific objects.
I searched if some sample was inserted in internet, but i didn't find any solution.
Can anybody help me to find what i m searching for??
Thanks in advantage for your help..
LORENZO
|
|
|
|
|
Lorenzo wrote: I would like to create basic classes to interoperate with records (ex. movefist, movelast, findfirst) and use them in my specific objects.
I searched if some sample was inserted in internet, but i didn't find any solution.
ADO.NET works differently.
You might want to read up on the following classes: DataSet , SqlDataAdapter , SqlDataReader , SqlConnection , SqlCommand
|
|
|
|