Jump to content
Xtreme .Net Talk

PlausiblyDamp

Administrators
  • Posts

    7016
  • Joined

  • Last visited

Everything posted by PlausiblyDamp

  1. GUIDS are not really character strings, rather they are a binary value that is often displayed in one or more character based formats. IIRC they are 128 bits (16 bytes).
  2. You could store them as embedded resources rather than using an image list, clicky gives an example of how to use embedded resources and should be enough to get you started.
  3. You could create a handler for the KeyUp event similar to private void richTextBox1_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e) { if(e.KeyData== Keys.Return) { //enter was pressed } } The rich text box already has an array of Lines as a property, you may be able to use that rather than create an array of your own.
  4. https://www.mainfunction.com/DotNetInAction/HowTo/display.aspx?ID=30 is an article by Eric Gunnerson that discusses performance of calling code dynamically, also he has a blog entry that you might find useful as well.
  5. http://www.w3schools.com/css/default.asp also has quite a nice tutorial on CSS, well worth spending some time reading.
  6. http://www.xtremedotnettalk.com/showthread.php?t=85665 may be worth a look
  7. As you are only using two buttons (Button0 and Button1) every time you call AddHandler and pass in the click event you are binding to the event again. It may be more help if you give an idea of what you are trying to do as at the moment your code looks unnecessarily convoluted; why hard code 6 buttons but use an array for names? why hard-code 6 button click handlers rather than just one that handles all buttons? The AddButtons method could really use a loop rather than cut and paste to handle each button condition as well.
  8. Just replace the Longs with Integers and it should be fine.
  9. Other way round, the mail server (if it is POP3) will listen on 110 - you will need to connect to it. Most of the work involved is simple comands that would be sent / received as simple ASCII text over a connection to port 110.
  10. You will need to implement some form of state management within your application, the variables are being recreated and destroyed on every page refresh.
  11. ReDim Preserve arrayGroups(selected)
  12. Is there any reason you couldn't leave the DLL as C# and just reference it from a VB application rather than converting it over?
  13. Is there a problem with the code as it stands or are you just after (hopefully constructive) criticism of the code so far? Not had chance to have a look to see if there are any errors but the immediate concern I would have is the use of string concatenation to build your SQL - you should look at using stored procedures or at the very least using parameterised SQL. Search these forums for more advice / examples of both techniques.
  14. Your project is a ClassLibrary, these are designed to contain re-usable classes that are caled from other projects, and as such cannot be run directly. You would need to create a project that is either an .exe or a web based project if you want to be able to run it.
  15. Are you databinding the control on every Page_Load event? If so you will be erasing the contents and rebinding on every postback, you probably only want to load the data on the initial page load event.
  16. You would probably need to do this through P/Invoke but the API function SetSysColors would appear to be the best option.
  17. Although you can still use the ADODB objects in .Net you may find migrating to the newer ADO.Net functionality will be better in the long run as all the new functionality relies on ADO.net for data binding etc. If you are migrating code then the System.Data.OleDb namespace does have support for moving between ADODB recordsets and ADO.Net datasets.
  18. IIRC (will check when I get home) your control needs to implement the IPostBackEventHandler interface (and possibly the IStateManager interface as well). Something to look at for the time being anyway ;) Also if you are serious about authoring server controls you could do a lot worse than invest in Developing ASP.NET Server Controls and Components.
  19. Just as a quickie have you looked at the Updater Application Block from MS? It has recently gone to version 2.0 and seems (not really tried them myself) to have some nice features.
  20. You would have to define the constants for the relevant WM_* messages yourself. Clicky has a useful list to be getting on with. Also it might be worth seeing if the functionality you are trying to achieve is already part of the .Net framework to begin with - could save you a lot of time and trouble.
  21. In that case you can ignore System.Messaging.Dll as that is entirely to do with message queuing and not related to to windows messages; also the messaging service is not required either. From a windows form you can override the form's WndProc method Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message) 'typically something like Select Case m.Msg 'WM_ message End Select End Sub
  22. Think there might be a bit of confusion here, are you refering to the Windows Messenger service, MSN Messenger, trying to intercept the WM_ messages windows sends to your application or are you in fact refering to Message Queuing?
  23. My bad, he would just need to create a couple of date objects set to pre-determined timse and use those for comparison / subtraction. Dim d2 As DateTime = new DateTime(datetime.Today.Year,datetime.Today.Month, datetime.Today.Day, 15,0,0)
  24. You could always get the number of elements by using the Count property cardArray.Count; however the whole point of the foreach statement is that you do not need to know the number of elements. CartContent a = new CartContent(); ArrayList cardArray = a.GetCart(); //replace object with whatever class cardArray contains foreach(object o in cardArray) { //use o here }
×
×
  • Create New...