Click here to Skip to main content
15,918,808 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: WMI "Access is Denied" Pin
Dave Kreskowiak27-Dec-08 5:55
mveDave Kreskowiak27-Dec-08 5:55 
QuestionBase element load twice in TreeView, please help. Pin
Musa Biralo26-Dec-08 2:40
Musa Biralo26-Dec-08 2:40 
AnswerRe: Base element load twice in TreeView, please help. Pin
Not Active26-Dec-08 3:09
mentorNot Active26-Dec-08 3:09 
GeneralRe: Base element load twice in TreeView, please help. Pin
Musa Biralo26-Dec-08 3:21
Musa Biralo26-Dec-08 3:21 
GeneralRe: Base element load twice in TreeView, please help. Pin
Not Active26-Dec-08 3:45
mentorNot Active26-Dec-08 3:45 
GeneralRe: Base element load twice in TreeView, please help. Pin
Musa Biralo26-Dec-08 4:15
Musa Biralo26-Dec-08 4:15 
GeneralRe: Base element load twice in TreeView, please help. Pin
Musa Biralo26-Dec-08 4:18
Musa Biralo26-Dec-08 4:18 
GeneralRe: Base element load twice in TreeView, please help. Pin
Not Active26-Dec-08 4:59
mentorNot Active26-Dec-08 4:59 
Questiondatagridview using c# Pin
kulandaivel_mca200726-Dec-08 0:08
kulandaivel_mca200726-Dec-08 0:08 
QuestionRun .Net1.1 and 2.0 at same time Pin
Vince.Ro25-Dec-08 17:30
Vince.Ro25-Dec-08 17:30 
AnswerRe: Run .Net1.1 and 2.0 at same time Pin
Brij25-Dec-08 17:58
mentorBrij25-Dec-08 17:58 
GeneralRe: Run .Net1.1 and 2.0 at same time Pin
Vince.Ro25-Dec-08 18:50
Vince.Ro25-Dec-08 18:50 
GeneralRe: Run .Net1.1 and 2.0 at same time Pin
Abhijit Jana25-Dec-08 20:24
professionalAbhijit Jana25-Dec-08 20:24 
GeneralRe: Run .Net1.1 and 2.0 at same time Pin
Vince.Ro25-Dec-08 22:42
Vince.Ro25-Dec-08 22:42 
GeneralRe: Run .Net1.1 and 2.0 at same time Pin
Brij25-Dec-08 22:59
mentorBrij25-Dec-08 22:59 
GeneralRe: Run .Net1.1 and 2.0 at same time Pin
Vince.Ro28-Dec-08 13:44
Vince.Ro28-Dec-08 13:44 
QuestionInterface and GetType() - works in C# but not in VB? Pin
David Hovey25-Dec-08 12:37
David Hovey25-Dec-08 12:37 
Hi again. I have another question hopefully someone can help me with. I've found articles online where it is said that an Interface does not have a GetType() function as it is not derived from 'Object'. This seems true since when trying to work with the IDataObject interface, there is no GetType() function.

The problem is, as my last post addresses, I'm trying to change code from C# to VB for drag and dropping from Outlook. The original C# code is shown below. The very Odd thing I don't understand is how in C# GetType() works with IDataObject. Inside the DragDrop event of an Windows Form object e.Data.GetType() is usable, but this is not the case in VB.

I have the below code converted to VB but the New constructor does not work since there is no GetType() functions "visible."

Thanks again!!


private System.Windows.Forms.IDataObject underlyingDataObject;
private System.Runtime.InteropServices.ComTypes.IDataObject comUnderlyingDataObject;
private System.Windows.Forms.IDataObject oleUnderlyingDataObject;
private MethodInfo getDataFromHGLOBLALMethod;

public OutlookDataObject(System.Windows.Forms.IDataObject underlyingDataObject)
{
    //get the underlying dataobject and its ComType IDataObject interface to it
    this.underlyingDataObject = underlyingDataObject;
    this.comUnderlyingDataObject = (System.Runtime.InteropServices.ComTypes.IDataObject)this.underlyingDataObject;

    //get the internal ole dataobject and its GetDataFromHGLOBLAL so it can be called later
    FieldInfo innerDataField = this.underlyingDataObject.GetType().GetField("innerData", BindingFlags.NonPublic | BindingFlags.Instance);
    this.oleUnderlyingDataObject = (System.Windows.Forms.IDataObject)innerDataField.GetValue(this.underlyingDataObject);
    this.getDataFromHGLOBLALMethod = this.oleUnderlyingDataObject.GetType().GetMethod("GetDataFromHGLOBLAL", BindingFlags.NonPublic | BindingFlags.Instance);
}

AnswerRe: Interface and GetType() - works in C# but not in VB? Pin
cterrinw27-Sep-09 19:32
cterrinw27-Sep-09 19:32 
GeneralRe: Interface and GetType() - works in C# but not in VB? Pin
David Hovey27-Sep-09 19:37
David Hovey27-Sep-09 19:37 
GeneralRe: Interface and GetType() - works in C# but not in VB? Pin
cterrinw27-Sep-09 20:48
cterrinw27-Sep-09 20:48 
AnswerRe: Interface and GetType() - works in C# but not in VB? Pin
BrianHoover2-Jan-10 1:04
BrianHoover2-Jan-10 1:04 
GeneralRe: Interface and GetType() - works in C# but not in VB? Pin
David Hovey2-Jan-10 3:10
David Hovey2-Jan-10 3:10 
QuestionInterface code from C# to VB.NET Pin
David Hovey25-Dec-08 9:12
David Hovey25-Dec-08 9:12 
QuestionProblem with dot net (Window forms) user control in Vb6 application Pin
Nitin198125-Dec-08 6:42
Nitin198125-Dec-08 6:42 
AnswerRe: Problem with dot net (Window forms) user control in Vb6 application Pin
Not Active25-Dec-08 12:21
mentorNot Active25-Dec-08 12:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.