Jump to content
Xtreme .Net Talk

bpayne111

Avatar/Signature
  • Posts

    335
  • Joined

  • Last visited

Everything posted by bpayne111

  1. ok thanks brandon
  2. I'm having some trouble with an app and one way of solving my problem would be overloading the constructor of my user control or a windows form. I have a feeling neither of these is possible am i correct? brandon
  3. bpayne111

    newb

    Do you mean just make it invisible? Label1.Visible = False as for making a label transparent i don't think you can... I tried that before and had no success. Another idea might be to use a picture box instead. Those can be transparent fairly easily... A User Control class of your own might work well. Why do you want the label to be transparent?
  4. (These should be posted in General) ok i created that project to see what it looks like and it sure enough works... So now i'm curious as too how this system works for creating a Key for unlocking a program. I can see generating a key based on certain factors but which ones? Once you have that it would seem like a good idea to keep people from installing multiple times from the same disk without consent (giving to friends etc...) Do all disks have different volume labels? If so that would seem like a good way to prevent furthur stealing. ie. Sending encrypted volume label of disk, with a made from key hardware information to identify the computer. The only issue after that is to prevent burning copies... How is that done? Of course crackers and hackers and such will figure something out but i'd like to know how to accomplish these things anyway. Possibly install a hidden bs file somewhere that is absolutely necessary to install but serves no purpose to program? The registry? Sorry this post just put me on a theoretical splurge. I'd like to have some classes designed to accomplish these things...but it might be fun doing it myself. brandon
  5. When i start a new application why do i see [sTATThread] sometimes? brandon
  6. I'm not sure if you can do that or not but it would be very simple to work around it until you find a solution. Create 2 arrays (or a multidimensional array, or 2 listboxes with .Visible set to False) that store each corresponding item in corresponding indexes... Then concatenate these 2 and add them to the ListBox you want displayed. It may not be the most professional way of doing it but, it will accomplish your goal i'm sure.
  7. I think .NET dumped the End Keyword... as for the other 2, check the knowledge base or help files for some extra information. (if i am wrong about the End keyword someone please correct me) Good Luck Brandon
  8. Please provide some code so that we may see your error and better help you determine the problem. The code below will add a string to a listbox name ListBox2. Private Sub AddText(ByVal Text as String) ListBox2.Items.Add(Text) End Sub I hope that helps Brandon
  9. very simple... use the handles keyword at the end of the event. When double click an event in the designer VS automatically creates it's method for you. At the end of the declaration for an event should be the Handles keyword. You may add as many other controls Events to this as you like. IE Private Sub ab_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove, Label1.Click, TextBox1.TextChanged If e.Button = MouseButtons.Left Then newPoint = Me.MousePosition newPoint.X = newPoint.X - a newPoint.Y = newPoint.Y - b Me.Location = newPoint End If take note on how i added events for a label and a text box to be triggered here as well. The events i added are ambiguous for i do not have your project to look at to make it more concise. I hope this helps Brandon
  10. Well like i said I don't know how to do that but i have seen the same quetion asked before. I would start a new post and restate your question in more detail. Give this one a day or two to see if anyone catches it first though. Do some searching on handles too while you wait... sometimes we get so use to these forums we forget to do that. Glad I could help brandon
  11. A wonderful post... thank you for being so lost hog... if i only had seen this in time to contribute
  12. If i were you i'd write a small syntax checking program. I write code in notepad on the road sometimes and come home with many syntax errors. Obviosly a compiler is the best solution but at least this way you can make sure your code isn't complete crap when you get home to paste it. Of course making it read all c syntax is gonna be pretty difficult but you can make it as basic as you want... ie. make sure procedures have {} and semicolons on the end of lines would be a good start. This won't solve all of your issues but it can take some stress out of your life; like when you go to paste what you've written and spend 20 min looking for that missing closing bracket hope that helps brandon
  13. I have a control which retrieves the Assembly Attributes and stores them. When a user uses my control. I'd like to have it display the assembly info for the program that person is running. As of now it will only display the assembly info that i created when i designed the control. I've tried using the following code. When this code is finished executing... it returns "System.Windows.Forms.dll" i'm looking for it to return the title of the program that owns this control. Take note i am using the method System.Reflection.Assembly.GetCallingAssembly not GetExecutingAssembly. GetExecutingAssembly returns my controls attributes instead. public void GetAttributes() { Assembly asmInfo; AssemblyTitleAttribute atrTitle; //set assembly variables asmInfo = Assembly.Load(Assembly.GetCallingAssembly().GetName()); objAttributes = asmInfo.GetCustomAttributes(false); //Convert from object to desired types //Select Case needed because order of attributes in array varies foreach(object objItem in objAttributes) { switch (objItem.GetType().ToString()) { case "System.Reflection.AssemblyTitleAttribute": { atrTitle = (AssemblyTitleAttribute)objItem; lblInfo.Text = atrTitle.Title.ToString(); break; } } } is what i'm doing possible? it seems like there is a method somewhere to help me accomplish this I'd really appreciate an answer on this one. This bug is really hurting the flexibility of the utility i'm writing. brandon
  14. Do you absolutely need the serial number? Although you didn't say, usually issues like these are for product legitimacy and for product keys for shareware programs. If that is the case...I know that Window's assigns a handle to devices so that you may generate, unique data for a program is installed on a computer. Since no one has replied i figured i'd take a stab. brandon
  15. thank you all is clear now...
  16. thank you that's perfect
  17. I'm looking for a constant that is the equivalent to the height of the area on top of window that contians the ControlBox buttons (minimize, maximize, close buttons). brandon
  18. I have a user control which has a pictureBox. When the pictureBox paints i'd like to perform an action. public class UserControl1 //auto generated code { //picLogo created in designer private override void picLogo_OnPaint (System.Windows.Forms.PaintEventArgs e) { MessageBox.Show("painted"); } } with this code i get an error saying "Virtual or abstract methods cannot be private" I changed it to public and then get an error saying "There is no matching method to override." What do i have to do to make that work? brandon
  19. yea i kinda took over the class... and told everyone to forget using the component class to set up the data objects. so i guess it's solved. i'll check the books website as well. thanks
  20. We have a feeling it has something to do with using VS 2003. Our book was made for 2002 and i think something happened with all that. Anyone who actually looks at the project will wonder why we are using a component class. It is because that's what the assignment requires. Obviously we could do it without it but, that's what we are supposed to do. One person did it without the component by accident and it worked. Adding that componet seems to be the big issue.
  21. Attatched is a zip file of a project my entire class including the teacher can not get to work right. If anyone can figure out what the problem is we will all be appreciative. The data connection will need to be changed because we are reading it from the server. Other than that, everything should be ok. My combo box will not load the Names of Products but other people have had success with that... The ones with the combo boxes filled with data cannot get the data binding to the labels to work correctly. PLEEEEEEEASE HELP brandon (and the rest of my class) stupid.zip
  22. You'd be better off getting two books probably. And depending what you already know about programming, different books may suit you better than someone else. If you are a beginner to our wonderful world then get a beginner book. If you know your stuff say in vb and want to know a new language, find a faster paced book. How to program C# by Deitel is a good one that i have. Read through it a little before you run and buy it though. Good luck Brandon
  23. let me know if you do.. i'd like to read it. thanks guys (ohh and yes i saved a copy before i saw your message ;))
  24. yea i know about inheritance but then i can't edit the controls the way i want... if i had just one exit button on a form at load that i could play with (size and etc..) then i'd be happy
  25. WOW that is cool i just did it... so will this work if i say add a button to a form and copy the code? i'd like to hear some more details of how you guys used this to your advantage
×
×
  • Create New...