Jump to content
Xtreme .Net Talk

mutant

*Experts*
  • Posts

    1922
  • Joined

  • Last visited

Everything posted by mutant

  1. If you want your database in the location of your executable, to fnd it then you could use Application.StartupPath to get the folder in which the executable is and then add the name of your db file and use that string as the location.
  2. I rarely seen a tutorial for Managed C++, only code samples and things like that. Its because if you want to program C++ not many people would add a framework to it. You can find code samples and some tutorials for MC++ on sites like http://www.codeproject.com.
  3. Im assuming you trying to do that with a panel because you were mentioning it. If you want to do that for a panel you need to inherit a control from a panel, apply those styles in the constructor and use that control instead of the original panel. You have to do it like this becasue SetStyle is protected method. If you are using a form then what is your excat code?
  4. Are you compiling your program using Debug or Release mode? You can only debug in Debug version.
  5. See if this article helps you: http://www.elitevb.com/content/01,0077,01/
  6. You create a bitmap object, a graphics object for that bitmap. Then you draw using that Graphics object onto that bitmap and finally draw and present the bitmap when its finished.
  7. AllPaintingInWmPaint tells the application to ignore the WM_ERASEBKGND which will lower the flicker, and it should only be set if UserPaint is set. This would mean that it does work :), I could be wrong and its never too late to learn.
  8. Dont forget to set DoubleBuffering and two other styles which will improve the drawing: Me.SetStyle(ControlStyles.DoubleBuffer, True) Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True) Me.SetStyle(ControlStyles.UserPaint, True) You can find a lot of info on those in MSDN. basically double buffering is drawing in memory first and then copying the result to the screen.
  9. Im not really sure what you are trying to do, both things will print the same thing anyway. You are accessing the value of string, it is the text that is in it. Sorry If im completely misunderstanding you :)
  10. Try this example: (cardpic here is the name of the picturebox, but you can make it any picurebox using the sender method of the mouse events and adding one more variable) 'tells you if the object should be dragged Dim dragging As Boolean = False 'values used to make the moving smooth Dim x, y As Integer Private Sub cardpic_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles cardpic.MouseDown 'set to dragging dragging = True x = cardpic.PointToClient(Me.Cursor.Position).X y = cardpic.PointToClient(Me.Cursor.Position).Y End Sub Private Sub cardpic_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles cardpic.MouseUp 'dont drag anymore dragging = False End Sub Private Sub cardpic_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles cardpic.MouseMove 'if the object should be dragged change the location If dragging Then cardpic.Location = New Point(Me.PointToClient(Me.Cursor.Position).X - x, Me.PointToClient(Me.Cursor.Position).Y - y) End If End Sub
  11. I dont know if im understanding your problem well :), are you saying that you are trying to move an image with your mouse? Are you using a picture box? If you are trying to get your image moving with the mouse then use the MouseMove event to get the coordinates of the mouse each time it moves.
  12. Are you saying that you want to send some text back to the parent so you can see what it is? You could make a method ni your parent form that could accept a string where you check what the text is and if it is waht you want write. And to use that method from your child you would use the MDIParent property: Dim parentform As ParentFormType = Me.MDIParent parentform.CheckThisString("some text") Or other way: DirectCast(Me.MDIParent, ParentFormType).CheckThisString("some text") If this is not what you wanted just say :)
  13. Sorry, I forgot one word in my last, I meant to say "...you are not starting..." but I see you got the idea. :)
  14. Lock is designer only property. Are you trying to block the user from entering some particular character or any? If any then setting the DropDownStyle to DropDownList would do it. What PlausiblyDump showed you works. Look at this example: If e.KeyChar = Convert.ToChar(97) Then e.Handled = True End If
  15. Ive heard that Discreet released a patch for 3D Studio for XP, im not sure, you could check their website. 3Ds Max Costs about $3000, if you really are a "real newbie" then there is plenty other programs that would help you learn before investing that much money into an application. For example you could get the Learning Edition of Maya, which has almost all the features of the commercial product but doesnt export the the most common formats and leaves watermarks, but its free.
  16. Sorry if im not understanding your problem correctly :), but if you want to draw an ellipse with effect such as that you could try using HatchBrush class - which has a lot of patterns to choose from - with the FillEllipse method. You could try looking through it and see if you find a pattern you want.
  17. To extract a file name from any path use the Path class of the IO class: string filename = System.IO.Path.GetFileName("path");
  18. Only one form can be focused at one time.
  19. Its true, C++ is faster but the speed difference is very small. .NET programs are faster compared to some other languages and they get close to C++. There isn't much books about DirectX9 for .NET (there is several for C++) but Ive seen some for .NET. Maybe you could search amazon for it.
  20. This is not VB.NET code :) You will find more help with your VB6 problems on: http://www.visualbasicforum.com
  21. The problem is that you are starting the message loop for your form so it exits. To start a message loop for your app using the form do this: Application.Run(New theForm)
  22. If you want to make drivers for machines then C++ all the way :). It gives you more access to the low level stuff. For most appliaction VB.NET or any other language are good enough so I wouldnt say that it will limit you in a very large way.
  23. Its not a replacement for Winsock, it makes creating online games or other things easier, it handles all the data sending and things like that.
  24. Replecements for Winsock are System.Net and System.Net.Sockets namespaces.
  25. Set the DropDownStyle property of the combobox to DropDownList.
×
×
  • Create New...