|
You might want to read up on Localization[^] first.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi there
when I try to run my Vb.Net application into the client site I get an error whenever I run any report and the error is query engine error,
please help me...I have nothing wrong the datatables nor datasets then why does the problem appear
thanks
|
|
|
|
|
It would appear that your database isn't where the report expects it to be. Are you using an Access database? Did you hard-code a path to this database that exists on your development machine, but doesn't exist on your clients?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi
i am using sql database and the path is correct
|
|
|
|
|
|
try by using SaveFileDialog and OpenFileDialog
_____________________
Proud to be Albanian
_____________________
|
|
|
|
|
The image does not contain information on from what file it was loaded.
---
b { font-weight: normal; }
|
|
|
|
|
campbells wrote: when i see the debugging process most value bring it was 0 or null....
How do you mean ? You're value for num is always 0 ?
campbells wrote: sory to said that i cant use the "for loop" cause i cant use too much array where my system cannot handle with it so used in the old method.
Rubbish. This is just a pile of rubbish, sorry.
The core problem is that the code is a mess. Hard to read, hard to maintain, if a single extra line ends up in the text file, it will all fall over. Your data should be comma delimited so that one line of text is one record, that would make things a lot better than they are now. Then you should be using string.split to turn that into an array of values, and a switch statement to read the data based on the first value.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
ohh~ i solve the problem!! is nothing wrong with my code but is my label set to visible false when my form load so i cant see anything hahahah :P
|
|
|
|
|
i hav installed VS.NET2005 Team suite last week.When i goto MSDN help is shows followng error window message:
Error: Could not complete the operation due to error 80041001
Im using XP-SP2,IE7.
plz help, thanks in advance
-- modified at 8:43 Monday 27th March, 2006
|
|
|
|
|
Well, two things. First, IE7 is in Beta and is not garanteed to work with the Help System. So go back to IE6 before you continue to troublshoot this problem. Second, IIRC, 80041001 is akin to "File not found" or some other reason that a file could not be opened. This could be permissions issues, path not found, a bad installation (try reinstalling the MSDN library), corrupted file, ...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I have a little app I'm writing to crop images and so far it works - except that once I've created a cropped version of my original image (as a Bitmap or Graphics object) I can't then convert it into an Image object to reshow in my PictureBox control.
Some background: first I load the jpeg image into an Image object then assign it to the PictureBox. I then use the MouseUp, MouseDrag and MouseDown events to allow the user to draw a rectangle on the PictureBox.... when the user clicks a crop button I do the code below:
Dim x, y, w, h As Single
'These variables are from the mouse positions caught with MouseUp and MouseDown
'on the PictureBox control which is showing the image loaded from a JPG file.
'They define the rectangle the user has drawn on the Image in the PictureBox.
x = intMouseXStart
y = intMouseYStart
x2 = intMouseXEnd
y2 = intMouseYEnd
w = intMouseXEnd - intMouseXStart
h = intMouseYEnd - intMouseYStart
'Get the source bitmap from the PictureBox control.
Dim bm_source As New Bitmap(picImage.Image)
' Create parallelogram for extracting original image.
Dim ulCorner1 As New PointF(x, y)
Dim urCorner1 As New PointF(x2, y)
Dim llCorner1 As New PointF(x, y2)
Dim destPara1 As PointF() = {ulCorner1, urCorner1, llCorner1}
'Create rectangle as the size of the source area of the image to crop
Dim srcRect As New RectangleF(x, y, w, h)
'Clear the PictureBox and display the cropped image
Dim g As Graphics = Graphics.FromHwnd(picImage.Handle)
g.Clear(picImage.BackColor)
g.DrawImage(bm_source, destPara1, srcRect, GraphicsUnit.Pixel)
So, basically I want to take what the last line above does and create an Image object out of it so I can then reassign it to the PictureBox control and do other stuff with it... I've tried all sorts of things but can't work it out - any help would be appreciated.
TIA...
Mike
-- modified at 5:32 Monday 27th March, 2006
|
|
|
|
|
Why do you wan't to create an image object to assign to the control?
You are drawing on the image object in the control, so creating a new image object would mean that you simply duplicate the image in the control and replace the image in the control with the identical copy of it. Nothing is accomplished but a waste of resources...
---
b { font-weight: normal; }
|
|
|
|
|
I guess you're right - problem is my little crop app is part of a bigger app where I have quite a few tabs and dialogs where I want to use the same Image object so I was hoping to convert the final graphics object back into an Image for that reason. Guess I'll just have to either save it to a temp file and load it back in (not efficient!) or just change my whole app to use a graphics object rather than an Image... bit of a nuisance though.
The thing is that you can create a Bitmap or Graphics object from an Image object but you don't seem to be able to go the other way... that's what I really wanted to know.
Cheers,
Mike
|
|
|
|
|
You can't use a Graphics object instead of an image. A graphics object doesn't have any canvas of it's own, it just draws on other stuff, like a Bitmap object or the screen. When you create a graphics object for an image, you don't convert the image into a graphics object, you just set the graphics up for drawing on the image. As the graphics object doesn't hold any image data itself, it can't be converted into an image.
There is no problem in sharing the same image object between several controls. You only have to invalidate all the controls that use the image for any changes in the image to show up in the controls.
---
b { font-weight: normal; }
|
|
|
|
|
Hey
I have tryed to get date(Monday) by a week nr and year but this do not always work.
Here is my code
<br />
Public Function getDateByWeekNr(ByVal inWeekNr As Integer, ByVal inYear As Integer) As DateTime<br />
Dim cal As New System.Globalization.GregorianCalendar<br />
Dim dTime As DateTime<br />
<br />
dTime = New DateTime(inYear, 1, 1)<br />
<br />
For i As Integer = 0 To 365<br />
If dTime.DayOfWeek = DayOfWeek.Monday Then<br />
Exit For<br />
Else<br />
dTime = dTime.Subtract(New TimeSpan(24, 0, 0))<br />
End If<br />
Next<br />
<br />
Return cal.AddWeeks(dTime, inWeekNr)<br />
End Function<br />
what am i doing wrong?
|
|
|
|
|
You could use something like this
[CODE]
Dim dTime As DateTime
dTime = New DateTime(2006, 1, 1)
Dim wkCtr As Integer
Dim inWk As Integer
While 1
If dTime.DayOfWeek = DayOfWeek.Monday Then
wkCtr += 1
End If
If dTime.DayOfWeek = DayOfWeek.Monday And wkCtr = inWk Then
Exit While
End If
dTime = dTime.AddDays(1)
End While
[/CODE]
|
|
|
|
|
Thanks, i will tray that, is this working even if the1 week of a year started last year?
|
|
|
|
|
Thanks, i will try that, is this working even if the1 week of a year started last year?
|
|
|
|
|
Thanks, i will try that, is this working even if the week of a year started last year?
|
|
|
|
|
Glad to help you. This will give you the Nth Monday of an year.
|
|
|
|
|
Is it possible to determine user's logon time using vb scripts
|
|
|
|
|
|
Hi, thanks for the reply,i need to determine the time users log on to the domain in an active directory environment.
"Set objUser = GetObject("LDAP://CN=******)
Set objLastLogon = objUser.Get("lastLogonTimestamp")
intLastLogonTime = objLastLogon.HighPart * (2^32) + objLastLogon.LowPart
intLastLogonTime = intLastLogonTime / (60 * 10000000)
intLastLogonTime = intLastLogonTime / 1440
Wscript.Echo "Last logon time: " & intLastLogonTime + #1/1/1601# "
I got this on the microsoft website but it hasn't worked.
|
|
|
|
|
Well, the lastLogonTimestamp property is not replicated between domain controllers very often, measured in days, depending on policy settings! So, each domain controller can have a different value for the same user!!
There is no event the says this value changed either so you'll have to poll each and every user object on each and every domain controller to get an accurate time for each user. This is VERY resource intensive on both the network and the domain controllers. If you do this in a production environment, you have to be VERY careful about how often you poll for this information.
Also, there is a known problem with the lastLogonTimestamp and NTLM authentications... http://support.microsoft.com/default.aspx?scid=kb;en-us;886705[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|