-
- Visual C#
by emartin24
- 7211 Replies
- emartin24 Views
- Last post
-
refection question
- Hello,
I am failry new to C# and have a reflection question. I am passing an object to a method and want to determine the type so I can call methods from it. I am just not really sure how to do it...
public static void setStatus(DataPanel panel, object dataSource)
{
Type claimType = dataSource.GetType();
// call a method on object of claimType
}
I am just not sure what the proper syntax is.
Thanks,
Eric
-
- IE Development
by iso
- 2881 Replies
- iso Views
- Last post
-
office business applications - supply chain mangement sample
- I have downloaded the sample msi file:OBA Reference Application Pack for Supply Chain Management.msi from the Microsoft Web Site but when I try to install it via MSIEXEC I get the following message: A network error occurred while attempting to read from the file:OBA%20Reference%20Application Pack%20for%20Supply%20Chain%20Management(1).msi. Any recommendations or solutions.
-
- Windows Forms
by WinFormsUser13232
- 12743 Replies
- WinFormsUser13232 Views
- Last post
-
bug in control box behviour..
- Hi..
I have ;come ;across ;a ;strange ;situation. ;I ;have ;a ;winForm ;in ;my ;application.. ;which ;is ;normally ;hide ;/visible ;false ; ;but ;used ;to ;prvide ;the ;Even ;handling ;functionality ;for ;for ;Tray ;application. ;I ;have ;set ;ShowInTaskBar=false ; ;and ;IsAccessible=False ;for ;my ;winform. ;bt ;still ;i ;am ;seen ;that ;form ;when ;I ;use ;"Alt+Tab" ;does ;any ;body ;know ;the ;reason.
My ;secnod ;problem ;is ;related ;with ;ControlBox=false ;property.
MSDN ;says ;"if ;any ;form ;does ;not ;have ;ControlBox ;this ;form ;doesnt ;closed ;by ;Alt+F4.
but ;when ;i ;set ;ControlBox=False ;for ;my ;winform, ;its ;controlBox ;disapper ;but ;still ;i ;m ;able ;to ;close ;it ;using ;Alt+F4. ;Is ;ita ;bug ;or ;what.
as ;it ;was ;working ;in ;VB6
Thanks
Rohit
-
- Visual Studio
by dakota367
- 16716 Replies
- dakota367 Views
- Last post
-
the best
- What are some of the most usefull or some of your favorie additions/plugins/enhancements for vs
-
- Game Technologies
by ECHS BACHS
- 6072 Replies
- ECHS BACHS Views
- Last post
-
3d pix 360 demo
- "3D PIX 360" - Alpha Demo 1 ...
Download it at ...
http://games.archor.com
... OR ... from the 360 Projects Section of ...
http://www.threesixbox.com
http://www.threesixbox.com/project/ id=a613b18d7c
- > ScreenShot ->
http://www.archorwright.com/games/xbox360/cade_3d_360_samps.jpg
NOTES:
View Extruded "3D Embossed Effects" on 2D Images on the XBOX 360 via XNA GSE.
Controls: Use the XBOX 360 Controller - Left Stick to Spin Around. Press the Right Trigger to Move. Press "A" button to Reset the View to Center.
It is Still in Early Alpha Testing, but, worth a look.
;
-
- SharePoint Products
by tm9t9
- 1888 Replies
- tm9t9 Views
- Last post
-
lookup task run very slow when hitting big tables
- I try to convert a Procedure that join 8 tables with INNER AND OUTER JOIN, my understanding is that the Lookup task is the one to use and I should break these joins into smaller block, it takes a long time to load when I do this, since each of these tables had 10-40mill. rows and I have 8 tables to go thru, currently this Stored Procedure took 3-4min to run, by converting this to 8 Lookup tasks, it ran for 20min. has anyone run into this issue before and know a work around for this.
Thanks
-
- Audio and Video
by bharathi_tunes
- 1166 Replies
- bharathi_tunes Views
- Last post
-
style attributes
- 1) In some of the style namespace attributes(like style:height, style:width), it was given in spec that it Applies to : all display elements but non-replaced inline elements
display elements are : body, br and object
inline elements are : br, span, area, button, input, object
what are the elements that will come under display elements but non-replaced inline elements Pls explain this.
2) ;Are all style namespace attributes ;have default values Is there any style namespace attributes that must be compulsorily mentioned in elements or all are optional
-
- Visual Basic
by JO91
- 8556 Replies
- JO91 Views
- Last post
-
help help experts..sending email. see this method i posted.
- Can anyone tell me why after sending email, I get the errorMESSAGE:
'IMPOSSIBLE TO READ FROM THE TRANSPORT connection: net_io_connectionclosed !'
Can AnyEXPERT tell me how can I open that damn connection,
they are saying it is closed !!!
HELP HELp !!!
Cris
-
- Microsoft ISV
by Douglas Penna
- 1294 Replies
- Douglas Penna Views
- Last post
-
mergesort for double arrays
- Hello There =)
I made a MergeSort function for matrices with Double Data. I haven't found this on the web (one that works, that is), so I am posting here, so ppl can watch, and maybe improve.
To use with strings and other kinds of variables, you just have to change the compare statement, and the type (Double). The compare statements are bolded.
Cya
Public Function MergeSort(Doubles() As Double) As Double()
Dim s As Long, i As Long, n() As Double, m() As Double
Dim u As Long, l As Long, j As Long, x() As Double
' Only 1 element
If (UBound(Doubles) - LBound(Doubles)) = 0 Then
MergeSort = Doubles
Exit Function
' Only 2 elements
ElseIf (UBound(Doubles) - LBound(Doubles)) = 1 Then
MergeSort = Ordena2(Doubles)
Exit Function
Else
SplitArray Doubles, m, n
m = MergeSort(m)
n = MergeSort(n)
MergeSort = MergeArray(m, n)
End If
End Function
Private Sub SplitArray(Doubles() As Double, _
DoubleOut1() As Double, DoubleOut2() As Double)
Dim meio, pos_Doubles, pos_Quebrado As Long
Dim z As Long
If (UBound(Doubles) - LBound(Doubles)) = 0 Then
Exit Sub
End If
meio = Int((UBound(Doubles) - LBound(Doubles)) / 2)
pos_Quebrado = 0
For pos_Doubles = 0 To (meio - 1)
ReDim Preserve DoubleOut1(pos_Quebrado)
DoubleOut1(pos_Quebrado) = Doubles(pos_Doubles)
pos_Quebrado = pos_Quebrado + 1
Next
pos_Quebrado = 0
For pos_Doubles = meio To UBound(Doubles)
ReDim Preserve DoubleOut2(pos_Quebrado)
DoubleOut2(pos_Quebrado) = Doubles(pos_Doubles)
pos_Quebrado = pos_Quebrado + 1
Next
End Sub
Private Function MergeArray(Double1() As Double, _
Double2() As Double) As Double()
Dim pos1, pos2 As Long
Dim Array_Final() As Double
'Check if Double1 or Double2 are empty
On Error Resume Next
If IsEmpty(Double1(0)) Then
MergeArray = Double2
Exit Function
ElseIf IsEmpty(Double2(0)) Then
MergeArray = Double1
Exit Function
End If
ReDim Array_Final((UBound(Double1) - LBound(Double1) + 1) + (UBound(Double2) - LBound(Double2) + 1) - 1)
pos1 = LBound(Double1)
pos2 = LBound(Double2)
Do Until pos1 > UBound(Double1) Or pos2 > UBound(Double2)
Do While (pos1 <= UBound(Double1) And pos2 <= UBound(Double2))
If Double1(pos1) <= Double2(pos2) Then
Array_Final(pos1 + pos2) = Double1(pos1)
pos1 = pos1 + 1
Else
Exit Do
End If
Loop
Do While (pos1 <= UBound(Double1) And pos2 <= UBound(Double2))
If Double2(pos2) <= Double1(pos1) Then
Array_Final(pos1 + pos2) = Double2(pos2)
pos2 = pos2 + 1
Else
Exit Do
End If
Loop
Loop
'Finaliza o Merge
If pos1 > UBound(Double1) Then
Do Until pos2 > UBound(Double2)
Array_Final(pos1 + pos2) = Double2(pos2)
pos2 = pos2 + 1
Loop
Else ' pos2 > UBound(Double2)
Do Until pos1 > UBound(Double1)
Array_Final(pos1 + pos2) = Double1(pos1)
pos1 = pos1 + 1
Loop
End If
MergeArray = Array_Final
End Function
Public Function Sort2(Doubles() As Double) As Double()
'Comes here when there's only 2 elements to sort
Dim temp As Double
If Doubles(0) > Doubles(1) Then
temp = Doubles(0)
Doubles(0) = Doubles(1)
Doubles(1) = temp
End If
Sort2= Doubles
End Function
-
- Visual FoxPro
by Sixon
- 793 Replies
- Sixon Views
- Last post
-
using database in network
- I've build a database program with Visual Foxpro, and use Visual Foxpro database/table. Example :
Select 1
use c:\data\table1
But sometimes my database/table located at server drive (my network place). So I typed, for example :
Select 1
use \\server\data\table1
It doesn't work properly, because Visual Foxpro cannot recognize the network drive. How to solve this problem ....thank's.......
-
- Smart Devicet
by Shuman Kibria
- 7432 Replies
- Shuman Kibria Views
- Last post
-
wms/wfs connection in virtual earth
- Hello all,
MSN VE is looking fantastic and getting better. Indeed a good option against google earth. But I could easily make some php scripts that could connect WMS to Google and project data on the fly to GE and this was also possible with MySql+GE connections.
But did anybody already do an experiment to connect a WMS to MSN Virtual Earth I'd be very much delighted to have some codes if possible.
Shuman Kibria
Please contact
{bigsort}@{smallsort}.com
-
- .NET Development
by bhavu
- 13098 Replies
- bhavu Views
- Last post
-
file.delete takes too much time.....sometimes control never comes back
- Hi......
I am using System.IO.File.delete method in my project. I takes too much time and sometime control never comes back. my file size is 170 mb.
When I debug it, I found that once file.delete g ets called, it will never come out of the call and next instruction is not executed.
Please help me....what can I do..
code is simple...
if(File.Exists(filepath))
{
File.Delete(filepath);
}
-
- Windows Vista
by mfindlay
- 6718 Replies
- mfindlay Views
- Last post
-
getudptable throws exception on vista with null first parm
- Just an FYI:
Calling GetTcpTable with NULL as a first parm will allow you to pre-determine the buffer size needed:
GetTcpTable(NULL, &dwSize, FALSE);
But if you try the same with GetUdpTable it will throw an exception.
You need to actually provide a valid pointer to some preallocated memory as the first parm in GetUdpTable or it crashes (throws the exception).
This only fails on Vista.
-
- Visual C++
by kumarvk
- 5780 Replies
- kumarvk Views
- Last post
-
interaction with an application running in cmd
- Hi all,
I have written code for an appliation which needs to interact with another application which runs in CMD. I want to receive all the information produced by the application running in CMD so that I can manipulate them and at the same time I should be able to provide input to that application.
Please suggest me somehting regarding this.
Thanks,
-
- VS Team System
by AtomZ .be
- 15574 Replies
- AtomZ .be Views
- Last post
-
rtbox set textcolor
- Hi,
I've got a problem again.
I'm trying to accomplish the following:
In my RTbox I am trying to change the color of some words (like in VB.NET).
This is the code I am using:
Public Sub ColorCmds()
; ; ; ; ; ; ; With rtbMain
; ; ; ; ; ; ; ; ; ; ; Dim i As Integer
; ; ; ; ; ; ; ; ; ; ; For Each cmd As String In cmds
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; For i = 1 To .TextLength
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; If Mid(.Text, i, cmd.Length) = cmd Then
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; .SelectionColor = Color.Red
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; .Select(i, cmd.Length)
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; .Select(.TextLength, 0)
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; Else
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; .SelectionColor = Color.Black
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; End If
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; Next
; ; ; ; ; ; ; ; ; ; ; Next
; ; ; ; End With
End Sub
But this doesn't work very well... ^^
Can someone of you guys please help me in the right direction :)
Grtz, Tom.