I have a VB.NET web application where I am opening a window when a user clicks on a link to view some external tabular data. The data I'm displaying definitely requires a vertical scrollbar in order to see everything...For some reason I cannot get a vertical scrollbar to show up when the new window loads.
Here's the JS that opens the wi...
To detect rotation of the mouse wheel in .NET/WinForms, I can override OnMouseWheel. Clicking can be detected by overriding OnMouseDown (it's just the Middle button). But how do I detect tilting of the wheel (tilt to the left/right for horizontal scrolling)? Neither OnMouseWheel, not OnMouseDown is being called when I tilt the mouse whee...
in vb I can do that
sub SetFocusControl(byref ctl as object)
ctl.Focus
end sub
in c# the compiler complaint that object doesn't have a Focus method
void SetFocusControl(ref object ctl)
{
ctl.Focus();
}
how can I do the same in c#?
thanks
...
What is the difference between a class with protected constructors and a class marked as MustInherit? (I'm programming in VB.Net but it probably equally applies to c#).
The reason I ask is because I have an abstract class that I want to convert the constructors to shared/static methods. (To add some constraints).
I can't do this becaus...
How can I play a sound based on waveform data that my .Net program is generating from user input and mathematical functions? By "waveform data" I am mean SPL values in a fixed interval time-series (probably 44.1 kHz). I presume that this requires some kind of streaming buffer arrangement.
Note, that this has to be live/real-time, so j...
During a code review I looked at set of repository classes (in vb.net). I am used to seeing these repository classes full of functions that return collections (among other things) of your domain objects. However, this repository had 1 public property and 1 private variable that looked something like this:
Private _item as Collection (of...
I want to connect an access dabase from a central server using vb.net 2005.Can you help me? please.
...
I want to know if it's possible to retrieve the variables name from when it was passed into a certain function. For example, if I call parseId(myId) to a function with the signature parseId(id), i can obviously retrieve the value of 'id'. However, is there any way I can retrieve 'myId' as a string (without passing it as another value)?...
i need to be able to drag and drop my picturebox with an image in it around my winform in vb.net.
...
is this solution possible in asp.net http://stackoverflow.com/questions/1086989/dragging-picturebox-inside-winform-on-runtime
i just want to be able to move an image around on a webform
...
I'm writing an asp.net web app. and i've hit a bit of a brick wall.
basically i have 2 pages, the main page with a text box in and a popup that contains a treeview.
My problem is this. when i select a treeview item i want the program to perform some database transactions using asp.net and then pass the value retrieved from the database i...
I just converted a VB.net solution into C# solution. But lots of variables have been coverted like:
string var1 = (string)1;
string var2 = (string)intVar; //intVar is a int value
I just want to convert all (string)XXXX to XXXX.ToString() by using some Regular expressions or some other replace methods.
Can someome help me out?
...
I'm using RhinoMock in VB.NET and I need to set the return value for a readonly list.
Here's what I want to do (but doesn't work):
dim s = Rhino.Mocks.MockRepository.GenerateStub(of IUserDto)()
s.Id = guid.NewGuid
s.Name = "Stubbed name"
s.Posts = new List(of IPost)
It fails on the compile because Posts is a readonly property.
Then ...
I just had a simple question, but I cannot seem to find a straightforward answer. I've been wondering this for a while, though.
I have seen several programmers use & and + for string manipulation.
Such as:
dim firstvar as string
dim secondvar as string
dim thirdvar as string
thirdvar = firstvar & secondvar
Or is it:
thirdvar = ...
I ran a Code Analysis and got this message:
Warning 5 CA1822 :
Microsoft.Performance : The 'this'
parameter (or 'Me' in Visual Basic) of
'MainForm.CheckFileIfFileIsInUse(String)'
is never used. Mark the member as
static (or Shared in Visual Basic) or
use 'this'/'Me' in the method body or
at least one property accessor...
Is there a way to look through the cache for all objects in the cache? I'm dynamically creating objects and I need to periodically go through the list to purge out objects I'm no longer using.
...
When in VS 2008 if a developer hits the ''' it generates the XML comment tags for you, but this only works when the project setting for "Generate XML documentation file" is checked.
Is there a way to tell VS to generate the XML Comment tags, regardless of the project setting?
I think it is possible that someone may want comments but no...
I have a DataGridView that is bound to a list of objects called "BaseChange". The BaseChange objects are made up of 4 properties...
ChangeType
ChangeStatus
ChangeDescription
LastChangeDate
The datagridview has columns for all 4 values as well as a 5th (a checkbox column called "colIsSelected"). There is no problem binding the list to...
In C# VS2008 how to replace
intA = (int)obj.GetStr("xxx");
to
intA = int.Parse(obj.GetStr("xxx"));
I have thounds of lines code have this pattern. I just want to pass compile by using some regular expression.
...
I've been given an old VB.net 1.1, Visual Studio 2003, project.
When debugging DateTime shows as #09:34:00 AM#, the date-part is hidden. I would like to see which date the DateTime is.
I've tried to modify mcee_cs.dat, but that doesn't seem to do anything.
Is there some other file I should modify to get my desired behavior?
/L
...