Jump to content
Xtreme .Net Talk

JoshK

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by JoshK

  1. Great thanks, I'll give it a try. Then, for future reference, what if I have a textbox for some kind of information, what if the user hit one of the keys that I have in KeyPress event. Is there a way to turn KeyPreview on and off in code?
  2. I used to use VB.net 2003 but switched to 2005 recently. I imported and converted one of the programs I was working on into 2005 and finished it. So now I started a new windows app class. I designed a form with lables and text boxes and such, but when I go to code view, it doesnt show the windows generated code for all the controls I just added like in my last program showed. it just has: Public Class Form1 End Class nothing else... where all the generated code like Friend with lblFoo and Inherits system.windows.forms
  3. ok I have a time that ticks every 10ms to update one lable with the current mouse position, and also set a panel to the color unser the mouse Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim point As Point point.X = Windows.Forms.Cursor.Position.X point.Y = Windows.Forms.Cursor.Position.Y lblMouse.Text = point.X & "," & point.Y Dim color As Color color = GetPixelColor(point.X, point.Y) lblColor.Text = ColorTranslator.ToWin32(Drawing.Color.FromArgb(color.A, color.R, color.G, color.B)).ToString pnlColor.BackColor = color System.Windows.Forms.Application.DoEvents() End Sub while thats happening I want to be able to save the current mouse position and the color to a listbox when the user hits the 'w' key Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress If e.Equals(Keys.W) Then lstCommands.Items.Add(lblmouse.tostring & " :: " & lblcolor.tostring) End Sub As you can see I put DoEvents() but when I hit the w key nothing happens, I also tried removing the IF in form1_keypress and the keypress just doesnt activate. Please help
  4. thats what I though also, but I keep seeing people or articles that say you can. example, read this: http://www.123aspx.com/redir.aspx?res=31302 he shows, although I havn't tried it yet, that you can read and write directly to the heap with marshal. I'm asking, because I work for a MMO currency seller, for some games someone has developed apps in c++ that has the offset to a certain games money variable. So then when we deliver gold to our customer, the app sees it and reports back to a DB for inventory tracking. I already know VB.net, and the whole point of this thread is to see if it is possible to do the same thing in VB. I know you say no, but I just want to make sure before I devote time to learning c# or c++ It's ok if I cant do it in vb, but in that case would c# be ok for doing this or would i be better off in the long run to learn c++. Note, I cant remember where I read it, but I think I heard somewhere that in c# you can use pointers, but it is impossible to have a pointer to a memory address outside of the c# program's own memory space, meaning I couldn't get to the game memory space to get the value, is that true??
  5. Anyone know if it is possible to use 'pointers' in vb.net to read and write to another program's memory stack as you can in c++. If anyone could give me a quick rundown or point me to a good resource on doing this it would be most appreciated
  6. Yep, got it working, thanks that thread was very helpfull
  7. I saw a post about this already but it was in c# so no I am asking for VB.NET how can I do something like this dim dialog as object private sub go() dialog = new frmdialog end sub private sub check() msgbox(dialog.textbox1.text) end sub so I have a dialog box where someone can type something into textbox1, then when an event is triggered on frmMain I want to pop up a messagebox showing the contents of textbox1 from a different form.
  8. her ya go buddy datagrid.item(x, y).style. _ under .item.style there are many attributes you can change such as alignment font forecolor and oh, yes, backcolor
  9. So if the search is already running and you click btnStop, it restarts the search or just has no noticable effect? What code do you have for btnStop_Click?
  10. can someone clear me up on a few things. I've search for answers and the more I read and think I have it, there comes something that gets me *** backward. If I could get a deffinate answer on a few of these things it would just be superb. 1. is a datagrid same thing as datagridview? 2. what is the difference between dgv.datasource and dgv.databinding for the next question I am refering to this snip I found in VB2005 beta 2 help: ' Create a command builder to generate SQL update, insert, and ' delete commands based on selectCommand. These are used to ' update the database. Dim commandBuilder As New SqlCommandBuilder(Me.dataAdapter) ' Populate a new data table and bind it to the BindingSource. Dim table As New DataTable() table.Locale = System.Globalization.CultureInfo.InvariantCulture Me.dataAdapter.Fill(table) Me.bindingSource1.DataSource = table That part in bold shocked me. Is it possible for VB to monitor changes made to the DGV on its own and construct the sql UPDATE command to update only the value(s) that the user changed??! I've been tracking changes with code and then writing code to check what was changed and send the UPDATEs if needed. btw I use mySQL and the mysql VB connector. Excuse me for any pain I cause with asking about DGV's. I know there are alot of topics on them and the answer may already be out there but I just cant find it. This is also my first post to any programming forum, so I hope once you all make me a VB.god I can return the favor.
×
×
  • Create New...