c# Programming Glossary: dim
A Simple C# DLL - how do I call it from Excel, Access, VBA, VB6? http://stackoverflow.com/questions/1170794/a-simple-c-sharp-dll-how-do-i-call-it-from-excel-access-vba-vb6 machine you need to use regasm. To then consume this Dim o Set o CreateObject TestDll.Test MsgBox o.HelloWorld You can.. You can also reference the dll and use early binding Dim o As TestDll.Test Set o New TestDll.Text MsgBox o.HelloWorld..
How to get ALL child controls of a Windows Forms form of a specific type (Button/Textbox)? http://stackoverflow.com/questions/3419159/how-to-get-all-child-controls-of-a-windows-forms-form-of-a-specific-type-button easier or more straightforward maybe like the following Dim Ctrls From ctrl In Me.Controls Where ctrl.GetType Is Textbox..
Is there a string math evaluator in .NET? http://stackoverflow.com/questions/355062/is-there-a-string-math-evaluator-in-net this to evaluate an expression. Also works for JScript. Dim sc As New MSScriptControl.ScriptControl sc.Language VBScript.. As New MSScriptControl.ScriptControl sc.Language VBScript Dim expression As String 1 2 7 Dim result As Double sc.Eval expression.. sc.Language VBScript Dim expression As String 1 2 7 Dim result As Double sc.Eval expression Edit C# version. MSScriptControl.ScriptControl..
Get File Icon used by Shell http://stackoverflow.com/questions/462270/get-file-icon-used-by-shell question Imports System.Drawing Module Module1 Sub Main Dim filePath As String C myfile.exe Dim TheIcon As Icon IconFromFilePath.. Module1 Sub Main Dim filePath As String C myfile.exe Dim TheIcon As Icon IconFromFilePath filePath If TheIcon IsNot Nothing.. Function IconFromFilePath filePath As String As Icon Dim result As Icon Nothing Try result Icon.ExtractAssociatedIcon..
There is a Default instance of form in VB.Net but not in C#, WHY? http://stackoverflow.com/questions/4698538/there-is-a-default-instance-of-form-in-vb-net-but-not-in-c-why wouldn't format it properly Form1.Show 'Second method Dim frm as New Form1 frm.Show 1 My question comes from this first..
ObservableCollection Doesn't support AddRange method, so I get notified for each item added, besides what about INotifyCollectionChanging? http://stackoverflow.com/questions/670577/observablecollection-doesnt-support-addrange-method-so-i-get-notified-for-each Sub ReplaceRange ByVal collection As IEnumerable Of T Dim old Items.ToList Items.Clear For Each i In collection Items.Add.. Public Sub AddRange ByVal collection As IEnumerable Of T Dim ce As New NotifyCollectionChangingEventArgs Of T NotifyCollectionChangedAction.Add.. OnCollectionChanging ce If ce.Cancel Then Exit Sub Dim index Items.Count 1 For Each i In collection Items.Add i Next..
Is it possible to intercept (or be aware of) COM Reference counting on CLR objects exposed to COM http://stackoverflow.com/questions/2223147/is-it-possible-to-intercept-or-be-aware-of-com-reference-counting-on-clr-objec in the COM component exposing the .NET Component. dim comWrapper dim vbsCalculator set comWrapper CreateObject Calculator.Lib.. COM component exposing the .NET Component. dim comWrapper dim vbsCalculator set comWrapper CreateObject Calculator.Lib set..
How to get ALL child controls of a Windows Forms form of a specific type (Button/Textbox)? http://stackoverflow.com/questions/3419159/how-to-get-all-child-controls-of-a-windows-forms-form-of-a-specific-type-button that code once in the past that used something like this dim ctrls as Control ctrls Me.Controls GetType TextBox I know I..
Best way to print from c# / .net? http://stackoverflow.com/questions/371384/best-way-to-print-from-c-sharp-net Dim textToPrint as String .NET Printing is easy dim printFont as new Font Courier New 12 dim leftMargin as int e.MarginBounds.Left.. Printing is easy dim printFont as new Font Courier New 12 dim leftMargin as int e.MarginBounds.Left dim topMargin as int e.MarginBounds.Top.. Courier New 12 dim leftMargin as int e.MarginBounds.Left dim topMargin as int e.MarginBounds.Top e.Graphics.DrawString textToPrint..
Equivalent of WeekDay Function of VB6 in C# http://stackoverflow.com/questions/400421/equivalent-of-weekday-function-of-vb6-in-c-sharp some of my VB6 Code to C# In my VB6 I am having code like dim I as Long I Weekday Now vbFriday I want equivalent of the same..
Inconsistency in divide-by-zero behavior between different value types http://stackoverflow.com/questions/4609698/inconsistency-in-divide-by-zero-behavior-between-different-value-types I did this in VB.NET as well with more consistent results dim d as double 0.0 Console.WriteLine 1 d ' compiles runs results.. Console.WriteLine 1 d ' compiles runs results in Infinity dim i as Integer 0 Console.WriteLine 1 i ' compiles runs results..
Accessing a .NET Assembly from classic ASP http://stackoverflow.com/questions/520165/accessing-a-net-assembly-from-classic-asp a .NET Assembly that I have created in classic ASP using dim foo set foo Server.CreateObject TestAssembly.MyClass The problem..
How do you disable an item in listview control in .net 3.5 http://stackoverflow.com/questions/5472172/how-do-you-disable-an-item-in-listview-control-in-net-3-5 I have a listview with CheckBoxes true. Is it possible to dim out or disable some items to prevent the user from checking.. UseItemStyleForSubItems properties to make the item look dimmed. Use SystemColors.GrayText to pick the theme color for disabled..
How to write unicode chars to console? http://stackoverflow.com/questions/5750203/how-to-write-unicode-chars-to-console Sub Main Console.OutputEncoding System.Text.Encoding.UTF8 dim i as integer for i 0 to 1000 Console.Write ChrW i if i mod 50..
Use value of a parent property when creating a complex child in AutoFixture http://stackoverflow.com/questions/7319984/use-value-of-a-parent-property-when-creating-a-complex-child-in-autofixture with is the public API. Think of AutoFixture as a very dim programmer who doesn't even understand your language not even..
How to call C# DLL function from VBScript http://stackoverflow.com/questions/769332/how-to-call-c-sharp-dll-function-from-vbscript codebase MyAssembly.dll and finally call it from VBScript dim myObj Set myObj CreateObject MyNamespace.MyObject share improve..
C# setting screen brightness Windows 7 http://stackoverflow.com/questions/8194006/c-sharp-setting-screen-brightness-windows-7 Windows lets me only adjusting in limited range. I want dim the display from 0 to 100 and turning it off on. It should be..
|