|
Hi All,
Can we use C# dlls in VB6?
Thanks
Syed Shahid Hussain
|
|
|
|
|
|
Thanks
Basically m C# programmer a but I have to give solution for VB6 projects the old one which is still in working.
thanks by the way
Syed Shahid Hussain
|
|
|
|
|
I understand. You are welcome
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
Yes you can do this by implementing a CCW
please check
http://www.codeproject.com/KB/COM/nettocom.aspx
Hope this helps
|
|
|
|
|
Thanks
Syed Shahid Hussain
|
|
|
|
|
Hi all,
I m trying to create toolbar for IE .
In my toolbar i had a button "Sign in" which opens a form
which allow user to login. On login suceed i have to remove the sign in
button from toolbar and have to show "Sign out" button on toolbar.
Thanks in advance.
modified on Wednesday, December 23, 2009 4:51 AM
|
|
|
|
|
Hi,
What programming language are you using.
In C#.net it would be done as below
Form1 f=this.Owner as Form1;
f.Button1.Text="Sign Out";
Where Form1 is the name of the parent that holds the sign in button with name button1.
Hope this helps
Thanks
|
|
|
|
|
What is your question, I don't see one.
|
|
|
|
|
How can i hide/remove some of the properties from a propertygrid.
I have a used a property grid in my project to display the properties of a label and picturebox in runtime, but i do not want all the properties to be displayed.
please help
Janardhan
|
|
|
|
|
Message Closed
modified 23-Nov-14 7:15am.
|
|
|
|
|
Given below is is my implementation, where should i add [Browsable(false)] or [Browsable(true)]
PropertyGrid pgGrid = new PropertyGrid();
pgGrid.CommandsVisibleIfAvailable = true;
pgGrid.Height = 400;
pgGrid.Width = 250;
pgGrid.Location = new Point(this.Width - (pgGrid.Width + 10), 0);
pgGrid.Dock = DockStyle.Fill;
this.Controls.Add(pgGrid);
pgGrid.Visible = true;
pgGrid.SelectedObject = label1;
Regards
Janardhan
|
|
|
|
|
Message Closed
modified 23-Nov-14 7:15am.
|
|
|
|
|
Where is label1 used here?
|
|
|
|
|
Given below is is my implementation, where should i add [Browsable(false)] or [Browsable(true)]
PropertyGrid pgGrid = new PropertyGrid();
pgGrid.CommandsVisibleIfAvailable = true;
pgGrid.Height = 400;
pgGrid.Width = 250;
pgGrid.Location = new Point(this.Width - (pgGrid.Width + 10), 0);
pgGrid.Dock = DockStyle.Fill;
this.Controls.Add(pgGrid);
pgGrid.Visible = true;
pgGrid.SelectedObject = label1; <--- here!
|
|
|
|
|
Hi,
first forgive my poor english
my problem is :
I made a solution with 2 runing projects, vb and C#.
The VB project contains a form with a Label.
The C# project contains a form with a Button.
The goal is to change the Label.Text in the VB project by pressing the C# Button.
I made a referance in the C# project to the VB Project.
But the only way I know in order to address the Label is by using
in the vb:
inside form1....
Public Function Fnc_ChangeTxt()
Label1.Text = "blabla"
End Function
and in the cs:
when pressing the button...
ProjectVB.Form1 f1 = new ProjectVB.Form1;
f1.Fnc_ChangeTxt;
I guess since im using "new" it wont address the current working VB project
what do i need to do ?
thanks in advance.
|
|
|
|
|
First of all, your English isn't all that bad!
I'm taking a stab at this, do you want to modify the label directly instead of using a function?
First thing to do is, ensure that the label is publicly accessible by setting it's Modifiers property to Public.
This property is "Private" by default.
Let us know if that helped!
|
|
|
|
|
hi, thanks for replying
It wont work.
when trying my code or your suggestion
it will go through all the steps ahowing as if all is ok
but in the form itself nothing will change.
I think its because im using:
ProjectVB.Form1 f1 = <big>new </big>ProjectVB.Form1;
and it causes a whole new instance of the form to be adressed.... or smth like that ^^
do you know of an other way to adress the vb form from the c# ?
|
|
|
|
|
I created the project on my side and it works just fine, here's my code:
C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using VBApplication;
namespace CSApplication1 {
public partial class Form1 : Form {
public VBForm1 vbf;
public Form1() {
InitializeComponent();
vbf = new VBForm1();
vbf.Show();
}
private void button1_Click(object sender, EventArgs e) {
vbf.Label1.Text = "Hello World!";
}
}
}
VB
No code on the VB side, I only added a label on the form and changed it's Modifiers to Public.
modified on Wednesday, December 23, 2009 5:56 AM
|
|
|
|
|
I think this is idd your problem. You'll need to fetch the instance already open.
Easier would be that your C# loads up, creates the VB Form for you and shows it. That way your variable has been set up in the C# project and is immediately accessible.
Hope this helps.
IOW
ProjectVB.Form1 f1 = new ProjectVB.Form1;
f1.ShowDialog();
f1.ChangeLblFunction();
|
|
|
|
|
Yes, the "new" is causing your problem, since it create a new instance of the VB form.
One of your two projects will be the Startup Project. In that you will be creating an instance of the other - or it wouldn't be displayed. Whereever you create and display the other form, save it and you can access it later.
So, if your startup project is C#, somewhere you will be saying:
ProjectVB.Form1 f1 = new ProjectVB.Form1;
f1.Show();
You can save the value as a class variable, and then call the Fnc_ChangeTxt method in your button handler.
If your startup project is VB, there will be similar code to show the C# form - You can hand it the instance of your VB form and store that as a C# class variable.
The better way to do it would require changes in the same area - create an event in the C# which you throw in your button event, and subscribe to in your VB form. This means that the two projects are more independant of each other.
All those who believe in psycho kinesis, raise my hand.
|
|
|
|
|
In your C# app, do something like this:
public partial class MyForm
{
private VBFormProject.VBForm m_vbForm = null;
private void clickHandler(object sender, EventArgs e)
{
if (m_vbForm == null)
{
m_vbForm = new VBFormProject.VBForm();
}
m_vbForm.Show();
m_vbForm.Fnc_ChangeText("some text");
}
private void OnClosing()
{
if (m_vbForm != null)
{
m_vbForm.Close();
}
}
}
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Every EventLog entry my application makes ends with the following string:
"For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp."
I know there is a way of removing or replacing this, I just can't seem to find it!
Regards!
|
|
|
|
|
Hi, someone knows a program to calculate the polynomial for CRC value?
I have the string example "100140590201004d000b00014b2b877053b17ee9100305ee5a" and the, i think, CRC value "7579d418" but i don't know the CRC polynomial.
I wait for suggestions.
Best regards and merry Christmas.
Andrea
|
|
|
|
|