|
Can you pls fix that in my code of me?
Thanx
|
|
|
|
|
Isn't that what YOU get paid to do??
Besides, from what I'm seeing in your code, it would take a complete rewrite of your printing method, and breaking it down into smaller methods that do very specific things...
|
|
|
|
|
I dont get paid, is a project im com'n up with. Help me out Bro.
|
|
|
|
|
Since I work a fulltime job with overtime, and have 1 year old running around my house afterwards, when am I supposed to do this?
|
|
|
|
|
|
Do you know, if we had two points in degrees on a circle and we wanted to derive an unknown 3rd point in degrees could we do it if we knew that the third point had a known angle to the other two points?
So the three points together make a triangle, as an example ;
Point (1) is on the circle at 30 degrees
Point (2) is on the circle at 90 degrees
Point (3) exists somewhere on the circle and we know that it has a 75 degree internal angle to Point (1) and (2), how can we determine at what degree on the circle point (3) is situated at?
|
|
|
|
|
Hi Cyndy,
once the circle (center O) and two points (A and B) are fixed, you can no longer chose the interior angle at a third point C; that angle is constant, it does not depend on the position of C on the circle at all (assuming you mean the circumference).
Here is a well known example: have A and B at opposite locations (say 0 and 180 degrees), then no matter where C lies, angle ACB will always be 90 degrees.
General proof:
1. the sum of the interior angles of quadrilaterals is always 360
2. in quadrilateral OACB angle ACB (the one you want) equals OAC plus OBC (because the triangles OAC and OBC are isosceles)
3. angle AOB is fixed
4. from 1+2+3 it follows angle ACB is also fixed (and equal to 180 minus half of AOB)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
This is not a Visual Basic Question, insted it's geometry. I normaly start by drawing a note, how the given situation looks like, and then look up my geometry/trigonometry formula sample...
Regards: Didi
|
|
|
|
|
Hi all,
I need to upgrade an existing crystal report. Actually, my report got 2 group header.
I need to add on between the existing header.
All seems to be ok until I print the report.
I've created this new group header using the option "in specific order" and I've then created my "group". I've checked the Repeat Group Header on Each Page for my need.
Problem : when my group is finish, the first group repeat on a new page and print directly the new data for the next group. I just want that the 1st group header is not repeated at the end of the 2nd group header. I've tried many things for formating (suppress blank page, keep group together) but every time it fails.
I'm using Visual Studio 2003
I hope someone can have a great idea to help me. If needed I can give you as many more information as needed if I wasn't clear enough.
Thx
Sybux
|
|
|
|
|
i believe you need to create your own variables to control whether or not you want to have the group heading printed.
1) Create a formula field, "DUMMY0" and enter the following code in it:
Global NumberVar GrpHdgFlag;
GrpHdgFlag = 1;
2) Place this "DUMMY0" formula field in your ReportHeaderSection and supress it from printing.
3) create another formula field, "DUMMY1" and enter the following code in it:
Global NumberVar GrpHdgFlag;
GrpHdgFlag = 0;
4) Place "DUMMY1" in the headersection2 and suppress it from printing.
5) In HeaderSection1, in the Suppression formula section, place the following code:
Global NumberVar GrpHdgFlag;
If GrpHdgFlag = 0 then
true
else
false
6) In the FooterSection2 place the following code:
Global NumberVar GrpHdgFlag;
GrpHdgFlag = 1;
This should control whether or not to print the Group Heading on a new page.
Give it a try.
|
|
|
|
|
Thx for your answer but,
I've got a problem with section 6 !
Where shall I place the code ? I can't find any "code section" in my Report
|
|
|
|
|
Hi,
I'm pretty new to VB, but have been writing a program using VB 2008 Express. I have a section of code that will compile perfectly using VB Studio 2003, but it throws a InvalidCast Exception under VB 2005/2008. The code throws an Invalid Cast exception at [I]KeyHandle = e(field.GetValue(KeyToMonitor)[/I] line below, and as far as I can tell it is because the variable Field is passing the string Microsoft.Win32.SafeHandles.SafeRegistryHandle rather than an integer. Is this because of safe keys in VB 2005 and 2008?
If so, would anyone be able to tell me how to call the handle of the registry key opened in a way compatible with Safe Keys? I'm using the code to notify when a registry key is changed using RegNotifyChangeKeyValue.
<br />
Private Function WaitForChange() As Boolean<br />
Dim notifyEvent As New Threading.AutoResetEvent(False)<br />
Dim KeyHandle As IntPtr<br />
Dim KeyToMonitor As RegistryKey<br />
KeyToMonitor = Registry.CurrentUser.OpenSubKey("Software\Microsoft\MediaPlayer\CurrentMetadata", False)<br />
Dim regKeyType As Type = GetType(RegistryKey)<br />
Dim field As System.Reflection.FieldInfo<br />
field = regKeyType.GetField("hkey", Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic)<br />
KeyHandle = CType(field.GetValue(KeyToMonitor), IntPtr)<br />
<br />
Dim err As Integer<br />
err = NativeMethods.RegNotifyChangeKeyValue(KeyHandle, _<br />
True, NotifyFilterFlags.REG_NOTIFY_CHANGE_ATTRIBUTES _<br />
Or NotifyFilterFlags.REG_NOTIFY_CHANGE_LAST_SET _<br />
Or NotifyFilterFlags.REG_NOTIFY_CHANGE_NAME _<br />
Or NotifyFilterFlags.REG_NOTIFY_CHANGE_SECURITY, _<br />
notifyEvent.Handle, True)<br />
<br />
If err = 0 Then<br />
notifyEvent.WaitOne()<br />
RaiseEvent KeyChanged(CObj(Me), New EventArgs())<br />
Return True<br />
Else<br />
Debug.WriteLine(err)<br />
Return False<br />
End If<br />
End Function<br />
|
|
|
|
|
|
you need to describe more of what your doing... there is no way anyone can help you fill in the blanks when that's all you give us.
are all 3 tiers on one machine?
or
are you using webservices/wcf/??????
you said "finished writng the code for all" that seems impossible when one of your tiers should be the ui...
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Wow, you have written the code for all 3 tiers of a hospital management system and cannot connect them together. Can I get the name of the hospital you wrote this for, I seriously need to avoid it.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
oxela wrote: so i finished writng the code for all.but i can't coonect with the user interface.
No you didn't. The user interface IS a layer. I'm willing to be you didn't write anything that resembles any of the layers.
oxela wrote: please help me
With what?? You haven't asked a question that anyone on this planet can answer.
|
|
|
|
|
I am sory guys i dont have any expiriance on posting messages.what i want to say is that i wrote the code only for one small class,i use IIs as aserver,so how can i connect the buissness layer with the other layer for this specific class.
|
|
|
|
|
Hi,
I have a datatable, which contains one column.(it contains boolean type value(true/false)).Now my question is, can i update all rows value to true without using the loop?
Thank You
|
|
|
|
|
|
I am a bit of a newbie and don't understand something... When you have a base class with a parameterized constructor you need to call mybase.new on the derived classes to instantiate the base class because the base class is called first which got me thinking if that was always the case even when there is no explicit constructor in the base class. So after fooling with a simple example I discovered that indeed it it is true, because even a non paramaterized base is instantiated when the derived class is called. So for example :
Class Fruit
Sub New()
Console.WriteLine("hello, im a fruit")
End Sub
End Class
Class Apple : Inherits Fruit
Sub New()
Console.WriteLine("hi, im an apple")
End Sub
End Class
the console would output both. My question is why? I don't understand why the base class needs to be created at all? Isn't it enough for a derived class to be created that has all the methods and fields of the base without creating a separate object just for the base class or perhaps I don't understand what is really going on behind the scenes.
If someone could enlighten me I would appreciate it.
Thanks,
Steve
|
|
|
|
|
When Apple inherits from Fruit, and you want to create an Apple, then you (or the system) create a Fruit, then specialize it into an Apple; you can't make an Apple that is not a Fruit. Everything you put into Fruit (data fields, methods, constructors) is available (not necessarily accessible) to derived classes as well. The constructor may initialize some data fields, so you need it to be called no matter what.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
hi all genius people!
my app has picture boxes or labels moving through the whole
form in various directions. to do this i am placing the code
below to a timer of interval = 1 ms
pic1.left += some constant
pic1.top += some constant
when this constant is 1 the motion is quite smooth
but when this constant has a larger value say 5 then the motion
is rough
i tried using loops like this and placing it in the same timer
for x = 1 to 5
pic1.left += 1
pic1.top += 1
next x
but as my app has many pic boxes and
this timer runs for about 2 mins (=2*60*60*1000 ms)
this takes a lot of cpu
any ideas??
my sole intention is to make the motion smooth
thankx
TheMrProgrammer
|
|
|
|
|
The only way you're going to get smooth motion is to stop using controls to render all of your content, and even then, you might not get what you want, but it'll be a VAST improvement. You have to handle the Paint event of your form and draw all of your content yourself. Controls are too expensive to redraw and, from what I see if your small code snippet, you're not giving the form any time to redraw the controls in a timely fashion.
|
|
|
|
|
so you suggest to drop all the controls and stick to graphics object?
and/or i should increase the interval of the timer? to maybe 10 ms or what?
TheMrProgrammer
|
|
|
|
|
Hi,
1. a simple timer will not provide small steps such as 1 msec (see my timers article for details).
2. you don't need such small times anyway; a movie is built with some 24 frames per second, that is 40 msec per frame.
3. you do need double-buffering, so you don't see the building-up of each frame.
4. As Dave said, get rid of the Controls, paint it all to a single Panel.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|