Distinguish Between Built-in Methods/property/events And Mine?
Jun 13, 2012
When inheriting class or control e.g. ListView, TreeView, etc..., what is the best way to distinguish between built-in methods/property/events and mine?Currently, i start my methods/property/events with "aa" in order to make them at the top of auto complete list.
View 1 Replies
ADVERTISEMENT
May 15, 2012
When inheriting class or control e.g. ListView, TreeView, etc..., what is the best way to distinguish between built-in methods/property/events and mine?
Currently, i start my methods/property/events with "aa" in order to make them at the top of auto complete list.
View 14 Replies
Dec 13, 2010
I was wondrening if there is any built in functions to search for a sequence in a string
View 1 Replies
Nov 20, 2010
Simple Question about .Net processing:
[code]...
View 2 Replies
Dec 24, 2010
I was wondering about the EventInfo.GetRaiseMethod and EventInfo.GetOtherMethods methods. Apparently, the CLR supports 4 kinds of methods associated with events: add, remove, raise, and "others". But events created in C# only have add and remove... I assumed that raise was used in VB, since you have to specify a RaiseEvent method when you declare a custom event, but apparently it's not the case: GetRaiseMethod always returns null.what's the point in having a raise method associated with an event if it's never used? Is there a specific MSIL instruction to raise an event using this method? (I couln't find anything like it in the opcodes)what are the "other" methods returned (well, not returned actually) by GetOtherMethods? What's are they supposed to do?are there types in the BCL that implement those special methods?
View 2 Replies
Aug 13, 2010
(using VB.Net 2008) I have some modules in my program that I want to change to shared classes. This is due to subtle differences between shared classes and modules, such as how modules cannot be nested (I think). Of course, there is no such thing as a "shared class" in vb, rather just sharing every single sub, event, etc. So that means if I want to share or unshare a class, I must change the "Shared" part of the signature of every single method inside the class (of which there could be dozens or even hundreds). Is there an automated way to do this? Really think VB made a mistake by not simply declaring a class as "shared" (or just make modules completely identical to shared classes).
View 4 Replies
Aug 5, 2010
Whenever we need to handle events, we do it by creating a method which handles the event. Without creating methods; is there some other ways of handling events?
View 6 Replies
Mar 6, 2012
If I have an application that load some assembly at runtime. Is it possible to access the events and the methods of these assemblies direcly, without always using Reflection
View 15 Replies
Apr 11, 2012
I was looking for a tutorial and i find this
[URL]
but it does not give the sample code for creating a user control with properties, events, methods
complete to create windows user control? that includes creating properties, events, methods? and if it has how to create web user controls better
View 1 Replies
May 11, 2010
limit the default events, properties and methods exposed from a UserControl so it only displays to the developer the new events etc that I code myself.What i mean is I have created a UserControl with a panel and 5 buttons, written 1 Public Eventonly at this stage, I have placed an instance of the control on a form in a new project, but in the drop down menu that comes up after say (myUserControl1.), there is a massive list of options, I don't want those to appear.
View 3 Replies
Jun 29, 2010
Is it possible to immediately use code that is built in a dynamically built assembly?I would like to create an instance of an ENUM built using.http:[url]......
View 4 Replies
Nov 5, 2009
I have a winforms app and my code works fine.But I want to know if my code is bullet proof or if it only works without load.Let me explain it:I have a windows form where I have overridden the OnKeyDown method:
Protected Overrides Sub OnKeyDown(ByVal e As System.Windows.Forms.KeyEventArgs)
dim args as new ActionEventArgs(ActionType.Bark)
RaiseEvent Action(me, args)[code].....
Now I have a class that is registered to this event and, if it knows how to handle the ActionType it sets Handled to true.
Public Sub actionHandler(ByVal sender as Object, e as ActionEventArgs) Handles me.Action
If e.Handled then return
If e.Action = ActionType.Bark[code]....
I tried this code at my developer machine and it seems to work. In the OnKeyDown Method, everytime I query the Handled variable, my actionHandler method did run first.But I asking me if this is only the case because my developer machine is in idle state and the event queue is processed so fast or can I expect the
RaiseEvent(...)
method to wait until every registered EventHandler has finished it's taks?
View 2 Replies
Dec 24, 2009
I have another question about my customizable Menu/Tool/StatusStrip control.
I have three controls called CustomizableMenuStrip, CustomizableToolStrip and CustomizableStatusStrip. Each of those controls has a property called Appearance, which accepts an instance of a component called AppearanceControl.
The AppearanceControl component basically exposes all color properties for the customizable strips, so the user can edit them, and more importantly exposes a ToolStripProfessionalRenderer which the three strips have to use. This way the three strips are rendered with the colors the user chooses in the AppearanceControl.
Now, I'm wondering if I'm doing things the right way. When any of the color properties in the AppearanceControl has changed, all the strips that use that particular AppearanceControl should have their Renderer set again, and should be invalidated.
I figured the easiest way (and probably the only way?) to go about this was to have the AppearanceControl raise an event (AppearanceChanged), which the three strip controls listen for. When that event is raised, the strip controls can set their Renderer to the Renderer that the AppearanceControl exposes, and then invalidate themselves.
[Code].....
View 7 Replies
Jan 13, 2010
I want to add a custom property to a button in window form. Currently i am using following code to create my logic. but i want to create an enum value for a button control.
btnPartyDetails.Text = "View";
{}
btnPartyDetails.Text = "Add";
{}
[Code]...
I want to do something like this, where ActionType will be my enum.
I also want to create custom event based on the value set. How can i do this ?
View 3 Replies
Sep 19, 2009
Warning1property 'Events' shadows an overloadable member declared in the base class 'MarshalByValueComponent'. If you want to overload the base method, this method must be declared 'Overloads'.
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.ComponentModel.Browsable(false), _
Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.De
[code].....
View 5 Replies
May 6, 2011
I am using Timer Event in "Form1".By Running Timer Event i am getting data.
I want to STOP the Timer by clicking on Stop button.The Stop Button is in "Form2"
My Problem is When i click on Form2 Stop Button,the timer is still running mode.The Timer event is not going to stop.
I tested about Timer How to stop in sample appplication.In sample Application its working fine.When my Project application its not working(Timer not go to STOP)
View 8 Replies
Aug 29, 2011
This is the original code in c#
public class CategoryRepository: RepositoryBase<Category>, ICategoryRepository
{
public CategoryRepository(IDatabaseFactory databaseFactory)
: base(databaseFactory)
[Code]...
Does anyone has an idea what i should change to let it work and let my UserRepository use the methods in RepositoryBase while implementing the IUserRepository?
View 1 Replies
Aug 26, 2009
i cant seem to get an array of mine to populate. [code]Whats happening is that LogArray under the else statement is saying Variable 'LogArray' is used before it is assigned a value.Again I'm new to VB and I'm not to sure what this is trying to do. I thought I assigned LogArray above when I put.
View 10 Replies
Jan 26, 2010
I am trying to mine data from a webpage and use that data to populate textboxes (which will later be used to fill out and print a form).
For example, if the HTML source code looks like this...
<html>
<head>
<title>myGulf.com: Customer Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="gsstyles.css" rel="stylesheet" type="text/css">
</head>
...
How would I mine or parse "myGulf.com" and place it into a textbox? I have tried using regex, but cannot get the code to work by viewing incomplete code snipets from other posts (I dont yet have enough understanding of regex).
View 8 Replies
Sep 1, 2010
I have so far been able to write the program that glasses the windows I want (via a global keyboard shortcut).
I now need a way to replicate Glass2k's feature which makes glassed windows stay on top of all windows irrespective of which program I switch to (more like setting a WinForm's TopMost property to True. Is there any way of doing this in .NET?
I'm prepared to get down and dirty with DllImports and all so any suggestion is welcome as long as it is in VB.NET or C#.
View 1 Replies
Jun 27, 2011
I am trying to open a past project of mine in studio 08. The project was created in 08. I have added the mysql.data/ imported my dump/ changed the user, pass in the connection strings and everything debugged succesfully and I could run my program. When I try to open a form in designer It is not shown giving me this error :
"Warning2Could not load file or assembly 'MySql.Data, Version=6.1.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d' or one of its dependencies. The system cannot find the file specified. 00"
It does not show the form but just an error page with this header "To prevent possible data loss before loading the designer, the following errors must be resolved:If I press ignore I see the form but the errors remain. If I close the form the errors go away? I am confused and wonder if these can affect the program in the future? What I am doing wrong?
View 2 Replies
Apr 12, 2011
I have a barcode scanner connected to a PC that working with a c# program.now i want to distinguish between the scanner and the keyboard which one is sending data to my program.
somebody said this to me in another topic(but i can't do this yet): basically you can configure the scanner to send some characters that basically tell the computer "hi, it's me". When you see those characters in your input stream, you know the information is coming from the barcode scanner, not from something the user typed on the keyboard. Did you check the manual that came with your barcode scanner? It should have more information about this.
View 2 Replies
Oct 15, 2011
I want my to create an explorer like application. What control should i use to show the contents of a directory.I tried listview and listbox. Unfortunately i was unable to add items in a listview using the function getdirectories("D:")I managed to do so with listbox control. But how can i distinguish whether the selected entry is a file or a directory. Code snippet is given below :
Private Sub ListBox1_DoubleClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBox1.DoubleClick
<strong>sel = ListBox1.SelectedItem</strong>
ListBox1.Items.Clear()
[code]....
I want that if thesel is file, then it'll be open in its default application,i.e. using system.process.start(sel.filetype).Else if sel is a directory then the directory will open.
View 2 Replies
Oct 17, 2011
So basically, i have 2 int variables, x and y i am using to create a grid of pictureboxes.This is all fluid and built on runtime.I am trying to specifically change the picturebox on click if mine = 2.I cannot specifically change one, when i click any, it changes all of them.
Heres my code:
Public Class Form1
Inherits System.Windows.Forms.Form
Dim images(8) As Image 'declares image array
[code].....
View 2 Replies
Jan 27, 2012
I am working on automation project for a 3rd party Application. This application has given APIs for various automation tasks (like, Menu automation, toolbar automation, etc)
My code is in VB.NET.
Automation could be made in client-server mode, my code being client, this 3rd party App being server. When I create an instance of 3rd party App ( using CreateObject(<progID>), it brings up its own GUI Framework.
I have my own GUI Framework with customised menu items as well as my some more automation code.
At present, both the GUI frameworks are floating in a dis-jointed and independent manner. I would like to contain the 3rd party GUI Framework within my own GUI framework whenever it is moved around.
View 7 Replies
Dec 29, 2010
I doubt I can do this but it is worth a try asking. I know how to write to the current user in the registry along with local machine, etc. Is there a way to update an existing key for all users under the current user? I want to change a value for everyone on the computer as iff you went into regedit and opened the current user keys for that person. But I want to do it from the admin account for all other users also.
View 3 Replies
Sep 7, 2010
Put a Datagridview on a form, fill it with data. dgv1.enabled = True and dgv1.enabled = False are almost the same look to the eye unlike other controls (textbox,combo, listview, etc ...) where there back color changed to light grey and you can distinguish if that control is enabled or disabled but not for Datagridview.
View 2 Replies
Jun 24, 2011
I am working with a vb program, but there is something strange on one of my .vb code pagewhen i put the "dot" afther the object name its dont show the methods availables for this objectbut on other vb code pages i can see it. but in this one no.for exmaplethis is a piece of code: Dim sb As New StringBuilder()
View 3 Replies
Mar 29, 2010
I am not sure how clear my question is by the title, but I am trying to make Class methods instead of Instance methods in Visual Basic that way I don't have to waste memory and code creating temporary objects to execute methods that don't need instance variables.
I am not sure if you can do that in VB but I know you can in Objective-C by using either a "+" or "-" sign in front of the method declaration. And in C++ (at least I think, I can't remember) you put the static keyword or const keyword in front of the function.How would I do this in VB if it is possible? Or should I just make a separate set of functions that are not members of a class?
View 2 Replies
Oct 17, 2011
I'm beginning the process of trying to recreate minesweeper. See the attached picture of the version on my computer. My guess would be all the click-able locations are images. But notice the beveled borders around all the components, and how they separate the different section of the game. How would I go about created that? And what about the digitized timer and mine counter. Are those images too? I'm fairly new to VB programming (windows programming in general).
View 4 Replies