|
Hi,
you can draw the listbox items yourself when you modify DrawMode and provide
a DrawItem handler. That way you are fully in charge of position, size, color, whatever.
|
|
|
|
|
Hi!
I Need to check javascript in a richtextbox for errors at the click of a button,
I know that this is no small task, and every attempt I can think of or have tried
just loops through the textbox, highlighting and checking each and every word
and repeating this time and time again for every single function or method used.
It is Ridiculously Slow.
Is there an engine or perhaps some code out there that will allow me to do this reasonably
Quickly?
Thanks!
MrWolfy
|
|
|
|
|
Hi,
I would suggest you forget about the RTB and check the JavaScript in memory;
only touch the RTB (if you must) when there is something to report.
|
|
|
|
|
Thanks!
That helps a lot, but i still can't seem to figure out just how to check the javascript for
errors accurately, any advice?
Thanks Again!
MrWolfy
|
|
|
|
|
Hi,
MrWolfy wrote: i still can't seem to figure out just how to check the javascript for errors accurately, any advice?
it all depends on how far you want to take this. Maybe Google[^] will help you?
|
|
|
|
|
Hi Again!
Thanks for the link, problem solved!
Thanks Again
MrWolfy
|
|
|
|
|
Hello
How can i put the data of my dataset into my multiline textboxe
please help
Thanks in advance
Assaf
|
|
|
|
|
Loop through each row of the dataset, add it to a StringBuilder and then set the Text property on the textbox to the ToString() output of the StringBuilder.
Why wouldn't you just display the dataset in a datagrid?
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Hi there are Tow ways to do that but in both ways u should bind each TextBox alone
The First way
TextBox1.DataBindings.Add("Text", DataSetName, "TableName1.ColumnName1")
NumericUpDown1.DataBindings.Add("Value", DataSetName, "TableName1.ColumnName2")
And The 2nd way
Dim NewBind As New Binding("Text", DataSetName, "TableName1.ColumnName3")
TextBox1.DataBindings.Add(NewBind)
where:
"Text" and "Value" is the Property that u want to bind your data to as u see you should pass it as text
DataSetName is your DataSet
"TableName.ColumnName" is Your DataMember
Excuse my English
|
|
|
|
|
do anybody know where i can get advance and works on traning on mobile programming, buliding distributed application using .net 2008 and dba mssql 2008 in india
|
|
|
|
|
Ebube wrote: using .net 2008
You mean Visual Studio 2008, right? .net only goes up to version 3.5
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi All,
I have a big VRML model of a building which I divided into small vrml files such as: floor1.wrl, floor2.wrl, roof.wrl, and so on. Basically, I used 'Inline' node to import all of these small vrml files into my mother vrml file called 'building.wrl'.
I am using VB.NET form interface to allow the user to interact with the geometry. It works fine when I load any of the small vrml files (e.g. floor1.wrl) and then I can obtain the name of 3D elements in floor1 so that the user can change their texture. The problem is that when I load the main vrml file 'building.wrl' I am unable to interact with 3D elements inside the 'Inline' node.
So my question: how can I interact with the element/geometry inside an 'Inline' wrl file? Any feedabck or suggestion is very appreciated. I searched the internet for solution but could not find any.
Please please help
Thanks
|
|
|
|
|
I have searched everywhere for an answer and I
cannoit find one.
I have a LOT of forms with a standard list "List"
and I call a subroutine in VB6 that accepts the
form and fills the list. Example:
Sub ListFill(byVal aForm as Form)
' get RS from database'
'...
Do while Not Rs.EOF
aForm.List.AddItem Rs("Name")
Rs.MoveNext
Loop
End Sub
Can someone please help me figure out how to
translate this code into .NET?
Aloha and thanks in advance, Tony.
|
|
|
|
|
That code uses late binding to access the list in the form. You can only use late binding if you turn of strict checking, which you shouldn't.
There are basically two ways to do this:
1. Create an abstract base class that contains a property that returns a reference to the list. Make the forms inherit the base class, and implement the property.
2. Use the FindControl method to get a reference to the list.
Alternatively, make the method take a reference to the list instead of a reference to the form.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thank you for the reply.
I tried this code and it still doesn't work.
Public Sub ListBoxFill(ByRef aControl As System.Windows.Forms.Control)
Dim n As Integer
For n = 1 To 5
aControl.additem("Ciao")
Next
End sub
Am I doing something wrong with the reference to the list?
Aloha, Tony.
|
|
|
|
|
Sorry, let me clarify. It tells me that
AddItem is not a member of System.Windows.Forms.Control
|
|
|
|
|
Never mind, I am still thinking too much like VB6!
AddItem is a VB6 command, of course it didn't work.
Anyway, your suggestion to pass the control seems
to work. Thank you!
|
|
|
|
|
Pass the parameter as a ListBox instead of as a Control, otherwise you have to cast it before you can access the specific methods for the ListBox.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi, all.
I have one simple question, how to i open a windows form one project in other windows application project ??
I have 2 projects in one solution, and i added a refrence to my main windows application project, so i can see all the forms in other project.
Dim NewForm as windowsapp1.form1NewForm
NewForm= new windowsapp1.form1
NewForm.Show
Is there anyway to bypass this code, and open a form directly without declaring a new form and then open it?
Tnx for your help in advance.
|
|
|
|
|
C4ao5 wrote: Is there anyway to bypass this code, and open a form directly without declaring a new form and then open it?
Can you open a form without opening it ? How were you hoping to do that ? You can use Process.Start to start another exe, but that's about it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
The thing is i have one main project.
In that project i want to display Windows Forms form other project.
Since i have 30 forms in that other project i dont want to declare a new form evry time i need to open it, becuse its very time consuming.
So i was just wondering is there any other way to do it ?
not to use;
Dim newForm as mainAPP.form1
newForm = New mainAPP.form1
newForm.show()
use something else to access the form directly if extists....
|
|
|
|
|
C4ao5 wrote: use something else to access the form directly if extists....
Like I said, nothing else exists, plainly the way to open a form is to create it. On what basis were you hoping for them to open, I mean, you have to do SOEMTHING, to control when it happens, right ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Right,
tnx for your help.
|
|
|
|
|
I did find a way to do it using system.reflection.
Private Sub OpenFormFromAssembly(ByVal FormName As String)
Dim MyAssembly As Reflection.Assembly = Reflection.Assembly.LoadFile(" Assembly to load ")
Dim MyTypes As Type() = MyAssembly.GetTypes
For Each mType As Type In MyTypes
If mType.BaseType Is GetType(Form) Then
If mType.Name = formName Then
Dim o As Object = Activator.CreateInstance(mType)
Dim f As Form = CType(o, Form)
f.Show()
End If
End If
Next
End Sub
No need to declare a new form evry time you need to open it.
BTW, i will load an assembly if is active in database,if user has right to access it....
Tnx for your help.
|
|
|
|
|
Sure - the real question is, why do you want to open every form modelessly ? I mean, what possible use is this ? You app has 30 different forms open, and no way of interacting with any of them. That's the core question I was asking you, why do that ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|