|
go to hell.... throw ur system away.. its no use for u....
|
|
|
|
|
A Programming Language.
Any other doubt?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Do you really went this? Or you tried to ask any other else?
Regards,
Arun Kumar.A
|
|
|
|
|
VB is short for Visual Basic.
Why do most people from india say "doubt" when they mean "question"? Are they the same word in hindi?
---
single minded; short sighted; long gone;
|
|
|
|
|
Odd thing was, he had VB/SQL Programmer, down on his user profile. He put VB down and not know what it is? Or maybe he was asking a different question and didn't word it well
|
|
|
|
|
I saw that too. Makes me think he's just another troll.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Dave Kreskowiak wrote: Makes me think he's just another troll.
I started to think the same with the progressbar thread down below, poda poda
|
|
|
|
|
Actually it's a doubt: a question needs a question mark...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Guffa wrote: Are they the same word in hindi?
No, they are not same..
Regards,
Arun Kumar.A
|
|
|
|
|
Well,
There are morethan 25 languages in India, not only Hindi, and may be its the same in one of these languages
just jocking
Vilsad P P
MCTS (Windows Applications) .Net 2.0
|
|
|
|
|
I want to create crystal report dynamically i.e from connection to data field every thing I want to do through programming.
if it is Possible, please help me.
Reards,
Suman
|
|
|
|
|
suman.. plez, make your qusstion clear..
|
|
|
|
|
I have created a report on D: Drive and Database(MS-Access) is also in D: Drive.But When I have copied the programme in E: Drive, it is not working.
I think I need to make the connection through coding.
Regards,
Suman
|
|
|
|
|
i hav some huge amount of data loading into a grid... so i want to show a progresbar which shows the % completed . how do i do it..??
|
|
|
|
|
The progress bar you have to set the min and max value and call the increment method when you have made some progress. You can also set the value directly. So your problem is know how far along are you in loading your grid. I am guessing you probably don't know that. So the best you can probably do, is put a timer control which executes every second. When the timer method runs increment the progress bar and refresh the form with Application.DoEvents. So then you users will think some progress is being made.
Ben
|
|
|
|
|
Ben,
where do i get this 'Application.DoEvents'...?? i'm using vb
|
|
|
|
|
Sorry for some reason I thought you were using vb.net It is a .net thing. I am not sure what it is in vb 6
Ben
|
|
|
|
|
First figure out a way to calculate your 'amount of data loaded' into a percentage value.
Then add a progressbar onto your form and use this code in your loading sequence:
ProgressBar1.Value = percent_data_loaded
That's it.
|
|
|
|
|
|
Dileep_Vickey wrote: poda poda
|
|
|
|
|
are you a malayalee, why are you bullying people
Vilsad P P
MCTS (Windows Applications) .Net 2.0
|
|
|
|
|
Xandip wrote: i hav some huge amount of data loading into a grid...
Why? The user only has so much screen space...
Xandip wrote: so i want to show a progresbar which shows the % completed
This depends on where your code is spending all of it's time waiting. It 's waiting for a database query to return, there's nothing you can do to make a ProgressBar work. You need to use something that actually returns data in chunks in order for a ProgressBar to work. You can fill a DataSet object yourself using a DataReader, like this example[^], but this method is slower and will take longer to build your DataSet.
Another version of a ProgressBar doesn't really show progress. Instead, it just shows something is going on, kind of like the Windows XP installation "little green boxes" that march along during the install. They don't show actual progress, just something that's moving to show that the machine hasn't locked up. You can find an example of this here[^].
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi,
I'm trying to use GDI to make a bitmap from a variety of other bitmaps. I'm new to vb2005 from vb6, and I've figured out how to bitblt from one hDC to another, and get the resulting graphics to appear.
What I want to know is how to display a transparent bitmap, based on an alpha channel. I can use an alpha mask, but this doesn't seem to work for shades of grey. I keep seeing code snippets that set a global transparency for your image to be used, but I need transparency per pixel, and at least 255 shades so that it blends or completely covers the bitmap underneath. I'm going to be using multiple images that overlay to make a final image. I'm fine with the graphics side of it, I know how to make alpha layers for PNG's etc and how they work. I just can't code it in.
This code is not complete - it's been cut out to show the basic method I'm using. I'm copying a variety of graphics into a 'master graphic', then stretching that result into the size I require on my form (so it will cope at any resized form)
HDC4 is a small graphic to paste into HDC3 (my 'master image') - HDC4 is what I want to have transparency with
HDC5 is the stretched target
Dim PictSrc As New Bitmap(texture(1)) 'Picture that goes from file to memory<br />
Dim PictMem As Graphics = Graphics.FromImage(PictSrc)<br />
Dim HDC4 As IntPtr = PictMem.GetHdc<br />
<br />
BitBlt(HDC3, xpos, ypos, 100, 75, HDC4, 0, 0, &HEE0086)<br />
<br />
StretchBlt(HDC5, 0, 0, Ship_Systems_Graphic.Width, Ship_Systems_Graphic.Height, HDC3, 0, 0, 453, 192, &HCC0020)<br />
<br />
Any help is appreciated.
www.c-digital-art.co.uk
|
|
|
|
|
Hi
1) Can anyone help me with how to structure some code that if something has not happened in a certain time, the function will return 'False'. The example 'Test0' below must be bad because I am constantly sitting in a loop checking the Port Pin.
2) Is there a better way to use a Timer in 'Test1'?
3) Which routines should be at the Top of the code. Since the routine 'DoTests' is the main loop, I have put it at the top - then as the tests are called, so you find the routines further down in the code. It obviously works anyway around, but I have often noticed in other code examples that the main routine is at the bottom of all the code.
4) After the tests are done (Pass or fail, the routine 'DisplayError is called from the 'DoTests' routine. 'Display Error' in turn calls 'DoTests'. In other words they are constantly calling each other. Is this bad?
Any comments on how I can make this code better will be appreciated..
Example:
Private Sub DoTests()
Test0()
If Not Test1() Then
DisplayError(1)
End If
If Not Test2() Then
DisplayError(2)
End If
DisplayError(10) 'All Tests Passed
End Sub
'Loop until Jig Closes (D0 = 0) to start tests
Private Function Test0() As Boolean
Do While LPTPort.GetState(D0) = 1
Loop
Return True
End Function
Private Function Test1() As Boolean
Dim tmrTestTimeout As Windows.Forms.Timer
tmrTestTimeout.Interval = 3000
tmrTestTimeout.Enabled = True
'Wait for LPTPort pin D1 to go low OR timeout
Do While tmrTestTimeout.Enabled
If LPTPort.GetState(D1) = 0 Then
tmrTestTimeout.Enabled = False
Return True
End If
Loop
'Timed out - so Return False
tmrTestTimeout.Enabled = False
Return False
End Function
Private Sub DisplayError(ByVal intErrorCode As Integer)
Select Case (intErrorCode)
Case 1
Me.lblTestStatus.Text = "Test 1 Failed"
Case 2
Me.lblTestStatus.Text = "Test 2 Failed"
Case 10
Me.lblTestStatus.Text = "All Tests Passed"
Case Else
Me.lblTestStatus.Text = "Unknown Error - Test Aborted"
End Select
'Wait for Jig to open (D0 = 0) so last unit tested is removed
Do While LPTPort.GetState(D0) = 1
Loop
DoTests()
End Sub
|
|
|
|
|
I think it is a much better idea to have an actual counter in the loop and only wait a max amount of time. It also is a good idea to Application.DoEvents while you are in a loop or your form won't refresh.
dim cnt as Integer = 0
Do While (Your normal check here) AndAlso cnt < 100000
'do your other code here
System.Threading.Thread.Sleep(500)
Application.DoEvents
cnt = cnt + 1
Loop
If cnt >= 100000 Then
'didn't finish the test...
End If
I would suggest that type of code over a timer. That way you know for sure that you will exit the loop and with the application.DoEvents it won't look like your application has died and isn't coming back.
Hope that helps.
Ben
|
|
|
|