C# - How To Set Type.IsGenericTypeDefinition To True
May 25, 2011
I have an many class with BeginDate and EndDate properties, I want to build generic method that return one object as List of the same type but with BeginDate=EndDate. [Code], but I faced a problem that Type.IsGenericTypeDefinition of my classes is false. How can I set it to true?
View 2 Replies
ADVERTISEMENT
Oct 2, 2010
i am using VS 2008 and just started to work with XAML and WPF. while opening in page(.xaml) in design mode i'm getting the error like this "Only TrueType fonts are supported and this is not a TrueType font".
View 7 Replies
Jul 29, 2011
Please Correct me if I have posted this in the wrong forum, I have a relatively simple question, I'm looking for a way to use Non-True type fonts in Visual basic. Specifically in a Forms app, and I'm looking to use said fonts in a Non-User Input object. (Label) If it helps, I'm looking to use Some Adobe Fonts such as Myraid Pro.
View 1 Replies
Nov 23, 2010
How can I make a vb.net 2008 program install a True Type Font that it needs.
View 2 Replies
Mar 23, 2011
But c'mon. I know I can ctype that thing into mshtml.IHTMLDOMChildrenCollection
View 6 Replies
Apr 26, 2011
I try to use a special font in my programm xxxxxx.ttf (true type font)and i got this error "only tryetype fonts are supported .this is not a true type font "i used it before with same programm but since i installed a very old version of xp i got the error.
View 2 Replies
Jan 24, 2012
Dim method1 = Function(x As Integer, ByRef y As Integer) As Boolean
If x = y Then
Return True
Else
[code]....
View 3 Replies
Feb 11, 2012
I know that
Public Incognito As Boolean
is a variable called "Incognito" that is class-wide that is a boolean.My question is that is there a form-wide variable form that can like communicate with different forms. So if a variable in form1 is "True" than, how can you make a variable in form2 turns to "True" too?
View 1 Replies
Jul 15, 2010
I wanted to create my own type that acts like the Boolean type, except I wanted to use Yes and No instead of True and False.I kind of got close but it wasnt exactly what i was going for here's what i have:
[code]...
so i have to use an integer when i dim it like:dim b as MyBool = 1 then when you look at it in the watch window b = {Yes} so i could settle for that, but with a boolean you can do this:dim b as Boolean without setting it to anything it defaults to False mine however, is Nothing. 2 things: 1. How can i get mine to default to No 2. How can i make it work like this: dim b as MyBool = Yes instead of having to use the integer this is not a requirement for anything I just wanted to know how to do it
View 13 Replies
Jul 26, 2011
This is probably a basic question, but I have never used this syntax before. Can someone tell me in detail how this expression evaluates to true? [Assuming IsOdd is a boolean type].
Dim i As Integer = 3
IsOdd = (i And 1) = 1
View 4 Replies
Feb 20, 2011
The expression 3>6 AndAlso 7>4 evaluates to
A. True B. False
The expression 4>6 OrElse 10<2*6 evaluates to
A. True B. False
The expression 7>=3+4 OrElse 6<4 AndAlso 2<5 evaluates to
A. True B. False
View 4 Replies
May 18, 2012
The VB code below assigns True value assign to the function. But when I convert to C#, I am getting an error like we can not assign True to a method. How can I assign true to the method in C#. This is my VB code:
Private Function KeyOK(ByVal sKey As String) As Boolea
KeyOK = True
sKey = Trim(sKey)[code]......
View 2 Replies
Jan 18, 2010
I'm pretty new to Vb so I'm not sure of all the correct terminology etc.
Private Sub Add_mousedown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add.MouseDown
Dim Addition As Boolean
[code].....
View 2 Replies
Nov 1, 2009
I've got this function which converts wav files to mp3. I call this from my button_click handle. The thing is, when the conversion is started, the rest of the code in the button_click handler continue, while the conversion is happening in a different thread. Now, I need the rest of the code in the button_click handle so continue to try until a boolean is true, so that I know that the conversion is done before the rest of the code continues. I've tried using Do While but it didn't seem to do the trick. Perhaps it's just me though..
View 2 Replies
Oct 29, 2009
I'm trying to make a textbox at runtime, Dim t as Control
t = New Textbox
t.Multiline = True
t.Size = New Size(300,120)
Form1.Controls.Add(t)
I found out that you can only size a textbox when Multiline is set true. And that's the problem. When I use t.Mutiline = true I get the error " 'multiline' is not a member of 'system.windows.forms.control' "
I've searched the internet for hours without result.
View 3 Replies
Apr 30, 2010
I have the function below which I call onload, I want to be able to check the checkbox (chkactive) if the ProjectStatus is set to True, how can I do that please.[code]
View 4 Replies
Apr 8, 2010
I'm reading in a RTF file that I want to search by either using WholeWord or MatchCase search options.
atm I have this:
If (chkWhole.Checked = False) And (chkMatch.Checked = False) Then
'ERROR - MUST SELECT A SEARCH OPTION
[code].....
View 1 Replies
Feb 11, 2009
I know I'm being quite pedantic here. But, what is the right way to get a true 50/50-chance with a generated random number? Say, to simulate the flip of a coin. [code] I know this difference is close to nothing, but I'm doing some calculations on bell curves, in such a way that it requires true 50/50-chance.
View 33 Replies
Dec 11, 2010
I am using a TextBox for DoDrop right now but I noticed AllowDrop for Form1 my question is how would I need to go about doing away with the TextBox and just use Form1 drop to assign a file path?
View 15 Replies
Jan 27, 2010
I have a form which creates a new school talk appointment. In my database, there is a column called 'active' which is boolean (true or false). Then everytime I creates a new school talk appointment and added it to database, the active is automatically set to 'false'. how to make it set to 'true' instead?
View 10 Replies
Sep 29, 2011
I have a Listview listing multiple files with the following code
Dim index As Int16 = 0
For Each Item As String In NewFilenames
ListView2.Items.Add(Item.Substring(Item.LastIndexOf("") + 1), index)
index = index + 1
Next
I need to set all the checkboxes to true somewhere in this statement.
View 4 Replies
Sep 18, 2010
I am writing the code in the class to create the strings. I want the value to returns as true if the strings in the class are matched with two numbers or more, but if the if the strings in the class are not matched with first two numbers or not then returns the value as false.[code]....
View 4 Replies
Nov 9, 2009
I have a group box set as false but when I click on radiobutton3 i want it to show at the bottom:
if radiobuttion3.checked the
radiobutton4.enabled = true
end if
but this doesn't show up my second group box when the program is running.
View 5 Replies
Oct 5, 2009
I did this once before but I can't find the code where I did it. I have 4 checkboxes and I want to assign them each a value like:
[Code]....
I've searched the net and even scanned 3 different computers that may contain that source code and have not had any luck finding it.
View 1 Replies
Nov 9, 2009
I have a Group Box Set as false but when i click one Button I want it to Show as True so i have [code] But is not Showing up when i run the program, is this the right code?
View 1 Replies
May 28, 2011
Is there anyway for a form to become in focus.. basically something like Me.inFocused = True, In order to print a form, it must be visible and in focus, so I need to focus on it without the user having to click it so that I can send the form to a printer
View 1 Replies
Mar 27, 2009
i am grabbing text from google textbox with this code
Dim text As String = WebBrowser1.Document.All("q").GetAttribute("value")
TextBox1.Text = text
and i wanted to know if there is a code where it can search for the id "q" and if it doesn't exists then do nothing but if it does then
Dim text As String = WebBrowser1.Document.All("q").GetAttribute("value")
TextBox1.Text = text
View 2 Replies
Jun 25, 2010
What are the true advantages of using #Region?
View 6 Replies
Oct 13, 2010
I've come from a Assembler and C/C++ background, so I understand the concept behind reference types versus value types in vb.net. Also, I've read Jon Skeet's article regarding references and value types and I understand all of that. My question is: How can you tell if a given type is a reference type or a value type? Is it simply that all integral types (ints, floats, etc.) are value types and all classes are reference types? (If so, where do strings fall?)
[Code]...
View 1 Replies
Jun 4, 2010
I am trying to build an error handler for my desktop application. The code Is in the class ZipCM.ErrorManager listed below.What I am finding is that the outputted file is not giving me the correct info for the StackTrace.Here is how I am trying to use it:
Try
'... Some stuff here!
Catch ex As Exception
Dim objErr As New ZipCM.ErrorManager
[code]....
What is happenning is the .GetFileLineNumber() is getting the line number from 'objErr.Stack = New System.Diagnostics.StackTrace(True)' inside my Try..Catch block. In fact, it's the exact line number that is on. how I can catch the real line number the error is occuring on?
View 2 Replies