|
Hi,
I am facing a problem with the handling of ESC key in user controls
created in VB.
I have a multiline text box in the control. Also the text box is enabled
since I have to select/copy text in it.
Next I place the control in an MFC dialog. I do not need OK and Cancel
buttons on it and so I remove them and the corresponding handlers. Now,
when I click in the text box and then press ESC key, the text box
disappears and the application crashed.
Strangely, when I used the control in a VB form this problem was not
occuring.
I am using VB 6.0 and VC++ 6.0.
If any can let me know how this may be resolved with VC++, it is greatly
appreciated.
Thanks in advance
vinay
|
|
|
|
|
You wrote a control in VB6 and are using it in a VC++ 6 app? Am I correct?
I'd would start looking through the C++ code to find where the problem is. We really can help you without code samples and an actual error message. You've given us nothing but a black box and told us "it's broken"... On top of that, this forum really doesn't do VC++ code. You'd have to post the question on the VC++ forum.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can anybody show me how to use this Icon Constructor successfully?
public sub New(type as System.type, resource as string)
???
|
|
|
|
|
Hi all..
Iam new to this subject..I want to develop a component in vb.net which can read the values from the registry,set the values in the regidtry and must be able to delete the registry values..can anyone help me out...
|
|
|
|
|
It's already been done a million times... See this[^] for a list of articles here on CodeProject.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You need to look at the namespace/class Microsoft.Win32.Registry
Michael
CP Blog [^]
|
|
|
|
|
ok. im calling a method of my c++ class (active x DLL) from visual basic.
this method call works fine, if there is a single parameter. when i try
to add 2 parameters visual basic says its expects a '=' sign after the call.
the VB call: tp.nothing(i,variable1)
tp.nothing is (id as Integer, string as String)
IDL:
[id(7), helpstring("method nothing")] HRESULT nothing(short *id, BSTR *string);
any ideas why the VB call returns a syntax error???
thanks!
|
|
|
|
|
beerc0der wrote:
the VB call: tp.nothing(i,variable1)
I'm assuming this is VB6? You might want to try:
tp.nothing i, variable1
without the parenthesis. If your not getting a return variable, VB6 doesn't want the parenthesis, but if you are returning a value, you put them around the functions arguments. Wierd and inconsistent, but that's what it wants...
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thx for the help. no parenthesis.... hilarious....
|
|
|
|
|
Have a nice try with Why! Why! Why!
Best Regards,
Ahmad Rifai Yusuf
|
|
|
|
|
Hey,
I'm a graphics newbie. I built an app with a single form, and a set of controls in it. Now I want to be able to use GDI calls like drawline to draw visual links between these controls. When I use the Paint event of the form, I get a line that goes under my controls, not over it. Is there a way to get the graphics to lie on top of the controls? Additionally, what's the easiest way to make those graphics go away when they are no longer needed?
Thanks!
Mike Hammond
Apprentice VB Guy
|
|
|
|
|
I've never done what your talking about, but there are two possibilities...
1) Override the OnPaint eventof your form. The first thing you'll do is call MyBase.OnPaint(e) with the PaintEventArgs you were given in the function header. Then when that call completes, you can use the hWnd handle in the PaintEventArgs to paint everything else you need to, like your lines that go on top of controls.
2) You might have to look into overriding WndProc. What I think your going to have to do is when you get a WM_PAINT message, you'll call MyBase.WndProc(msg) to have the underlying code paint everything for you, then you'll start your painting code to draw your lines as in 1.
I hope that's clear enough...
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all.
Here is my problem, I want to create my own installation program, by adding embedded resources.
But I don't know how extract their from the .exe
Is anyone can help me ?
|
|
|
|
|
If your talking about VB.NET and writing a setup for a .NET application, check into the ResourceManager class. MSDN Docs and example[^].
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Just go to the Visual Studio icon .
select Microsoft Visual Studion Tools.
from there Select Package and Deployment Wizard and do the process as it said and you will be able to create Your own Wizard.
Hope that it might solve the problem
|
|
|
|
|
Dave Kreskowiak --> Yes, but how to do the same thig with my .exe file and .dll files ?
ramesh Gupta --> I know this solution but I don't want to use that, or a similiar solution. I want to create my own deployment program.
|
|
|
|
|
You want to pull resources out of existing .exe's and dll's? Or do you want to pull files out of your Setup.exe that you create, something like a self-extracting Setup or ZIP file?
Well, since .NET .EXE's and .DLL's have a different resource storage format than Win32 .EXE's and .DLL's, you'll have to be able to differentiate between the two.
You might want to read a little on Resources here[^].
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
No, I have my .NET .exe, with the embedded .exe,.dll..., added in visual studio by "Add --> Add a new element".
And when I launch my .exe which contains embedded files, I want to copy the files on a specified folder.
|
|
|
|
|
In that case, look into the ResourceManager class. There is the documentation on MSDN for the ResourceManager class and there are a few articles here on CodeProject that describe how to create and retrieve resources. The articles are written in C#, but are easily converted to VB.
CodeProject ResourceManager Articles[^]
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have found this :
private static void CheckDLL(string dllfilename)
{
if (!(System.IO.File.Exists(dllfilename)))
{
System.IO.Stream s = Assembly.GetExecutingAssembly).GetManifestResourceStream("nBASS." + dllfilename);
System.IO.Stream r = System.IO.File.Create(dllfilename);
int len = 8192;
byte[] buffer = new byte[len];
while (len > 0)
{
len = s.Read(buffer, 0, len);
r.Write(buffer, 0, len);
}
r.Close();
s.Close();
}
}
And I have adapted it for my program, and convert it into vb.net :
Function CheckDLL(ByVal dllfilename As String)
Dim s As System.IO.Stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(("WindowsApplication1." + dllfilename))
Dim r As System.IO.Stream = System.IO.File.Create(dllfilename)
Dim len As Integer = 8192
Dim buffer(len) As Byte
While (len > 0)
len = s.Read(buffer, 0, len)
r.Write(buffer, 0, len)
End While
r.Close()
s.Close()
End Function
Thanks a lot it works !!
|
|
|
|
|
Hi,
I'm developing a program that requires a method which set the public key of a RSACryptServiceProvider.
I've found a problem: if I convert the Bytes' Array of the module or of the exponent to a String with the ASCII conversion and later I take the output's String and convert to a Bytes' Array, I'd like to have the original Bytes' Array but it isn't what I have . I receive another one.
Anybody could help me?
Sorry for my bad language but I'm Italian...
Thanks Klaus
|
|
|
|
|
Yeah, you really can't do that. But there is a method that works using Base64. Check out the System.Convert class. You'll find a couple of methods very useful for what your doing. Convert.ToBase64String will convert an array of 8-bit unsigned integers (or Byte) to a Base64 string. You can then use Convert.FromBase64String on the resulting string to get back your original array of Byte's.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
does anyone have or know of some basic bookkeeping source code that i could use to make a personal program on visual studio.net
|
|
|
|
|
I suggest you to take a look at http://msdn.microsoft.com/archive/default.asp and search the key word of your program. I've often found code that helped me to create my application.
Sorry for my bad english
Bye Klaus
|
|
|
|
|
For source code, I don't know of any, but you might want to try using Googling for "bookkeeping source code". You might find something that you can use.
RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|