What Is The Purpose Behind The OnXXX()
Aug 31, 2010I just don't understand the OnXXX(). What are they? What do they do? When should you use them?
View 2 RepliesI just don't understand the OnXXX(). What are they? What do they do? When should you use them?
View 2 RepliesSay you have an event raiser method (OnXXX) that raises an event using the CancelEventArgs class is there anything wrong with having the OnXXX method return the value of e.Cancel?
For example:
Public Sub ProcessFiles(folder as DirectoryInfo)
For each file in folder.GetFiles()
If OnProcessingFile(New FileEventArgs(file)) Then
.....ProcessFileCode
[code]....
I want to know what is purpose of '' in vb ? I have this statement: frontDigitsToKeep 2 and I want to convert it to C#.
View 2 Repliesi am controlling the hue and saturation of the backcolor of the form with scrollbars:
Private Sub tbHUE_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tbHue.Scroll
Dim r, g, b As Integer
HSVtoRGB(r, g, b, tbHue.Value, tbSaturation.Value / 50, 255)
[code]....
i would like to know what is the purpose of dividing by 50?
What is the purpose of Interfaces? it's just a collection of properties, method and events which can be used over and over again by different classes. Its no different than declaring the needed method or property in the classes separately rather than using Interface (because in Interface, you have to write the inner working in each classes implementing the interface). Is there a case where an interface comes in handy (I mean cases where Interfaces are absolutely necessary, without them the program won't work)?
View 9 RepliesWhat is the purpose of Public property? why would i do this instead of just doing Public abc as string? [code] Because you may want to do data validation on it before assigning the value to the Private variable. Because you might want to raise an event when the value in the Private variable changes. Because you might later want to make it a ReadOnly property.
View 12 RepliesWhat is the purpose of the function CLine, because it is used in my code and it isn't a member of the namespace it is attached to in the vb6 code pasted straight into visual studio 2005, what would it do in this context:
frmXML.CLine = 1
frmXML is a visual basic.net windows application.
My app displays a list of records in a DataGridView on the main form. I've developed code for cut/copy/paste for the selected records and have put the code behind Cut/Copy/Paste menu items under a classic 'Edit' menu design, with the standard shortcut keys(Ctrl + X, Ctrl + C, Ctrl + V).
The trouble is, I also want the shortcut keys to work on selected text when I'm editing inside text fields on a record in the DataGridView. So I need the shortcut behaviour to change depending on whether I'm editing a record or selecting record(s).
I'm am wanting to create a setup Project and see that there is an option to create a Merge Module Project. The description is not clear to me. That is, it says 'Create a Windows Installer Merge Module project to which files can be added'
View 2 RepliesI am currently reading up on documentation for a possible assignment I might be put on. In a design document they talk about the .exe.config file. They state that its only purpose is to store constants: "Also note that this file is meant to store constants only, it is not meant to write configuration values to (and the .NET 1.1. framework even prevents this by not offering classes/methods to do so). Therefore, configuration is written to XML files using a..."As far as I understand, this is not true. I don't know about .NET 1.1 preventing this, but I remember in my last project that I did write configuration values to that file (I saved GUI contents there). My project was a small prototype, so maybe I did it wrong, but I do not think so...So what is the intended purpose of this file?
View 3 RepliesHow to create a delete in used to delete my sql database from different database without decalre one by one in vb applcation
View 1 RepliesI have a question regarding Select Case. I am comparing different integer in select case for different purpose. I want to run some code on the case when number is not from the list of below mentioned.Can i use this as i mentioned below in Select case?. If not then what does mean. It don't give me any error. Case Is <> 307, Is <> 1, Is <> 12, Is <> 14, Is <> 56ThanksDalbir Singh
View 3 RepliesJust knowing 20 commands i am developing a app?very impressed on myself!Just knowing 10 commands + common sense + special sense each man has i had world most dangerous spy tool....but on my guru & best friend advice i dropped it..but in future will use for good purpose So here is the new scene We are team of workers had blogs,microblogs and other things i decided to create a tool for my self which is like office assistant to assist in our work at office
my tool will do the submission process when we are not in our office
my idea is using a web browser control and do it with vb commands
so kindly think yourself in such position do you agree to do submission task with web browser control or you can do it some other methods?
whats your opinion? what i mean open a website on web browser control submit the details from listbox(which increment on every submission)i think you now got how we are going to do this!!!
so i am need some one advice shall i proceed with this?i had three big challenges
1.Time
2.Yes Of Course Time
3.Ya Time But Time + Work Accuracy
so kindly guide shall i use the web browser control or use method like direct server post?
CODE:
Im making basic application for the purpose of testing the object... Basically when i press the button it sends the info to a 2nd form... when i do the date of registration is set automatically. However the date displays correctly but not the time 12:00:00 no matter what...
I have been wondering for a while what the difference is between the following two:
Public Property ProgressMaxValue() As Integer
Get
Return maxval
End Get
[code]....
if a call to For Each starts by calling the Enumerator's MoveNext, then Current, then MoveNext, then Current, and so on until MoveNext returns a False then it exits, am i right to say that the Reset is never called?initially i thought that Reset would be called when MoveNext returns False, i tried this (a msgbox would come if it was ever called but i got no msgbox at all)
[code]...
if that's the case, what exactly is the use of the reset in an ienumerator, and is it ok to leave it empty, as such
I am finding it is not possible to use GroupBox (for the purpose of grouping radio buttons) in a Windows Mobile Application. Is there an alternative to this so I can group radio buttons in a Windows Mobile App?
View 1 RepliesI have seen that BindableAttribute is used to decorate public properties in custom controls. MSDN briefly mentions that it provides the ability to control the binding direction and whether binding is supported at design time.
public class MyControl : Panel
{
[Bindable(BindableSupport.No, BindingDirection.OneWay)]
public string MyString { get; set; }
[code]....
1) I set BindableSupport to No, however I could still do this in markup (.aspx).What does BindableSupport affect then? Does it hide the property in the toolbox?
<cc:MyControl runat="server" MyString="something" />
2) How does one-way binding and two-way binding work in the context of custom controls and ASP.NET?
I have been using access for my applications from over 4 years now. I realize its time to move on now and i need suggestions for a new database. Here are my requirements :should be able to connect it with Vb.net windows form frontend GUI - all database functions such as add/delete/edit/update will be done through the vb.net front-end only.Should be able to place the db on LAN and each client on the LAN can then access the centrally stored db through their individual front-ends.At the most 5-6 users will be reading/writing to the database at the same time , so the database should not crash or slow down Since i come from MS access background, i would like something thats similar to it so that i can learn and adapt to it quickly.Not very important, but i think its worth mentioning. This db will be the main central db for my .net application.My .net application will also be interacting with quickbooks and magento via some apis but ultimately all this data will go to the central db. So just curious, will there be any compataibility issues with the database that you suggest Should handle about 10 tables and around 10k records in each table Should be secure - just that i should be able to lock it up or anyhow prevent it being accessed from anywhere else other than the vb.net front-end.
Lastly, I would prefer it to be free to use if possible but not essential. I realize there are some topics like mysql vs sqllite and on databases, but pls understand i need suggestions for one that will be apt for the purposes i have listed above.
Edit : Just curious - Would i pushing the limits if i still stick to access - i understand access won't be good for multi-user access but i guess 5 users is not much ?
I am deveolping a charting program and have a need to have dynamic draggable labels on the chart for notation purposes. Everything works fine until I try to drag a label past the 32767 (16 bit limit).
Here is the code that I drag the label with:
If ISDRAGGING = True Then 'DRAGGING LABEL
If CURRENTLABEL.Tag = 2 Then
CURRENTLABEL.Left = 0
[Code] .....
I have tried to create a new label and override the Top value with a Long Value, but it still does not do the trick. Hhere is my attempt to overload the top value to an integer.
Public Overloads Property Top() As Long
Get
Return _Top
End Get
Set(ByVal value As Long)
[Code] .....
The charts are dynamically generated from a database and represent depths. Usually at least 10000 feet are plotted at 5 pixels per foot. So some labels will be created or dragged below this 32767 line regularly. Any way to be able to drag the labels past this limit, or possible another option to be able to view these long charts.
I have two projects that contain extension methods. One project is implemented using C# and the other is implemented using VB.NET as there are some things I can do in VB.NET that I can't in C# and I want to leverage those features in my extension methods. How can I name the projects to convey their meaning while at the same time differentiating that they are implemented in different languages?For the C# elitists:One of the features that VB.NET supports that C# doesn't:Doesn't C# Extension Methods allow passing parameters by reference?FYI: This doesn't work for reference types, which is what I'm interested in.
public static void LoadFromXml<T>(this T targetObject, string xml)
{
targetObject = _Serializer.DeserializeFromXML<T>(xml);
}
What is the purpose of using shared methods that return an instance of a class, as opposed to a constructor?
ie: in VB.net, the system.drawing.color class has shared method "FromArgb(int, int, int) as color". This is different from java's implementation which simply is a constructor that takes three ints. Why the decision to do one or the other?
I am adding an undo feature for a DataGridView using the Command Design Pattern. To create the EditCommand, I have to know what was the previous value of the cell, so I can re-enter it in case the user hits undo. I'm doing it using the CellBeginEdit and CellEndEdit events. With the CellBeginEdit, I save the value of the cell in a private variable and at the CellEndEdit function, I use the saved value to create the EditCommand. It's working fine, but I wonder if there is a more saner way to do it. Maybe a event that holds together the previous and the new cell value. Bonus points if I could actually prevent the DataGridView from updating itself and let the EditCommand do it.
View 1 RepliesIn my application I am using MSComm32.ocx control for the purpose of serial port communication.
when i am using it I am getting a following error while writing data to the port.
"AxMSComm1.Output {"Exception from HRESULT: 0x800A018A (CTL_E_GETNOTSUPPORTED)"} Object "
I am writing the output to the port like below. AxMSComm1.Output ="Hello"
I mention the properties of the ocx control in the form load like below. AxMSComm1.CommPort = 1
AxMSComm1.Settings ="9600,N,8,1"
AxMSComm1.InputLen = 0
AxMSComm1.PortOpen =True
I searched for this error in the net.But I am not found any information for this issue.
can anybody explain why I am getting that error and how to resolve it???
I need to count the number of:
[Code]...
Can Regular Expression be used of this purpose? It's okay if they're in separate function, but I need to somehow get the counts of each of the above.
My problem is I need to develop a sales application to be used on 5 computers. The database needs to stay on a main computer and other computers should connect with that over LAN.I donot want to use SQL Server as it is too complicated to give permissions, setting up firewalls etc. for the end user.Is that any type of database that could serve my purpose, without giving sharing violation error?
View 1 RepliesTrying to update an oracle 10g table using asp.net and the oracleclient connector Here is the sql syntax:
[Code]...
everything works fine. The column PURPOSE does exist and I am able to INSERT information into the PURPOSE column.
I'm trying to read a word document for the purpose of obtaining a word count, I realise Word has built in functionality for presenting a word count but I want to write a little app that will omit certain parts of the document from the word count.
So far I have tried this code to open the document but I am getting an error 'Word.Document cannot be found' and 'Microsoft.Office.Interop cannot be found'. I have added a reference to the Microsoft Office 12.0 Object Library under the COM tab. I have Office 2007 installed and I'm using VB2005.
Imports Microsoft.Office.Interop
Dim appWord As New Microsoft.Office.Core.Application
Dim docWord As New Word.Document
docWord = appWord.Documents.Open("c: est.doc")
Can anyone guide indept what is the purpose of "My Extensions" tab in Project properties. if someone can send me some useful links etc.
View 2 Replieswhat is the actual use of Integer Divisor operator "" in vb.net ?
View 4 Replies