|
hi there
i am trying to develop an application similar to the laser game
I have tried many ways to deflect the laser beam (a line that i drew from a point to the mirror)
I am using a movable label control to repersent the mirror
any ideas on how to go about this problem???
Thanks
regards
Yasin
|
|
|
|
|
You should handle all drawing in a paint event handler. You just can't do it wth controls, not nicely. The deflection is basic physics. Which bit are you stuck on, drawng the line, or working out where it goes ?
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 )
|
|
|
|
|
As I said before[^] forget the Label, it only complicates matters.
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
|
|
|
|
|
Forget the controls and rendering code for now. You haven't figured out how to represent your game's data properly yet.
The graphics you see in any game is a visual representation of the game's internal database. You can't possibly draw anything until you've got your data representation and management worked out.
|
|
|
|
|
Hi all,
I have an urgent question.
I am writing an windows service to retrieve files from a network drive mapped as Y: I get the following error... Could not find a part of the path "Y:\verify".
When I run an Application it works fine, so I tried to shell the exe from my service, but still get the error!
I have read and tried several things but to no success
Can anyone please assist me?
|
|
|
|
|
Have you tried the UNC e.g. instead of :
"Y:\somefile.txt"
Try (depending on the path):
"\\FredsComputer\C$\somefile.txt"
You always pass failure on the way to success.
|
|
|
|
|
Yes I have tried that, but the share needs authentication.
So I get access denied error
|
|
|
|
|
Sounds like a permissions/user issue.
I am not a networks expert and I guess someone else on this forum may be able to help.
Good luck...
You always pass failure on the way to success.
|
|
|
|
|
A Windows Service runs, by default, as the Local System account, which has no rights to any network resources. The service does NOT run under the user context. It runs as if a seperate user logged into the machine (actually it DOES login to Windows) with no network permissions.
To the service, there is no Y: drive. The only drives that exist are the local floppy, hard drive, and any CD/DVD drives.
If you want the server to have access to the network, you have to change the account it's running under to one that has network permissions. Click Start/Run and type services.msc . Find your service in the list and double-click it. In the dialog that shows up, click the LogOn tab to change the account.
|
|
|
|
|
Thanx for the reply.
I have tried that approach but maybe i'm doing something wrong?
I log in with a domain account, so in the service properties I
specify my logon details. But then I run the service it can still
not access my mapped drive
Got any idea why it would do this?
|
|
|
|
|
DO NOT CROSSPOST in multiple forums. It makes collaboration on an answer impossible.
Did you map the drive by hand yourself at any time or did a login script do it for you?? If it wasn't through a login script, then the service will not see the mapped drive because it hasn't mapped it itself.
Using mapped drives is a bit old-fashioned anyway. If you used UNC paths, you haven't have to worry about the mapping at all. The service still needs to run under a network account though.
|
|
|
|
|
MaYo69 wrote: Got any idea why it would do this?
Because the service logs in under its own security context. It's not aware that you logged in under the same account. It's completely in its own litte world. Nothing you do under your account will affect what the service sees.
|
|
|
|
|
|
Hi,
I need to create a wav file with a frequency of 283 Hz.
In visual basic.net
Please help me.
Thank you very much!
|
|
|
|
|
|
hi
in a form i have a grid some text boxes both are binded with different binding sources now i want to code so that if use click any row in grid record in text boxes move to related record for editing etc
any one plz help
Faisal iqbal Ch
Love the Process Not the Result : FIAZ H SIAL
|
|
|
|
|
The reason why it doesn't work now is because you're using multiple binding sources. Knock that back to one binding source and update all the bindings and it'll work without any code.
|
|
|
|
|
sir , I am retriving data from database and filling into dadagrid i want to set particular cell in datagrid with color
Please Guide me on this topic...........Thank You
|
|
|
|
|
hi
1-Right Click On Grid
2-Select Edit Columns
3-under the Apperance click Default Cell Style Button
4-Now Select Different Color and Fonts etc
hope it will help
thnx
Faisal Iqbal Ch
Lahore Pakistan
|
|
|
|
|
Thanks For ur Reply
happy to see support
Sir ,i need in vb.net
i am putting into datatable particular field from database if that field is having some data for example
If IsDBNull(row2("Problem")) Or row2("Problem") = "null" Then
dr2(7) = ""
Else
dr2(7) = row2("Problem")
End If
after that i am adding to datagrid
if it is present means i have to fill datagrid cell with color
|
|
|
|
|
hai friends,
I am using Visual studio 2003 version.
I am using Activex treeview control(vb6 control).i am tring to use contextmenu for this control.But contextmenu property did not exist for OCX controls. So i am check the condition in mouseupevent the clickevent is right click event.then only show a contextmenu control.My problem is when am click the menuitem of contextmenu control,the menu item click event doesnot executed.how to i get the click event of contextmenu items for AXtreeview control.In this case the select event is working well.
but the click event is not executed.i am using following codes.Plz check this is correct or not.
Imports vb = Microsoft.VisualBasic.Compatibility
Private Sub AxTreeView1_MouseDownEvent(ByVal sender As Object, ByVal e As AxMSComctlLib.ITreeViewEvents_MouseDownEvent) Handles AxTreeView1.MouseDownEvent
If e.button = vb.VB6.MouseButtonConstants.RightButton Then
ContextMenu1.MenuItems.Clear()
menu1 = New MenuItem
menu1.Text = "Menu1"
ContextMenu1.MenuItems.Add(menu1)
Me.ContextMenu1.Show(AxTreeView1, New Point(e.x, e.y))
End If
End Sub
Private Sub menu1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles menu1.Click
MsgBox("Menu1 from click event")
End Sub
Private Sub menu1_Select(ByVal sender As Object, ByVal e As System.EventArgs) Handles menu1.Select
MsgBox("Menu1 from select event")
End Sub
Any one know the answer.Plz help me.I am waiting for ur clarification
by,
Punitha.M
|
|
|
|
|
Hi every one..
i have 2 buttons and one label..
if i click accept button time starts from 0 and if i click hangup button the label must dispaly how much time it hasd taken between two clicks....
can any body guide me how to achieve it....
|
|
|
|
|
put a timer on the form
put timer interval at 1 sec
on click of accept button start timer
on every timertick you increase a global variable by 1
on click of hangup button stop timer
do some calculating with the global variable and you know how much time past
(I'm sure there are better ways to do this but don't have the time to look for one at the moment)
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
A more accurate way than was suggested:
DateTime start;
button1Click
{
start = DateTime.Now;
}
button2Click
{
TimeSpan elapsed = DateTime.Now - start;
}
This approach is more accurate and simpler than playing with timers.
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 )
|
|
|
|
|
yes it is
thank you for correcting me
I knew there had to be a beter way but just couldn't think of it
No sleep, long hours, lot's of stress and starting to get sick is starting to take its toll
Thank God it's almost weekend
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|