|
Paul Conrad wrote: He didn't say anthing about just copying, but registering
True, but you don't register a service either I was just guessing that he hadn't installed them - vague question, guesswork answer
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Ashfield wrote: vague question, guesswork answer
Yes, precisely so
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I have done up a application whereby there is a while keep looping non stop. The result of the loop are display in the console but when i wanted to stop the application i can no longer do so as the loop just stay active all the way and when i wants to click the stop button on my form, my form shows it is not responding. I think using the event handler might be able to solve but i know how it works but still dun understand how to use it even though i read through msdn. Anyone can help??
|
|
|
|
|
Loop is running on your main thread where your GUI is hosted. So it blocks the UI messages and you will get a inactive UI.
Run the loop on a separate thread. Declare a "volatile" boolean variable and check it's value each time in the loop. If it is set to false, exit the loop. When "stop" button is clicked, set this variables value as false.
|
|
|
|
|
Ya.. that is wat i tot so at 1st. So i set active = false when i click stop but the problem now is once i start the application i cannot stop. The nv ending loop cos my my UI to hang so i can no longer click on the stop program.
|
|
|
|
|
Hi,
Everything that will or could take longer than a few tens of milliseconds should not occur on the
UI thread, it should be delegated to a separate thread (possibly a BackgroundWorker) instead.
That way your UI remains operational (so it will redraw when the window gets uncovered),
and allows you to implement a cancel feature.
|
|
|
|
|
Ya... Thanks i know that is the way out but when i went to msdn to understand more on delegate but i find it not as simple as i tot. I find it quite complication, so i came here to seek for any other solution or anyway to let me understand delegate.
|
|
|
|
|
can we automatically manage paging in datagridview in windows application through dataset
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
In .NET you can't really do much with the paging (I assume you are referring to memory paging). The Garbage Collection of .NET handles most everything. To speed up the process you can always cause Dispose() on IDisposable objects.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Answer:-
_SqlConnection = New SqlConnection(ConnString)
_SqlDataAdapter = New SqlDataAdapter("selectAllActivities", _SqlConnection)
_SqlDataAdapter.SelectCommand.CommandType = CommandType.StoredProcedure
Dim ds As DataSet = New DataSet()
_SqlDataAdapter.Fill(ds, j, 50, "t")
dSet = ds
J is starting position of Data
50 is the no of information which u want to display on grid
t is tablename
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Hello,
How can I make a label clickable? Like a signout link. Many thanks for any help
Aim small, miss small
|
|
|
|
|
Because VB6 does not have the LinkLabel control, you will have to add a regular label. In the OnClick(..) event of the label put the code. You could also try underlining the label and giving it a blue color, so it looks like a link. In the same event you can also put the code for making the label look like it is clicked: change the color of the label from blue to purple. I don't know if VB6 has the MouseHover event yet, but if it does you could change the mouse pointer into a hand.
Try Google aswell, there may be Third Party software for LinkLabels in VB6. Try Googling for "VB6 + LinkLabel control" or something like that.
Hope this helps you out,
--Zaegra--
Motivation is the key to software development.
|
|
|
|
|
Zaegra wrote: You could also try underlining the label and giving it a blue color, so it looks like a link
For some reason that made me laugh a little
Many thanks for this. That really works for me. And for the record I did try to google though I searched for "VB6+Label control+clickable" Yeah, I know...quite stupid
Aim small, miss small
|
|
|
|
|
Hi 2 All
I developed a desktop application using Microsoft Visual Studio .NET 2003 (VB.NET) with Microsoft SQL Server 2000 with no service pack installed.
I deployed this application on network (Windows XP on all computers clients as well as server), running fine. I mean accessing and showing data from server machine (i installed connectivity only on the client machine, not client and server tools).
The problem which i am facing is that reports (used built in crystal reports) are not visible on clients machines, when i access reports on server machine it is fine, but when i access reports from client machine a dialoge box appear which demands
Server
database
user name
password
Even if i provide all above informations the report is not visible.
Please help me that how can i view reports on client machine ...
thanks in advance ...
bye
Regards,
Arfan Qadir
|
|
|
|
|
Sounds like you are using a DSN for your data source, which exists on the server, but not on the client machine!
Either create a DSN on each client machine (if you have control of them and don't want to update your code in the system) or update your code to use a direct connection (ie: write your connection string in the code rather than using a DSN).
Hope this helps.
--------------------------------------------------------
Knowledge is knowing that the tomato is a fruit.
Wisdom is not putting it in fruit salad!!
|
|
|
|
|
I'm not sure if this question is okay to ask, but does anyone know how to save a Bitmap object to a WBmp file?
My current code is below, but it doesn't work properly (I think I'm doing something wrong with the bitshifting to pack 8 pixels into a byte):
Dim fs As System.IO.FileStream = System.IO.File.OpenWrite(newFilename)
Dim img As Bitmap = Image.FromFile(filename)
' Write Header
fs.WriteByte(0)
fs.WriteByte(0)
fs.WriteByte(img.Width)
fs.WriteByte(img.Height)
' Convert colour to 1bit and packet bits into byte
Dim iByte As Byte = 0
Dim iCurrentBit As Integer = 0
For x As Integer = 0 To img.Width - 1
For y As Integer = 0 To img.Height - 1
Dim clr As Color = img.GetPixel(x, y)
If (clr.R > 128) And (clr.G > 128) And (clr.B > 128) Then
If iCurrentBit >= 7 Then
iByte = iByte Or ((2 << iCurrentBit) - 1)
Else
iByte = iByte Or (2 << iCurrentBit)
End If
End If
If iCurrentBit >= 7 Then
fs.WriteByte(iByte)
iByte = 0
iCurrentBit = 0
End If
iCurrentBit += 1
Next
Next
fs.Flush()
fs.Close()
|
|
|
|
|
Hi,
here are some mistakes:
1) iCurrentBit += 1 should be in the else part of the
previous if otherwise you will cycle 0,1,...7,1,2,...7,1,2,...7
2) iByte = iByte Or (2 << iCurrentBit) is wrong, it should be
iByte = iByte Or (1 << iCurrentBit) since the bit values are 1, 2, 4, etc.
3) iByte = iByte Or ((2 << iCurrentBit) - 1) does not seem right; the integer
value of bit 7 is -128, not 255
There may be more.
BTW: the flush-close sequence does not make sense, flush is useful only if you don't immediately close!
|
|
|
|
|
Thanks, I've fixed the errors and found more.
I thought I'd post the fixed source code in case someone else finds it useful.
Dim fs As System.IO.FileStream = System.IO.File.OpenWrite(newFilename)
Dim img As Bitmap = Image.FromFile(filename)
' Write Header
fs.WriteByte(0)
fs.WriteByte(0)
fs.WriteByte(img.Width)
fs.WriteByte(img.Height)
' Convert colour to 1bit and packet bits into byte
Dim iByte As Byte = 0
Dim iCurrentBit As Integer = 7
For y As Integer = 0 To img.Height - 1
For x As Integer = 0 To img.Width - 1
Dim clr As Color = img.GetPixel(x, y)
If (clr.R > 128) And (clr.G > 128) And (clr.B > 128) Then
iByte = iByte Or (1 << iCurrentBit)
End If
If (x >= img.Width - 1) And (x Mod 8) Then
fs.WriteByte(iByte)
iByte = 0
iCurrentBit = 7
ElseIf iCurrentBit = 0 Then
fs.WriteByte(iByte)
iByte = 0
iCurrentBit = 7
Else
iCurrentBit -= 1
End If
Next
Next
fs.Close()
|
|
|
|
|
Great. Thanks for sharing.
|
|
|
|
|
Hi,
I want to play .pps/.ppt file without installing MS Office powerpoint component.
For now I am playing same in browser control which internally runs powerpoint executable file. if I dont have powerpoint installed, it stops playing.
Do we have any component/ocx which can play it without installing MS Office.
Thanks
|
|
|
|
|
Have you googled around for any third part component? If one exists, I am sure it'll cost some money. Why not just require Office to be installed and use the Office Interop Library?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Requiring office on the machine would be a way to offset costs to the consumer, instead of the programmer having to pay for a third party control
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios
Discounted or Free Software for Students:
DreamSpark - downloads.channel8.msdn.com
MSDN Academic Alliance - www.msdnaa.com
|
|
|
|
|
Thomas Stockwell wrote: Requiring office on the machine would be a way to offset costs to the consumer
That is true, but the user would be able to use more than just Powerpoint.
Thomas Stockwell wrote: programmer having to pay for a third party control
He could always pass on the third party control cost to the user(s).
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I know there are functions built into .NET that will resize images, but they don't do what i want. I am making an icon editor, and it needs to be able to resize images with a pixel resize. That is a type of resize where if you zoom in enough you can actually see the individual pixels of the original images, like Paint Shop Pro or Photoshop (or even paint) do. I have make an algorithm to do this, but it is unbelievably slow, and i need to make it do this almost instantly. I am using the Bitmap class and the Bitmap.GetPixle\Bitmap.SetPixle methods. Here is my algorithm:
Public Shared Function ResizePixles(ByVal image As Bitmap, ByVal factor As Integer) As Bitmap
On Error Resume Next
Dim rbmp As New Bitmap(image.Width * factor, image.Height * factor)
For x As Integer = 0 To image.Width - 1
For y As Integer = 0 To image.Height - 1
Dim c As Color = image.GetPixel(x, y)
For x2 As Integer = x * factor To x * factor + factor - 1
For y2 As Integer = y * factor To y * factor + factor - 1
rbmp.SetPixel(x2, y2, c)
Next
Next
Next
Next
Return rbmp
End Function
As you can see, i have 4 For loops in my code, which makes it very slow.
if (your.Life == lifestyles.Programming)
{
your.Cool = true;
}
else
{
your.Cool = false;
}
|
|
|
|
|
Hi,
I haven't used this myself as of late, but are you aware Graphics has an InterpolationMode property,
which accepts values such as NearestNeighbor, basically just duplicating pixels, not inventing new
ones?
If you only need to see it scaled up, use it in a Panel's OnPaint; if you really also need the
new Bitmap, do Graphics.FromImage(rnmp) then Graphics.DrawImage
|
|
|
|