|
I just want to make sure you know, the spam you get as a result of your post, is not from this site, or even people who use this site, but automated programs that search the web for people silly enough to post addresses like that.
And, what Dave said. If you want it, write it, or pay someone to write it. Ask us when you've tried to do it yourself and get stuck.
Christian Graus - Microsoft MVP - C++
"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 have a crystal report that displays records from a database.Each record has a number field "QTY". I want to display at the end of each page the sum of this field for all records in this page... ,and in the last page i want to display the sum for the page and the sum for all records in report.
Thank you
|
|
|
|
|
Check out the Running Total Fields in the field explorer while editing your Crystal Report.
|
|
|
|
|
thank you
i used the running total fields , but with this i can create a sum field for all records .I want to create a sum field for each page .for example :
Page 1 :
QTY
5
6
7
Sum 18
Page 2 3
5
2
Sum 10
Report Footer
Total Sum 28
|
|
|
|
|
|
Hi!
I know how to save an image into an Access DataBase in a binary format and retrieve it in a memorystream and display it in a picturebox, only problem is .Gif files.
I found the way to save(.Gif Files) into a Database, but when I try retrieving it, it gives an Error.
I need help very urgently.
any help will be extremely appreciated.
|
|
|
|
|
A GIF file is no different than any other image file. If the code works for one file format, it'll work for another, PROVIDED that the code is written properly.
What's the code you're using to store the image and retrieve the image look like?
|
|
|
|
|
If it is very very very urgent you maybe could read the error message, look at the stack
traceback, and use line numbers to locate the problem. We can't.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
well,
Dim img As Object = dataset.Tables(0).Rows(0)(0)<br />
<br />
Dim imgObject() As Byte = CType(img, Byte())<br />
<br />
Using theMemStream As New IO.MemoryStream()<br />
<br />
theMemStream.Write(imgObject, 0, imgObject.Length)<br />
theMemStream.Position = 0<br />
<br />
PictureBox1.Image = Image.FromStream(theMemStream)<br />
End If<br />
End Using
this is the code that I used, but it gave me this error:
first Error:
"A generic error occurred in GDI+"
Error Code = "-2147467259"
Second Error: (on cont...)
"Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang."
Third Error: (on cont...)
"Attempting to call into managed code without transitioning out first. Do not attempt to run managed code inside low-level native extensibility points, such as the vectored exception handler, since doing so can cause corruption and data loss."
|
|
|
|
|
This code is barely passable for reading image data and reconstituting it. What does the code look like that wrote the image to the database? After all, what good is the code that reads it (even if good) if the code that wrote it didn't do it correctly?
|
|
|
|
|
Hi,
your error code is 0x80004005 (E_FAIL), its most likely cause is a bad image file.
Assuming the exact same code runs fine with other image file types, I suggest you
try another GIF file (preferably originating from a completely different source).
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hello guys,
I like your advice.
I am programming a windows service in vb.net 2003 and I'd like to have the windows service run a windows form that provide me status information concerning the tasks of the service. And to make it more nice, minimize the form to the system tray.
How I do this properly?
I have done the following:
<br />
Private test As Thread<br />
Public Shared fStatus As New FormStatus ' The windows form<br />
<br />
Protected Overrides Sub OnStart(ByVal args() As String)<br />
' Create the windows form thread<br />
test = New Thread(New ThreadStart(AddressOf Me.dotest))<br />
test.Start()<br />
<br />
' The real Service work<br />
Communication.StartCommunication()<br />
End Sub<br />
<br />
Private Sub dotest()<br />
fStatus.Show()<br />
End Sub<br />
With this code, the form disappears almost immediately. If I use ShowDialog() instead of Show(), the notify icon does not process the click events.
Can anyone give me a nice advice to solve this issue?
Thanks.
|
|
|
|
|
I'v never done this before but from the top of my had I see at least one problem (obstical):
a service can run without a user being logged in and if this is the case I doubt that you'r form will show, I think it probably will generate a error or at least some strange behavior. So you'll have to check wheter or not there is a user logged in.
as to why the form disappears I don't really know but I would try putting the 'real service work' also in a sepparte thread.
I don't know if it will solve the problem but it's worth a try I think.
I think that if you always want a form to be displayed and the communcation.startcommunication only has to work if a user is logged in it probably be best that you write it in a windows form application and put that application in the startup of the user.
I'v only experimented with services a few times but I can tell you that if you try to do to much in them they start acting strange
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
You have completely the reason.
Is there a way to separate the two from each other, the service is running in the background, and when you log on, you start the application, that uses functions/methods of the service?
Does anyone has experience with this?
|
|
|
|
|
You normally would use two different projects. You write a Windows Service that does it's job, but also starts a server, be it a socket server that talks like an email server does, or a .NET Remoting server, or something using WCF. There's a bunch of different ways of doing it.
The second app would be run by the user and would connect to the services server to issue commands and get status information.
|
|
|
|
|
Well, thanks for the advice. In the meanwhile I implemented a NET remoting system among the 2 different projects.
And it works great. Sending a message to the server, it does some action and than respond to the status application.
|
|
|
|
|
Hi guys, does anybody out there now how you embed audio files into the .resx file?
I can only do the strings and images, but I couldn't figure out how to embed audios. Just to clarify a point, i can embed the audio files into the .resx file but i can't link to the audio file, i think i just have the syntax incorrect, as i mentioned earlier, i can call the images no problem from the .resx file with any image file, just not the audio files.
(This is for Visual Studio.net 2005)
Brian Hull
-- modified at 7:20 Wednesday 12th September, 2007
|
|
|
|
|
Open your projects properties. Click on the Resources tab. At the very top of this page, there is a drop down (default says "Strings"). Click on the arrow for the drop down and change it to Audio.
|
|
|
|
|
Sorry for being so vague with my query in the first place. I can add audio to the resource file, i just didn't know how to call the file during run time.
I have since found out that i needed a sound class in place and then i just use sound.filefromsource command.
Many Thanks for your help though.
Brian Hull
|
|
|
|
|
dear friends
i have a doubt in visual basic 6.0.
the function hex(number) is not working in one of my projects (the same used to work some days ago) in same work space.
the same works in other new work spaces,
can any of you there kindly explain the reason and the solution for this,
like, if any reference has to be made or any thing else.
and also it would be grateful if any body explains me the use of defining option explicit in a VB application.
please help, its urgent.
thanks in advance.
|
|
|
|
|
Maybe you can post the code that you are using. I don't have any experience with VB, but in VB.NET I use the following function:
<br />
'---------------------------------------------------------------------------<br />
'<br />
' Function: ToHex()<br />
' Input: x<br />
' Return: out<br />
' Purpose: Converts Integer to Hex<br />
' <br />
'---------------------------------------------------------------------------<br />
Public Shared Function ToHex(ByVal x) As String<br />
Dim out As String = Hex(x)<br />
<br />
If (out.Length < 2) Then<br />
out = "0" & out<br />
End If<br />
<br />
Return out<br />
End Function<br />
|
|
|
|
|
dear,
ur answer seems to be near.
but u have used Hex() here.
my question is clear.
and it is as well mere.
in my project Hex() is not working, that's what i fear.
the same used to work prior.
thank you.
|
|
|
|
|
The funciton itself does not break. The only thing that can go wrong is if the data you're feeding the function is now different and not what the Hex function expects.
|
|
|
|
|
Hello Friends ,
I am new in xml , i want use xml as database like sqlserver. how can i
fire insert ,update ,delete command for xml database .
Manu
-- modified at 5:50 Wednesday 12th September, 2007
|
|
|
|
|
You don't. XML is not meant to be used as a database and has poor performance when used as such.
XML also doesn't understand SQL commands.
|
|
|
|